Skip to main content

Merge Multiple PDFs using n8n action

PDF4me Merge Multiple PDFs combines multiple PDF documents into a single unified PDF file through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to merge documents in specified order with preserved formatting, maintained page structure, bookmarks retention, and seamless consolidation of all content. This solution is ideal for document consolidation, report compilation, multi-source document combining, contract bundling, archive creation, and automated PDF merging workflows that require reliable multi-document combination with preserved quality and seamless integration.

Setup

Add the PDF4me "Merge Multiple PDFs" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Merge Multiple PDFs" action
  3. Configure input parameters (see below)
Merge Multiple PDF files into Single PDF

Parameters

Complete list of parameters for the Merge Multiple PDF files into Single PDF action. Configure these parameters to control PDF merging.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
PDF Files***ArrayInput PDF Collection
• Collection of PDF files to be merged into a single document
• Each file can be provided as binary data, base64 string, or URL
• Support for multiple input formats
Array of PDFs
Input Type***StringInput Format Selection
• Choose the format for each PDF file input
• PDF4me supports multiple input types for flexible processing
• Options: Binary Data, Base64 String, or URL
Binary Data
Binary Property NameStringBinary Data Reference (Required if Binary Data)
• Specify the property name for accessing binary PDF data
• Should match the binary data property name in your workflow
• Required when Input Type is "Binary Data"
data
Base64 Document ContentStringBase64 Encoded PDF Input (Required if Base64 String)
• Provide PDF data as base64 encoded string
• PDF4me automatically decodes and processes the PDF content
• Required when Input Type is "Base64 String"
UEsDBBQABgAI...
File URLStringPublic PDF URL Input (Required if URL)
• Provide a public/open permission URL to the PDF file
• PDF4me downloads and processes the file from the provided URL
• Required when Input Type is "URL"
https://abc.com/sample.pdf
Output File Name***StringMerged PDF Output Filename
• Specify the name for the generated merged PDF file
• Must include .pdf extension
• PDF4me ensures unique naming and format validation
merged_output.pdf
Document Name***StringDocument Reference
• Specify a reference name for the merged document
• Used for tracking and identification purposes
• Helps with workflow organization
merged_output
Binary Data Output Name***StringBinary Data Mapping
• Define the variable name for accessing generated merged PDF binary data
• Used in subsequent workflow actions
• Essential for workflow data flow
data

Advanced Options

The following parameters are available in the Advanced Options section and are optional:

ParameterTypeDescriptionExample
Custom ProfilesStringNoPDF4me custom configuration profiles - Set additional options for the PDF4me Merge Multiple PDFs operation using custom profiles. A custom profile is a string in JSON-like format containing predefined parameters for advanced merge settings. Supports options like outputDataFormat, preserveMetadata, optimizeForPrinting, compressionLevel, and colorSpaceOptimization

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringPDF4me generated merged PDF filename - The complete filename of the successfully generated merged PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesmerged_output.pdf
mimeTypeStringPDF4me output MIME type - MIME type of the generated PDF file, always "application/pdf" for PDF documents. Useful for content type validation and proper file handling in web applicationsapplication/pdf
fileSizeNumberPDF4me merged PDF file size in bytes - The exact size of the generated merged PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation5417
successBooleanPDF4me merge operation status indicator - Boolean flag indicating the success or failure of the PDF merge process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
inputFileCountNumberPDF4me input files processed count - The number of individual PDF files that were successfully processed and merged into the final document. Useful for verifying that all intended files were included in the merge operation2

N8N Action Response

The PDF4me Merge Multiple PDFs API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"fileName": "merged_output.pdf",
"mimeType": "application/pdf",
"fileSize": 5417,
"success": true,
"inputFileCount": 2
}
]

Use Cases

Document Consolidation and Archiving

  • Combine multiple related PDF documents into a single comprehensive file for easier storage and management
  • Merge quarterly reports, invoices, or contracts into organized collections for archival purposes
  • Consolidate scattered documents from different sources into unified project files

Report Generation and Compilation

  • Automatically merge individual report sections from different team members into a complete final report
  • Combine data exports, charts, and analysis documents into comprehensive business reports
  • Create unified documentation packages by merging related technical specifications and user guides

Workflow Automation and Batch Processing

  • Automate the merging of daily, weekly, or monthly document batches in enterprise workflows
  • Combine multiple form submissions or applications into consolidated processing files
  • Merge related documents from different departments or systems into unified records for compliance and auditing

Get Help