๐Ÿ“ Merge multiple PDF files with CustomJS API

โšก 1,172 views ยท ๐Ÿ“ File Management

Description

workflow.png 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.

@custom-js/n8n-nodes-pdf-toolkit

Notice

Community nodes can only be installed on self-hosted instances of n8n.

What this workflow does

Requirements

Workflow Steps:

  1. Manual Trigger:

    • Runs with user interaction.
  2. HTTP Request Node For PDF Download:

    • Pass urls for PDF files to merge.
  3. Merge Node For Array Population:

    • Just populates two files into an array.
  4. Merge PDF files:

    • Uses the CustomJS node to merge the incoming PDF files into a single PDF file.
    • If size of PDF files exceeds 6MB, you can simply pass an array of URLs for PDF files.

Usage

Get API key from customJS

Set Credentials for CustomJS API on n8n

Copy and paste your API key generated from CustomJS here. 2.png

Design workflow

You can replace logic for triggering and returning results. For example, you can trigger this workflow by calling a webhook and get a result as a response from webhook. Simply replace Manual Trigger and Write to Disk nodes.

Perfect for

๐Ÿ”— Nodes Used

HTTP Request, Read/Write Files from Disk

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup