0CodeKit icon

0CodeKit

A toolbox of no-code utilities

PDF → PDF Merge

AI-generated

Overview

The PDF Merge operation in the custom n8n node allows users to combine multiple PDF files into a single document. This is particularly useful for workflows that require consolidating reports, invoices, or any set of PDFs into one file for easier sharing, archiving, or further processing. For example, you could merge several monthly statements into a quarterly report, or combine scanned pages into a single document.

Properties

Name Meaning
Files to Merge A collection of files to be merged. Each entry includes:
- File Url or Binary Data: The source of the PDF, either as a URL or raw binary data.
- Page Ranges (optional): Specify which pages to include from each file.
Get File as URL Whether to return the merged PDF as a downloadable URL (true) or as binary data within the workflow (false).

Output

  • The output will contain the merged PDF file.
    • If Get File as URL is true, the output will include a field with a URL pointing to the merged PDF.
    • If Get File as URL is false, the output will include the binary data of the merged PDF directly.
  • Additional metadata may be present depending on the API response, but the primary output is the merged PDF file (either as a URL or binary).

Dependencies

  • External Service: Requires access to the CodeKit API service.
  • API Key: You must configure the codeKitApi credential in n8n for authentication.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Invalid File Source: If a provided file URL is inaccessible or the binary data is malformed, the merge may fail.
    • Incorrect Page Ranges: Specifying page ranges outside the actual number of pages in a PDF can cause errors.
    • Large Files: Merging very large PDFs or many files at once may result in timeouts or memory issues.
  • Error Messages:

    • "error: <message>": If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message. Check the message for details such as invalid URLs, unsupported formats, or API errors.
    • Authentication Errors: If credentials are missing or incorrect, you may receive an authentication/authorization error from the API.

    How to resolve:

    • Double-check all file URLs and ensure they are accessible.
    • Verify that binary data inputs are valid PDFs.
    • Ensure your API credentials are correctly configured in n8n.

Links and References

Discussion