Learn how to create your first flow in Microsoft Power Automate using the Adobe PDF Services connector.
In this hands-on tutorial learn how to:
There are two sample files that you need to unzip and upload to OneDrive:
To complete this tutorial, you need your credentials already configured in Microsoft Power Automate for Adobe PDF Services. If you have not completed this step, see the instructions here.
In this part, you create a new flow in Microsoft Power Automate using an instant flow, add parameters, get your files from OneDrive, and convert them to PDF.
Navigate to Microsoft Power Automate and log in with your credentials.
In the sidebar, select Create.
Select Instant Flow.
Give your flow a name.
Under Choose how to trigger this flow, select Manually trigger a flow.
Select Create.
Next, get the file contents of the sample files.
If you haven’t uploaded the sample files into OneDrive, unzip them and upload them.
In Power Automate, select + New step.
Search for OneDrive in the search bar.
Choose either your work or personal OneDrive account by selecting OneDrive for Business or OneDrive.
Search for Get file content in the search bar.
In the File field, select the Folder icon to navigate to the WordDocument01.docx file in OneDrive.
Now that you have the file content, you can convert the document to PDF.
In Power Automate, select + New step.
Search for Adobe PDF Services in the search bar.
Select Adobe PDF Services.
Search for Convert Word to PDF in the search bar.
In File Name, name your file as desired but it must end with .docx. This extension is necessary for converting documents from Word to PDF.
Place your cursor in the File Content field.
Using the Dynamic content panel, select File content.
Once the document generates, save the file back in OneDrive.
In the OneDrive folder, you should now see the converted PDF.
This next part builds on Part 1 and uses the Generate document from Word template to dynamically merge data into your document.
Open WordDocument02_.docx from your sample files in OneDrive. The Word document contains several different text tags that represent places where data is populated into the document.
To have dynamic data pushed into the document, you need to create a few parameters for the trigger to prompt for values.
Repeat steps 2-4 to add the following fields:
To generate a document, you first need to get the file content of the Word template.
Using the Generate document from Word template action, you can merge data into your document from any of the different variables previously in the flow using Dynamic content.
Copy the JSON data below into the Merge Data field:
{
"FirstName": "",
"LastName": "",
"Salary": ""
}
Place your cursor in the field between the two quotation marks for the FirstName value.
Using the Dynamic Content panel, insert the First Name value from the Manually trigger a flow action.
Repeat steps 7-8 for the LastName and Salary fields.
In the Template File Content field, use the Dynamic content panel to insert the File content value from the Get file content step.
The Generate document from Word template action uses Adobe Document Generation API. If you want to learn more on how to create templates, here are a few resources:
Once the document is generated, you can save the file back in OneDrive.
In the OneDrive folder, you now see a PDF generated from the Word document. When you open the PDF document in OneDrive, you see that the data is merged into the text tag locations.
Now that you have generated and converted a Word document into a PDF, the next part is to combine multiple PDF documents together.
In the previous actions, you saved a copy of the document as a file in OneDrive. In order to use tools like Merge PDFs, you do not need to save the file to OneDrive. Instead, you can pass the output directly from one action to the next, which is better than saving to OneDrive after each action. But for demonstration purposes, you are saving these files to OneDrive.
Once the document is combined, you can save the document back into OneDrive.
In Power Automate, select + New step.
Search for OneDrive in the search bar.
Choose either your work or personal OneDrive account by selecting OneDrive for Business or OneDrive.
Search for Create file in the search bar.
Select Create file.
In the Folder Path field, select the folder icon to specify where to save the file in OneDrive.
In the File Name field, set the name of the file. Because the output is a PDF, your file name must end with .pdf.
In the File Content field, use Dynamic content panel to insert the PDF File Content value from the Merge PDFs step.
In the OneDrive folder, you see the combined PDF with pages from the first and second document.
After generating your document, you can protect it from editing by including an extra step before saving to OneDrive.
While editing your flow in Power Automate, select + in between the Merge PDFs action and the Create file 3 action.
Select Add an action.
Search for Adobe PDF Services in the search bar.
Select Adobe PDF Services.
Select the Protect PDF from Viewing action.
In the File Name field, set the name to your desired name, as long as it ends with a .pdf extension.
Set the Password field to your specified password to open the document.
In the File Content field, use the Dynamic Content panel to insert the PDF File Content value from the Merge PDFs step.
Once the document is protected, you can save the file back in OneDrive. In this example, you are updating the pre-existing Create file 3 action with a new File Content value.
In the OneDrive folder, you see the combined PDF that now prompts you to enter a password to view the document.
In this tutorial, you converted a Word document to a PDF, generated a document based on data, merged documents together, and protected with a password. To learn more, explore some of the other actions available in Adobe PDF Services connector in Microsoft Power Automate: