Repair PDF Document in Power Automate
Repair PDF Document is a Power Automate action by PDF4me 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 action does
PDF4me Repair PDF Document takes a corrupted or damaged PDF, map its binary content from any previous Power Automate step, 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 (iLovePDF, Adobe's repair page, Sejda), except it runs unattended inside a flow triggered by an email attachment, a SharePoint upload, or a failed file transfer.
How Do I Authenticate My Power Automate Flow?
To call PDF4me through Power Automate, the flow needs a valid PDF4me API key on the PDF4me Connect connector. Authentication ensures secure communication and validates your identity as an authorized user.
Important Facts You Should Not Miss
File Content and File Name.
The action's only two fields: File Content and File Name. Authentication happens via the connector's own sign-in shown at the bottom of the panel.
Automated Repair (Power Automate) 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 Power Automate | Email arrival, SharePoint upload, or file-transfer event | Recurring corruption on incoming attachments, archives, or transfers, with no manual step |
Parameters
Required in the action: both File Content and File Name. There are no Optional or Advanced parameters on this action.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| File Content | Required | The damaged or corrupted PDF's binary content, mapped from a previous action such as Get file content (SharePoint, OneDrive) or an email attachment. | File Content from Get file content |
| File Name | Required | The source file's name including the .pdf extension. Used for processing context and trace logging, not for the repair logic itself. | CorruptedFile.pdf |
How Do I Set Up Repair PDF Document in Power Automate?
- Add Repair PDF Document to your flow as a new step.
- Sign in to PDF4me Connect with your API key.
- Map File Content from a previous action that returns the corrupted PDF's binary bytes (Get file content from SharePoint, OneDrive, or an email attachment).
- Set File Name to the source file's name with the
.pdfextension. - Run the flow. The action returns the repaired File Content.
- Route the output to SharePoint Create file, OneDrive Create file, or a validation step (Get PDF Information) before further processing.
Output
| Field | Type | Description |
|---|---|---|
| File Content | Binary | The repaired PDF file with structural errors fixed and readable content restored wherever recoverable. |
Typical Setups
- Trigger when an email with a PDF attachment arrives.
- Attempt to open or process the attachment; detect the failure.
- Run Repair PDF Document on the attachment bytes.
- If repair succeeds, continue normal processing; otherwise notify the sender.
- Trigger on a recurring schedule (weekly or monthly).
- Retrieve archived PDFs from a SharePoint library.
- Apply to each file: validate integrity, repair when damaged.
- Replace the archived copy with the repaired version and log the result.
- Trigger when a PDF is uploaded from an external system.
- Check whether the file opens or validates correctly.
- Run Repair PDF Document if it fails validation.
- Continue processing on success, or request a retransmission on failure.
Practical Tips
Chain Get PDF Information or a follow-up open attempt after the action so the flow can detect a file that is still broken and branch to a fallback path.
If a file is both password-protected and corrupted, run a PDF4me unlock action first. Repair PDF Document does not remove encryption.
Store the source file next to the repaired output, at least until the repair is confirmed, so you can compare or retry with a different approach if recovery is incomplete.
The repair operates entirely on File Content. File Name exists for logging and downstream naming, it does not need to match the original file's real name.
When validation after repair still fails, route the flow to an alert (email, Teams message, or a logged incident) instead of letting the file disappear from the process silently.
Cheat Sheet
| Scenario | File Content source | Follow-up step |
|---|---|---|
| Corrupted email attachment | Get attachment (Outlook/Exchange trigger) | Validate, then reply to sender on failure |
| Damaged SharePoint file | Get file content (SharePoint) | Overwrite the library item after validation |
| Failed external transfer | Get file content (HTTP/FTP connector) | Retry request to source system on failure |
| Scheduled archive sweep | Apply to each over a file list | Log repaired vs unrecoverable counts |