Unlock Excel File and Remove Protection in n8n
Unlock File is a PDF4me Excel operation in n8n that strips password protection from an .xlsx workbook at three independent levels: file encryption, workbook structure, and worksheet protection. Use it to open protected templates, prepare files for automated data writes, or clear passwords before archiving, without opening Excel.
What this node does
PDF4me Excel: Unlock File removes Excel protection in one pass. It clears the open password (file encryption), the workbook structure lock that prevents sheets being added, deleted, or renamed, and optionally the worksheet protection that prevents cells and formulas being edited. Passwords you supply are reused as fallbacks across layers, so a workbook secured with a single password usually needs only one field filled in.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one holding your PDF4me API key so the workflow can authenticate unlock requests securely.
Important Facts You Should Not Miss

PDF4me Excel Unlock File parameters panel in n8n
Which Excel Protection Does Each Field Remove?
Excel applies protection at three separate levels, and they are easy to confuse. This table maps each one to what it blocks and which field clears it.
| Protection level | What it blocks | Field that clears it |
|---|---|---|
| File encryption | The workbook cannot be opened at all without a password. Excel prompts before any content is visible. | File Encryption Password |
| Workbook structure | Sheets cannot be added, deleted, renamed, moved, hidden, or unhidden, though existing cells stay editable. | Workbook Protection Password |
| Worksheet protection | Cells, formulas, and objects on a sheet cannot be edited, though the file opens and the structure is intact. | Unlock Worksheets toggle |
What Parameters Does Unlock File Need?
Required: Operation, Excel File Input Method, the input field matching that method, and Output File Name. The password fields are conditional, needed only for the protection levels actually present on the workbook. Unlock Worksheets, Culture Name, Source Document Name, and Output Binary Data Name are optional.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Operation | Required | Selects the PDF4me Excel action to run. Choose Unlock File. | Unlock File |
| Excel File Input Method | Required | How the workbook reaches the node. From Previous Node (Binary Data) reads it from an upstream item; the dropdown also offers base64 and file URL alternatives. | From Previous Node (Binary Data) |
| Binary Data Property Name | Conditional | Name of the binary property on the incoming n8n item holding the .xlsx workbook. Applies when the input method is binary data. Defaults to data. | data |
| File Encryption Password | Conditional | The password required to open the workbook. Supply it when the file is encrypted; it is also reused as a fallback against the other protection levels. | FilePass123 |
| Workbook Protection Password | Conditional | The password guarding workbook structure, which prevents sheets being added, deleted, renamed, or moved. Supply it when structure protection is set. | StructurePass |
| Unlock Worksheets | Optional | Toggle that extends the run to worksheet-level protection so cells, formulas, and objects become editable. Off by default. | true |
| Culture Name | Optional | Locale used while processing the workbook, relevant for locale-sensitive number and date formatting. | en-US |
| Output File Name | Required | Filename for the unlocked workbook the node returns. Include the .xlsx extension. | excel_unlocked.xlsx |
| Source Document Name | Optional | Reference label for the incoming workbook. Echoed back as originalFileName for tracking; it does not change the output. | myExcelFile.xlsx |
| Output Binary Data 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 JSON metadata plus the unlocked workbook as binary data.
| Field | Type | What it contains |
|---|---|---|
success | Boolean | True when protection was removed successfully. Use it to route error-handling branches. |
fileName | String | Filename of the unlocked workbook, matching Output File Name. |
fileSize | Number | Size of the returned workbook in bytes. |
originalFileName | String | The value supplied in Source Document Name, echoed back for tracking. |
message | String | Human-readable result message for the unlock operation. |
Binary (data) | Binary | The unlocked .xlsx under Output Binary Data Name (default data). Pass into Write Binary File, Email, or a cloud-storage upload. |
N8N Action Response
- JSON
- Schema
- Binary
JSON Response Format
[
{
"fileName": "excel_unlocked.xlsx",
"fileSize": 14234,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"message": "Excel document unlocked successfully"
}
]
Schema View
1 item
fileName: T excel_unlocked.xlsx
fileSize: # 14234
success: true
originalFileName: T myExcelFile.xlsx
message: T Excel document unlocked successfully
Type Indicators: T = String, # = Number.
Binary Data View
data
File Name: excel_unlocked.xlsx
File Extension: xlsx
Mime Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
File Size: 14.2 kB
Binary Data Access: reach the workbook at $binary.data.data, ready for download, email, or storage.
How Do I Set Up Unlock File in n8n?
- Add the PDF4me Excel node to your workflow and set Operation to Unlock File.
- In Credential to connect with, select your PDF4me API credential or create one with your API key.
- Set Excel File Input Method to From Previous Node (Binary Data) and set Binary Data Property Name to the property holding the workbook, normally
data. - Enter File Encryption Password if the workbook requires a password to open.
- Enter Workbook Protection Password if the sheet structure is locked.
- Switch on Unlock Worksheets if cells and formulas also need to become editable.
- Optionally set Culture Name for locale-sensitive workbooks.
- Set Output File Name ending in
.xlsx, execute the node, and route the unlocked workbook onward.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Unlock File for Excel.
- A workflow pulls a locked reporting template from SharePoint.
- Unlock File clears the structure lock so new sheets can be added.
- PDF4me Excel Add Rows writes the period figures into the workbook.
- A Schedule Trigger collects workbooks due for long-term storage.
- Unlock File removes the open password so the archive stays readable later.
- The cleared files are written to the archive bucket.
- An email trigger receives a protected price list from a supplier.
- Unlock File runs with Unlock Worksheets on so cell values can be parsed.
- The rows are extracted and synced into an internal database.
- Unlock File removes protection from an approved workbook.
- Downstream nodes update figures and refresh a summary sheet.
- PDF4me Excel Secure Excel reapplies a password before redistribution.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Operation | Unlock File |
| Excel File Input Method | From Previous Node (Binary Data) |
| Binary Data Property Name | data |
| File Encryption Password | (only if the file needs a password to open) |
| Workbook Protection Password | (only if the sheet structure is locked) |
| Unlock Worksheets | off (on to make cells editable) |
| Culture Name | en-US |
| Output File Name | excel_unlocked.xlsx |
| Source Document Name | myExcelFile.xlsx |
| Output Binary Data Name | data |
| Credentials | PDF4me API credential |