Repair PDF Document in n8n
Repair PDF Document is a PDF4me node action in n8n that fixes structural errors in a corrupted or damaged PDF and recovers as much readable content as possible. Use it to rescue email attachments that will not open, restore damaged archive files, or recover documents broken by a failed transfer, all without a manual desktop repair tool.
What this node does
PDF4me: Repair PDF Document takes a corrupted or damaged PDF from Binary Data, a Base64 String, or a URL, and returns a rebuilt file with structural errors fixed and readable content recovered wherever the underlying data survives. It is the automated equivalent of the manual repair tools people reach for by hand, except it runs unattended inside a workflow triggered by an email attachment, a cloud storage upload, or a failed file transfer.
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 repair requests securely.
Important Facts You Should Not Miss

PDF4me Repair PDF Document parameters panel in n8n
Automated Repair (n8n) vs Manual Online Tools
Most PDF repair tools that rank for this term are manual, one-file-at-a-time web uploads. The comparison below is why an automation-platform angle differs from those results.
| Approach | Trigger | Best fit |
|---|---|---|
| Manual web tool (iLovePDF, Adobe, Sejda) | Person uploads one file by hand | A single one-off file you have open in front of you |
| PDF4me Repair PDF Document in n8n | Email arrival, cloud storage upload, or file-transfer event | Recurring corruption on incoming attachments, archives, or transfers, with no manual step |
What Parameters Does Repair PDF Document Need?
Required: Action, Input Data Type, and the field matching that input type. Output File Name, Async Processing, and Binary Data Output Name are all optional with working defaults.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Action | Required | Selects the PDF4me node action to run. Choose Repair PDF Document. | Repair PDF Document |
| Input Data Type | Required | Format of the source PDF input. Choose Binary Data (from a previous node), Base64 String, or URL. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property on the incoming n8n item that holds the damaged PDF. Required when Input Data Type is Binary Data. Defaults to data. | data |
| Base64 Document Content | Conditional | Base64-encoded content of the damaged PDF. Required when Input Data Type is Base64 String. | JVBERi0xLjQK... |
| File URL | Conditional | Publicly reachable HTTPS URL to the damaged PDF. Required when Input Data Type is URL. | https://example.com/corrupted.pdf |
| Output File Name | Optional | Filename for the repaired PDF output. Defaults to a generated name when left blank. Include the .pdf extension. | repaired.pdf |
| Async Processing | Optional | Runs repair in the background instead of holding the workflow execution open, useful for large or badly damaged files. | true |
| Binary Data Output Name | Optional | Name of the binary property the output item exposes. Defaults to data. | data |
Output Fields
A successful run returns one n8n item carrying the repaired binary PDF.
| Field | Type | What it contains |
|---|---|---|
Binary (data) | Binary | The repaired PDF with structural errors fixed and readable content restored wherever recoverable, 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 repaired PDF in bytes. |
How Do I Set Up Repair PDF Document in n8n?
- Add PDF4me to your n8n workflow and choose the Repair PDF Document action.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type to Binary Data (default), Base64 String, or URL and supply the matching damaged PDF field.
- Optionally set Output File Name (must end in
.pdf). - Enable Async Processing for large or badly damaged files if needed.
- Execute the node and route the repaired PDF, exposed under Binary Data Output Name, into the next step.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Repair PDF Document.
- An email trigger fires when a PDF attachment arrives.
- An attempt to process the attachment fails, indicating corruption.
- Repair PDF Document runs on the attachment bytes, then processing continues or a validation step confirms success.
- A Schedule Trigger runs weekly or monthly.
- Archived PDFs are retrieved and validated for integrity.
- Repair PDF Document runs on any file that fails validation, and the archive copy is replaced.
- A webhook receives a PDF from an external system.
- The file fails an open or validate check.
- Repair PDF Document runs with Async Processing on, and processing resumes on success.
- A Loop Over Items node iterates a list of document URLs from a database export.
- Repair PDF Document runs with Input Data Type URL and Async Processing enabled for reliability.
- Each repaired file is written to storage with the source record ID as filename.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Repair PDF Document |
| Input Data Type | Binary Data |
| Input Binary Field | data |
| Output File Name | repaired.pdf |
| Async Processing | true (for large or badly damaged files) |
| Binary Data Output Name | data |
| Credentials | PDF4me API credential |