> ## Documentation Index
> Fetch the complete documentation index at: https://developers.gonitro.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge PDF Documents

> Combine several PDFs into one inside a Power Automate flow with the Nitro PDF Services connector.

Combines up to eight PDFs into a single document, in the order of the numbered inputs.

## Inputs

| Field | Required | Description |
| - | - | - |
| **File 1** | Yes | Bytes of the first PDF |
| **File 2** | Yes | Bytes of the second PDF |
| **File 3** … **File 8** | No | Additional PDFs, merged in numeric order. Under **Advanced parameters**. |
| **File *n* (file name)** | No | A name for each input. Not needed for PDFs. |
| **Options (JSON)** | No | `{"tableOfContents":{"enabled":false}}`. Under **Advanced parameters**. |
| **Accept (Output format)** | No | `application/octet-stream` (default) or `application/json`. |

<Note>
  By default the merged PDF gets a bookmark for each source document (*Document 1*, *Document 2*,
  …) so readers can jump between them. No page is inserted. To merge without bookmarks, set
  **Options (JSON)** to `{"tableOfContents":{"enabled":false}}`.
</Note>

<Note>
  The action takes eight discrete inputs rather than a list, so a flow can merge at most eight files
  in one call and must know at design time which slots it fills. See
  [merging a variable number of files](/docs/integrations/power-automate/working-with-files#merging-a-variable-number-of-files).
</Note>

## Outputs

Identical in shape to any other file-returning action: **File Name**, **File Content Type** and
**File Content**, or a JSON object with `result.file.URL` and `metadata.pageCount` when **Accept**
is `application/json`.

## Example flow

Merge a cover sheet with a generated report and email the result.

<Steps>
  <Step title="Get file content using path — cover sheet">
    SharePoint. Point at a fixed `cover.pdf` in a templates library.
  </Step>

  <Step title="Get file content — report">
    SharePoint or OneDrive, pointing at the report produced earlier in the flow.
  </Step>

  <Step title="Merge PDF Documents">
    Nitro. **File 1** → the cover sheet's **File Content**. **File 2** → the report's
    **File Content**. Leave **File 3** to **File 8** empty.
  </Step>

  <Step title="Send an email (V2)">
    Outlook. Add an attachment: **Name** `report.pdf`, **Content** → the Nitro step's
    **File Content**.
  </Step>
</Steps>

<Tip>
  Page order follows the input numbers, not the order you filled the fields in the designer. If the
  output pages come out in the wrong order, check which slot each file is in.
</Tip>

## Related

* [Actions](/docs/integrations/power-automate/actions)
* [Working with files](/docs/integrations/power-automate/working-with-files)
* [Merge API reference](/docs/api-reference/platform/transformations/merge)
