---
title: "Power Automate merge and combine PDF files | Nutrient"
canonical_url: "https://www.nutrient.io/guides/document-converter/power-automate/merge/merge-pdf/"
md_url: "https://www.nutrient.io/guides/document-converter/power-automate/merge/merge-pdf.md"
last_updated: "2026-05-30T02:20:01.209Z"
description: "In this guide, you’ll learn how to combine and merge multiple PDF files into a single PDF using Power Automate. for Nutrient Document Converter SDK."
---

# Merge and combine PDF files using Power Automate

In this guide, you’ll learn how to combine and merge multiple PDF files into a single PDF using Power Automate.

For this specific example, you’ll build a flow that will loop through all the PDF documents in a OneDrive for Business folder once a day, merge them, and then create a merged PDF document in a different location of your choice.

This example combines PDFs in OneDrive, but you can easily merge multiple PDFs and save them to another destination like Dropbox, Google Drive, SharePoint, or any platform supported by Power Automate.

### Prerequisites

Before beginning, ensure the following prerequisites are in place:

- An Office 365 subscription with Power Automate and OneDrive for Business support.

- A full or free trial subscription to Nutrient’s [Document Converter for Power Automate](https://www.nutrient.io/low-code/try/converter-power-automate/).

- Appropriate privileges to create flows.

- Working knowledge of Microsoft Power Automate.

### High-level overview

The image below shows a high-level overview of how to merge PDFs using Power Automate.![merge pdf with power automate](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-1.jpg)

### Merging PDFs using Power Automate

First create a scheduled cloud flow and then enter a name in the **Flow name** field. Include the starting date and time, and set it to repeat every day. Press **Create**.![create cloud flow](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-2.jpg)

Insert the **Initialize variable** flow action to store the merged contents. Give this action a suitable name, and set the **Type** field to **String**. Leave the **Value** field empty.![variable flow action](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-3.jpg)

Insert the **Initialize variable** flow action to store the merged count. Set the **Type** field to **Integer** and leave the **Value** field empty.![initialize variable flow](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-4.jpg)

Add the OneDrive for Business **List files in folder** action, and specify the path in the **Folder** field. This contains all the files that need to be merged.![list files in folder](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-5.jpg)

Insert the **Apply to each** loop, and add the **Output(value)** of the **List files in folder** action.![apply to each loop](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-6.jpg)

Insert the **Add a condition** action. Specify **Is folder?**, which is the output of the **List files in folder** action, and set it to **false**.![add a condition action](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-7.jpg)

If the step above evaluates to `true`, add the **Get file content using path** action. In the **File Path** field, specify the **Path** variable, which is the output of the **List files in folder** action.![file path](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-8.jpg)

Insert the **Add a condition** action. Insert **Merged Count**, which is the output of **Initialize variable – Merged Count**, and set it to **0**.![insert merge count](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-9.jpg)

If the step above evaluates to `true`, add the Nutrient **Convert document** action.

The action has two parameters:

- **Source file name** — The name is the output of the **List files in folder** action.

- **Source file content** — **File content** is the output of the **Get file content using path** action.![source file content](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-10.jpg)

Insert the OneDrive for Business **Create file** action after the **Convert document** action.

The action has three main parameters:

- **Folder Path** — This is the path of your destination folder.

- **File Name** — You can create a variable for the file name, if needed. This example uses **MergeFile.PDF**.

- **File Content** — This is **Processed files content**, which is the output of the **Convert document** action.![convert document](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-11.jpg)

If the step above evaluates to `false` instead of `true` — i.e. **Merged Count** isn’t equal to **0** — add the **Get file content using path** action. In the **File Path** field, specify the **Path** variable, which is the output of the **List files in folder** action.![get file content using path](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-12.jpg)

Add the Muhimbi **Merge documents** action. It has the following parameters:

- **Source files name - 1** — You can hardcode the file name **MergeFile.PDF**. This file name should be the same as in previous steps.

- **Source files content - 1** — The file content is the output of the **Get file content using path 2** action from earlier.

- **Source files name - 2** — Enter **Name**, which is the output of the **List files in folder** action.

- **Source files content - 2** — Enter **Body**, which is the output of the **Get file content using path** action.![merge document](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-13.jpg)

Add the OneDrive for Business **Create file 2** action. The action has three main parameters:

- **Folder Path** — The path of your destination folder.

- **File Name** — This is hardcoded to **MergeFile.PDF**.

- **File Content** — This is **Processed files content**, which is the output of the **Merge document** action.![merge document workflow](@/assets/guides/muhimbi/pdf-converter/power-automate/merge-pdf-14.jpg)

Outside the **Condition 2** action, add a **Set variable** action. The action has two main parameters:

- **Name** — Select the **Merged count** variable from above.

- **Value** — Set the **Value** field to **1**.

You can test this workflow by setting the recurrence frequency at the beginning of the flow to **Minute**. Then, upload a few PDF documents to the source location, and this will trigger the flow and create the merged PDF document in the target destination.

## Additional resources

- [Error while merging existing PDF files](https://www.nutrient.io/guides/document-converter/sharepoint/troubleshooting/error-while-merging-existing-pdf-files-e-g-pdflexer-errors.md)
---

## Related pages

- [Merge documents using Power Automate](/guides/document-converter/power-automate/merge/merge-documents.md)
- [Merge documents with low-code solutions](/guides/document-converter/power-automate/merge.md)
- [Merge Word documents with Power Automate](/guides/document-converter/power-automate/merge/merge-word.md)
- [Merge PowerPoint files using Power Automate](/guides/document-converter/power-automate/merge/merge-ppt.md)

