AutomationFlowsWeb Scraping › Merge Multiple PDF Files with Customjs API

Merge Multiple PDF Files with Customjs API

ByCustomJS @customjs on n8n.io

This n8n template demonstrates how to download multiple PDF files from public URLs and merge them into a single PDF using the PDF Toolkit from www.customjs.space.

Event trigger★★★★☆ complexity7 nodesHTTP RequestRead Write File@Custom Js/N8N Nodes Pdf Toolkit V2
Web Scraping Trigger: Event Nodes: 7 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #3873 — we link there as the canonical source.

This workflow follows the HTTP Request → Readwritefile recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "0ZgxlAsLyuTYgCGc",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Merge multiple PDF files with CustomJS API",
  "tags": [],
  "nodes": [
    {
      "id": "4d6f1e0f-c730-4d53-b5c7-b2f7df1d8d7f",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -224,
        112
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f84d01f0-fd9e-49b8-b172-49f8de723148",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        0
      ],
      "parameters": {
        "url": "=https://www.intewa.com/fileadmin/documents/pdf-file.pdf",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "d433b3e9-582c-4ca8-9ca8-266c430f3962",
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        208
      ],
      "parameters": {
        "url": "=https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "7a8c50e5-3b90-46cd-8f67-5910d2cfb5fc",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        224,
        112
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "d1e0f43a-e246-4896-9c91-7e67722ec154",
      "name": "Read/Write Files from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        832,
        112
      ],
      "parameters": {
        "options": {},
        "fileName": "test.pdf",
        "operation": "write"
      },
      "typeVersion": 1
    },
    {
      "id": "9342b052-e1d6-4381-b883-717a31244d04",
      "name": "Read/Write Files from Disk4",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1088,
        112
      ],
      "parameters": {
        "options": {},
        "fileSelector": "test.pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "1f75c078-94de-42bf-911e-ba88b3f71b4c",
      "name": "Merge PDFs",
      "type": "@custom-js/n8n-nodes-pdf-toolkit-v2.pdfToolkit",
      "position": [
        512,
        112
      ],
      "parameters": {
        "resource": "pdf",
        "operation": "merge"
      },
      "credentials": {
        "customJsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c17799ab-00d4-4fc4-b1c9-19f27bbb00a9",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Merge PDFs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge PDFs": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n template demonstrates how to download multiple PDF files from public URLs and merge them into a single PDF using the PDF Toolkit from www.customjs.space.

Source: https://n8n.io/workflows/3873/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

Execute Command, Read Write File, HTTP Request +3
Web Scraping

Credentials Transfer. Uses form, httpRequest, executeCommand, readWriteFile. Event-driven trigger; 22 nodes.

Form, HTTP Request, Execute Command +2
Web Scraping

[](https://youtu.be/xKqkjXIPZoM)

Read Write File, Execute Command, Form Trigger +2
Web Scraping

This workflow demonstrates how to automatically generate a weekly KPI dashboard from Google Sheets and host it as a live static HTML page using CustomJS.

HTTP Request, @Custom Js/N8N Nodes Pdf Toolkit V2
Web Scraping

This template creates a comprehensive data search and reporting system that allows users to query large datasets through an intuitive web form interface. The system performs real-time searches against

Form Trigger, HTTP Request, Read Write File