Overlay PDFs in n8n
Overlay PDFs is a PDF4me node action in n8n that places one PDF on top of another, combining both onto the same pages instead of appending them. Use it to stamp a designed letterhead over generated content, apply a certificate frame, or lay an approved template across an incoming document without adding a single page.
What this node does
PDF4me: Overlay PDFs takes two PDFs, a base that acts as the background and a layer that sits on top, and returns a single document where both appear on the same pages. Each file has its own input type, so the base can come from a previous node as Binary Data while the layer is pulled from a URL. Unlike merging, the page count does not grow, which is what makes it the right tool for letterheads, frames, and template stamps.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate overlay requests securely.
Important Facts You Should Not Miss

PDF4me Overlay PDFs parameters panel in n8n, with both input types set to Binary Data
Overlay vs Merge vs Watermark
Three ways to bring extra content into a PDF, each producing a different document.
| Approach | Effect on the pages | Best fit |
|---|---|---|
| Overlay PDFs | Both documents appear on the same pages, page count unchanged | Branding that already exists as a designed PDF, such as a letterhead or certificate frame |
| Merge PDFs | Documents follow one another, page counts add up | Content that genuinely belongs in sequence as one longer document |
| Add watermark | Simple text or a single image drawn onto the existing pages | A short notice such as DRAFT or CONFIDENTIAL, where no designed PDF layer exists |
What Parameters Does Overlay PDFs Need?
Required: Action, both input types, the source field matching each input type, and Output File Name. Binary Data Output Name and anything under Advanced Options carry working defaults.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Action | Required | Selects the PDF4me node action to run. Choose Overlay PDFs. | Overlay PDFs |
| Base PDF Input Type | Required | Format of the background PDF. Choose Binary Data, Base64 String, or URL. Independent of the layer setting. | Binary Data |
| Layer PDF Input Type | Required | Format of the PDF placed on top. Choose Binary Data, Base64 String, or URL. Independent of the base setting. | Binary Data |
| Base PDF Binary Field | Conditional | Name of the binary property holding the base PDF. Required when Base PDF Input Type is Binary Data. | data |
| Layer PDF Binary Field | Conditional | Name of the binary property holding the layer PDF. Required when Layer PDF Input Type is Binary Data. | data |
| Base PDF Base64 Content | Conditional | Base64-encoded content of the base PDF. Required when Base PDF Input Type is Base64 String. | JVBERi0xLjQK... |
| Layer PDF Base64 Content | Conditional | Base64-encoded content of the layer PDF. Required when Layer PDF Input Type is Base64 String. | JVBERi0xLjQK... |
| Base PDF File URL | Conditional | Publicly reachable HTTPS URL to the base PDF. Required when Base PDF Input Type is URL. | https://example.com/base.pdf |
| Layer PDF File URL | Conditional | Publicly reachable HTTPS URL to the layer PDF. Required when Layer PDF Input Type is URL. | https://example.com/letterhead.pdf |
| Output File Name | Required | Filename for the combined PDF. Include the .pdf extension. | overlayed_output.pdf |
| Binary Data Output Name | Optional | Name of the binary property the output item exposes. Defaults to data. | data |
| Advanced Options | Optional | Collection for extra processing settings, added with Add Option. Leave empty unless you have a specific requirement. | No properties |
Output Fields
A successful run returns one n8n item carrying the combined PDF.
| Field | Type | What it contains |
|---|---|---|
Binary (data) | Binary | The combined PDF with the layer placed over the base, under Binary Data Output Name (default data). |
fileName | String | Generated filename, matching Output File Name. |
mimeType | String | MIME type of the output, always application/pdf. |
fileSize | Number | Size of the combined PDF in bytes. |
docName | String | Document name reference for the processed file, matching fileName. |
overlayCompleted | Boolean | Confirms the overlay operation finished, useful as an explicit check that the layer was applied. |
layersProcessed | Number | Count of PDF layers combined into the final document. |
success | Boolean | True when the operation completed, false on failure. Use it to branch error handling. |
message | String | Human-readable status message, carrying success confirmation or error detail. |
How Do I Set Up Overlay PDFs in n8n?
- Add PDF4me to your n8n workflow and choose the Overlay PDFs action.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Base PDF Input Type and Layer PDF Input Type. They are independent, so each file can arrive differently.
- Fill in the matching source fields, for example Base PDF Binary Field and Layer PDF Binary Field, both defaulting to
data. - Set Output File Name (must end in
.pdf). - Execute the node and route the combined PDF, exposed under Binary Data Output Name, into the next step.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Overlay PDFs.
- A document is generated from a template with no branding.
- Overlay PDFs applies the approved letterhead PDF fetched from a URL as the layer.
- The branded result is sent out without a designer touching it.
- Course completion data produces a plain PDF with the recipient name.
- Overlay PDFs places the designed certificate border over it.
- Each finished certificate is emailed to its recipient.
- A document completes an approval step in the workflow.
- Overlay PDFs applies a pre-designed approved stamp layer.
- The stamped copy is filed to the record system.
- A Loop Over Items node iterates a folder of incoming supplier documents.
- Overlay PDFs applies the same layer PDF from a URL to each one.
- Every document enters the archive with consistent framing.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Overlay PDFs |
| Base PDF Input Type | Binary Data |
| Layer PDF Input Type | Binary Data |
| Base PDF Binary Field | data |
| Layer PDF Binary Field | data |
| Output File Name | overlayed_output.pdf |
| Binary Data Output Name | data |
| Advanced Options | No properties |
| Credentials | PDF4me API credential |