This article demonstrates how to batch convert multiple DOCX files to PDF with the help of the Plumsail Documents connector for Power Automate (Microsoft Flow). Let’s say you have a SharePoint library containing Word documents. You need to pick all of them up and bulk convert to pixel-perfect PDFs.
This is what your Flow would look like:
Below is a detailed explanation of each of the steps.
Choosing a trigger is up to you. For example, you can start Flow on file creation in a SharePoint document library. We’ll use the Manually trigger a flow trigger here to simplify the Flow:
Our first step is to add the Get items action. It will retrieve all items to convert from a SharePoint document library.
Note
We also added an OData filter File_x0020_Type eq 'docx'
to get only DOCX files from the library that may contain files of other formats.
Next, we’ll add the Apply to each control and use the output from the Get items action:
The loop will process each document received from the action.
Let’s add a Get file content action to the loop:
It will get the file content and pass it to the Convert DOCX to PDF action.
This is an action from the Plumsail Documents connector.
If this is your first time using the Plumsail Documents connector, Power Automate will request the Connection Name and API Key.
You can type any name for the connection, for example Plumsail Documents.
Once the connection name is filled out, create an API key in your Plumsail Account, copy and paste it into the Access Key field, and then click Create.
We will use the file content received from the Get file content action:
Learn more about the Convert DOCX to PDF action here.
Additionally, you can protect the resulting PDF files using the Protect PDF Document action:
That’s it. These few simple steps will help you work with your documents more efficiently.