Merge Multiple PDF Documents from URLs - n8n Workflow

Learn how to merge multiple PDF files using an n8n workflow template. This n8n node guide details downloading files, merging binary data, and writing the final PDF.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Users who frequently need to combine reports, invoices, or external documents programmatically.
n8n automation specialists looking for advanced file manipulation n8n templates.
Developers needing to handle binary file operations and PDF processing within an n8n environment.
Anyone needing to implement a robust, scalable PDF merging solution without relying on manual steps.

Overview

Handling binary files and PDF documents is a common challenge in automation. This specific n8n workflow solves the problem of consolidating multiple external PDF files into one unified document. By leveraging the power of the CustomJS PDF Toolkit n8n node, this automation seamlessly downloads files using the HTTP Request n8n node, combines their data streams, and executes the merge operation. This provides a reusable n8n workflow template for any operation requiring PDF consolidation, dramatically improving efficiency when dealing with high volumes of documents.

How it Works

This n8n workflow is designed to execute upon a manual n8n trigger for testing purposes, but can easily be adapted for any scheduled or webhook n8n trigger.


  1. Trigger Activation: The workflow starts with the When clicking ‘Test workflow’ n8n trigger.

  2. Simultaneous Download: Two separate HTTP Request n8n node instances run concurrently to download two distinct PDF files from specified public URLs.

  3. Data Consolidation: The Merge n8n node receives the binary data output from both HTTP requests, combining them into a single item list, ensuring all PDF inputs are available for the next step.

  4. PDF Merging: The specialized Merge PDF1 n8n node (from the CustomJS PDF Toolkit) receives the collection of binary PDF files and merges them sequentially into a new, single PDF file.

  5. File Output: The first Read/Write Files from Disk n8n node writes the resulting merged PDF binary data to the n8n environment's temporary storage, naming the file test.pdf.

  6. Verification/Transfer: The final Read/Write Files from Disk4 n8n node then reads the newly created test.pdf back into the n8n workflow, making it ready for a subsequent action like uploading to cloud storage or emailing.

Installation Guide

To use this powerful n8n workflow template, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON code and paste it into your n8n instance via the "New" -> "Import from JSON" option.

  2. Install CustomJS Nodes: This n8n workflow relies on the CustomJS PDF Toolkit n8n node. If you do not have it installed, navigate to Settings > Community Nodes and install @custom-js/n8n-nodes-pdf-toolkit.

  3. Set up Credentials: The Merge PDF1 n8n node requires CustomJS API credentials. You must create and configure these credentials within n8n before running the n8n workflow.

  4. Review HTTP Requests: Verify the URLs in the HTTP Request n8n nodes are valid, or replace them with expressions pointing to dynamic file URLs relevant to your use case.

  5. Test: Click the "Test workflow" button to execute the manual n8n trigger and confirm the test.pdf file is created successfully.

Node Details

This n8n workflow utilizes several key n8n node types for file handling and processing:

When clicking ‘Test workflow’ (Manual Trigger): Acts as the starting n8n trigger for testing the automation flow.
HTTP Request / HTTP Request2: These n8n nodes are configured to download external files. In this n8n template, they fetch two sample PDF files using their respective URLs. The output is binary data.
Merge (n8n node): Essential for flow control, this n8n node combines the independent data streams from the two HTTP requests into a single data item array suitable for the subsequent processing node.
Merge PDF1 (PDF Toolkit n8n node): The core of the operation. Using CustomJS credentials, this n8n node accepts multiple PDF binaries and outputs a single, merged PDF file.
Read/Write Files from Disk (n8n node): Configured for the write operation, this n8n node takes the merged PDF binary output and saves it locally as test.pdf.
Read/Write Files from Disk4 (n8n node): Configured for the read operation, this n8n node fetches the newly written test.pdf, confirming the file operation and making the file available for subsequent n8n nodes.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Featured*