In this guide you’ll learn how to save a file to PDF using Power Automate. For this specific example we monitor a SharePoint folder and automatically save any new file to PDF to the local computer (see file formats we support).
It’s also important to note that you can easily customize this example to save your PDF to other destinations like Dropbox, Google Drive, OneDrive, or any platform supported by Power Automate. You can also extend our example by adding additional automation like sending your PDF as email.
Before we begin, please make sure the following prerequisites are in place
- Power Automate subscription.
- Install and Configure Gateway for Power Automate.
- Muhimbi PDF Converter for Power Automate, full or free trial subscription.
- Appropriate privileges to create Power Automate Flows.
- Working knowledge of Power Automate.
1: Create a flow
Create a flow and find the “When a file is created or modified (properties only)” trigger. Using this trigger will allow you to start the flow when adding or modifying a property of a file into a folder.
In the action, specify the path to the SharePoint Online Library to monitor for new items.
2: Get file content
Add the SharePoint “Get file content” action to the Power Automate Canvas and configure it with reference to the details below:
Site Address: Specify the path to the SharePoint Online site collection which holds the file. File Identifies: “Identifier” the output from the “When a file is created or modified (properties only)” action.
Step 3: Convert to PDF
Add the Muhimbi “Convert document” action to the Power Automate and configure it with reference to the details below. If your source documents are already in PDF format then this step is naturally not needed.
Source File name: “File name with extension” the output from the “When a file is created or modified (properties only)” action. Source file content: “File Content” the output of the “Get file content” action. Output Format: PDF
Step 4: Create a file
Add the ‘Create file’ SharePoint action to store the PDF document in the File Explorer action library.
Note: You will need to configure a gateway to write files to your filesystem, as mentioned in the prerequisites section.
File name: Base file name.pdf (output variable of the Convert)action. File content: Processed file content the (output variable of the Convert)action.
That is it. Publish your Flow and upload a file (e.g. an MS Word document) to the folder that is monitored by the configured SharePoint trigger. After a short wait, you can find the PDF document – on your computer as a PDF file.