How to Merge PDF Files in Power Automate?

Last month, while working on an intranet portal for one of our clients, they asked us to build an automatic solution. In their scenario, the team generated a Power BI report each month and saved it as a PDF in a SharePoint document library.

However, the management team did not review these reports every month. Instead, they reviewed them quarterly. Because of this, at the end of every quarter, someone had to manually download all three monthly PDF reports, merge them into a single PDF file, and then send it to the management team.

The client asked us how we could automate this manual process.

After some research, I found that the Encodian connector provides an action called “Merge documents to PDF,” which allows us to merge multiple PDF files into one single file.

In this tutorial, I will show you how to merge PDF files in Power Automate using the Encodian “Merge documents to PDF” action.

Merge PDF Files in Power Automate

Here we have two PDF files stored in a folder in the SharePoint document library, as shown below. Now, I will create an instant cloud flow in Power Automate that merges these two PDF files into a single PDF and saves the merged file back to the same SharePoint document library folder.

Power automate merge pdf files

Now, let’s see how to create a flow in Power Automate to merge PDF files using a third-party action. In this flow, we will use the Merge documents to PDF action from Encodian.

To use the Encodian action, you need an API key. Fill out and submit the form to generate an API key. Later, you can configure the Encodian action with the generated API key.

Now, follow the steps below to merge pdf files:

  1. Go to the Power Automate site, click on + Create, and then select Instant cloud flow.
Merge PDF files using Power Automate
  1. Now, provide the flow name and select Manually trigger a flow. Then click on Create.
Merge PDF files using Microsoft Power Automate
  1. Select the Get file content using path action. After that, provide the following details:
    • Site Address: Select or enter your SharePoint site address.
    • File Path: Provide the file path of the first PDF file.
power automate merge pdf
  1. Again, select the Get file content using path action. Then provide the information below:
    • Site address: Select or provide the site address.
    • File path: Provide the file path of the second PDF.
automate combining pdf files
  1. Now we will merge the two PDFs, so select the Merge documents to PDF action in Power Automate. Then provide the information below:
    • PDF filename: Provide the PDF file name
    • Filename: Provide the file name like below. As my file name is info1.pdf
    • File content: Provide the file content from dynamic content
    • Filename: Provide the file name like below. As my file name is info2.pdf
    • File content: Provide the file content from dynamic content
merge pdf files in Power Automate
  1. Then select Create file action and provide the following parameter:
    • Site address: Select or provide the SharePoint site address.
    • Folder Path: Select the folder path
    • File name: Provide the file name of the dynamic content
    • File content: Provide the file content of the dynamic content.
Using flow merge pdf files

To run the flow, click on the Test icon, then select Manually and click on Test again. If prompted, configure the required connections, then click on Run flow. Once the flow runs successfully, click on Done.

Now you can see the flow ran successfully. Also, you can check in the SharePoint library that both the PDFs have been merged into a single PDF file.

How to merge pdf files using power automate

This is how to merge pdf files using Power Automate flow. Also, you can merge more than 2 pdf files using this method.

You may like the following Power Automate tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App