Secure Word Document in n8n
Secure Word Document is a PDF4me node action in n8n that locks a .docx file with a password, an editing restriction, or both. Use it to protect confidential reports before they are sent, keep a signed template from being altered, or let reviewers comment on a contract without changing its text.
What this node does
PDF4me Word: Secure Word Document applies two independent kinds of protection. Secure On Open plus Open Password decides whether the file opens at all. Protection Type plus Protection Password decides what may be changed once it is open, from fully read-only to comments, form fields, or tracked revisions only. Use either, or both together.
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 document security requests.
Important Facts You Should Not Miss

Secure On Open is a toggle, and Protection Type is a separate dropdown set to Read Only here. The two password fields beneath them are independent of each other.
Open Password vs Editing Restriction
| Question | Open password | Editing restriction |
|---|---|---|
| Which fields set it | Secure On Open and Open Password | Protection Type and Protection Password |
| What it blocks | Opening the document at all | Changing the document once open |
| Can the recipient read it | Only with the password | Yes, reading is always allowed |
| Typical recipient | A named person receiving something confidential | A reviewer or a form filler |
| Use it when | The content must not be seen by others | The content may be seen but not altered |
What Parameters Does Secure Word Document Need?
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Credential to connect with | Required | The PDF4me account credential the node authenticates with. | PDF4ME account |
| Operation | Required | The action this node performs. Select Secure Word Document. | Secure Word Document |
| Word File Input Method | Required | How the .docx reaches the node: from the previous node as binary data, as a Base64 string, or from a URL. | From Previous Node (Binary Data) |
| Binary Data Property Name | Conditional | Name of the binary property holding the document. Appears when the file comes from the previous node. | data |
| Document Name | Required | Filename of the input document including the extension. Drives format detection. | document.docx |
| Secure On Open | Optional | Toggle that requires a password before the document will open. Leave off if you only want an editing restriction. | enabled |
| Open Password | Conditional | The password needed to open the file. Required once Secure On Open is enabled. Supply it through an expression, not as literal text. | {{ $env.DOC_OPEN_PW }} |
| Protection Type | Optional | Editing restriction applied to the document: Read Only, Allow Comments, Allow Form Fields, or Allow Revisions. | Read Only |
| Protection Password | Conditional | The password that lifts the editing restriction. Required once a Protection Type is chosen, and should differ from Open Password. | {{ $env.DOC_EDIT_PW }} |
| Output File Name | Optional | Filename of the returned secured document. Keep the .docx extension. | secured_document.docx |
| Output Binary Data Name | Optional | Binary property the secured document is written to. Leave as data unless a later node expects another name. | data |
Protection Type options
| Option | What the recipient can do |
|---|---|
Read Only | View the document only. No edits of any kind are accepted. |
Allow Comments | Add and edit comments, but not change the document text itself. |
Allow Form Fields | Fill in form fields while the surrounding content stays locked. |
Allow Revisions | Edit, but only with tracked changes recorded so every alteration is visible. |
Output
| Field | Type | What it contains |
|---|---|---|
| fileName | String | Name of the returned secured document. |
| fileSize | Number | Size of the secured document in bytes. |
| success | Boolean | Whether protection was applied. Branch on this so failures surface as alerts. |
| originalFileName | String | Name of the input document as supplied in Document Name. |
| secureOnOpen | Boolean | Whether an open password was applied, echoed back for verification. |
| protectionType | String | The editing restriction applied, such as ReadOnly, or empty when none was set. |
| message | String | Human-readable status text describing the result of the operation. |
Checking protectionType in the response is the cheapest way to confirm the restriction you intended is the one that actually landed.
How Do I Set Up Secure Word Document in n8n?
- Add the PDF4me Word node to your workflow and set Operation to Secure Word Document.
- Select your PDF4me credential, or create one and paste your API key.
- Pick a Word File Input Method and supply the
.docxthrough the field beneath it. - Set Document Name with the correct extension.
- To gate opening, turn on Secure On Open and set Open Password from a credential or environment variable.
- To gate editing, set Protection Type and supply a different Protection Password.
- Set Output File Name ending in
.docx. - Execute the node, confirm
secureOnOpenandprotectionTypein the response, then route the secured file onward.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Secure Word Document.
- A reporting step produces a document with sensitive figures.
- Secure On Open applies a password held in an environment variable.
- The file is emailed, and the password is shared over a separate channel.
- Protection Type is set to Allow Comments.
- Reviewers annotate without altering any clause text.
- Feedback arrives without a diff to reconcile afterwards.
- Allow Form Fields keeps the surrounding wording fixed.
- Recipients complete only the fields intended for them.
- Returned forms are consistent enough to parse automatically.
- A template is approved and published to a shared drive.
- Read Only protection prevents silent local edits.
- Everyone works from the same authoritative wording.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Operation | Secure Word Document |
| Word File Input Method | From Previous Node (Binary Data) |
| Binary Data Property Name | data |
| Document Name | document.docx |
| Secure On Open | enabled |
| Open Password | {{ $env.DOC_OPEN_PW }} |
| Protection Type | Read Only |
| Protection Password | {{ $env.DOC_EDIT_PW }} |
| Output File Name | secured_document.docx |
| Output Binary Data Name | data |