跳到主要内容

安全的 Word 文档 n8n

安全的 Word 文档 是一个 PDF4me 节点操作 n8n 锁定 .docx 使用密码、编辑限制或两者兼备的方式创建文件。可用于在发送机密报告前对其进行保护,防止已签署的模板被篡改,或允许审阅者在不更改合同文本的情况下对其进行评论。

此节点的功能

PDF4me Word: 安全的 Word 文档 适用 两种独立的保护安全开启打开密码 决定文件是否打开。 保护类型保护密码 决定打开后可以更改的内容,从完全只读到仅允许评论、表单字段或跟踪修订。可以使用其中一项或两项,也可以同时使用。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

验证您的身份 API 要求

每一个 PDF4me 节点 n8n 需要有效 用于连接的凭证创建或选择一个可以容纳您的 PDF4me API 关键在于工作流能够验证文档安全请求。

您不容错过的重要事实

两个密码,两份不同的工作
打开密码控制文件访问权限。保护密码控制文件编辑。如果将它们设置为相同的值,编辑者将同时拥有这两个密码,这就失去了限制的意义。
切勿在节点中输入密码
直接输入的任何内容都会保存到已保存的工作流程中。 JSON该文件会被导出,并且通常会提交到 Git。使用读取凭据或环境变量的表达式。
保护措施已生效,不可恢复。
此操作可增强安全性。如果密码丢失,则无法通过此节点恢复密码,因此请在工作流大规模运行之前存储这两个值。
在 n8n 中,PDF4me Word 节点的操作设置为“安全 Word 文档”,Word 文件输入方式设置为“来自上一个节点”,“打开时安全”已启用,保护类型设置为“只读”,输出文件名设置为 secure_document.docx。

“打开时启用”是一个切换开关,“保护类型”是一个单独的下拉菜单,此处设置为“只读”。它们下方的两个密码输入框彼此独立。

开放密码与编辑限制

问题打开密码编辑限制
Which fields set itSecure On Open and Open PasswordProtection Type and Protection Password
What it blocksOpening the document at allChanging the document once open
Can the recipient read itOnly with the passwordYes, reading is always allowed
Typical recipientA named person receiving something confidentialA reviewer or a form filler
Use it whenThe content must not be seen by othersThe content may be seen but not altered

安全有哪些参数? Word 需要文件吗?

范围必需的它的作用例子
Credential to connect withRequiredThe PDF4me account credential the node authenticates with.PDF4ME account
OperationRequiredThe action this node performs. Select Secure Word Document.Secure Word Document
Word File Input MethodRequiredHow 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 NameConditionalName of the binary property holding the document. Appears when the file comes from the previous node.data
Document NameRequiredFilename of the input document including the extension. Drives format detection.document.docx
Secure On OpenOptionalToggle that requires a password before the document will open. Leave off if you only want an editing restriction.enabled
Open PasswordConditionalThe 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 TypeOptionalEditing restriction applied to the document: Read Only, Allow Comments, Allow Form Fields, or Allow Revisions.Read Only
Protection PasswordConditionalThe 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 NameOptionalFilename of the returned secured document. Keep the .docx extension.secured_document.docx
Output Binary Data NameOptionalBinary property the secured document is written to. Leave as data unless a later node expects another name.data

保护类型选项

选项接收者可以做什么
Read OnlyView the document only. No edits of any kind are accepted.
Allow CommentsAdd and edit comments, but not change the document text itself.
Allow Form FieldsFill in form fields while the surrounding content stays locked.
Allow RevisionsEdit, but only with tracked changes recorded so every alteration is visible.

输出

场地类型它包含什么
fileNameStringName of the returned secured document.
fileSizeNumberSize of the secured document in bytes.
successBooleanWhether protection was applied. Branch on this so failures surface as alerts.
originalFileNameStringName of the input document as supplied in Document Name.
secureOnOpenBooleanWhether an open password was applied, echoed back for verification.
protectionTypeStringThe editing restriction applied, such as ReadOnly, or empty when none was set.
messageStringHuman-readable status text describing the result of the operation.

检查 protectionType 回复是确认您所期望的限制是否实际生效的最经济的方式。

如何设置安全 Word 文档 n8n

  1. 添加 PDF4me Word 将节点添加到您的工作流程并设置 手术安全的 Word 文档
  2. 选择您的 PDF4me 或者创建一个凭证并粘贴您的凭证 API 钥匙。
  3. 选择一个 Word 文件输入法 并提供 .docx 穿过它下面的田野。
  4. 文档名称 使用正确的扩展名。
  5. 要打开大门,请打开 安全开启 并设置 打开密码 从凭据或环境变量中获取。
  6. 要限制编辑,请设置 保护类型 并提供不同的 保护密码
  7. 输出文件名 以……结尾 .docx
  8. 执行节点,确认 secureOnOpenprotectionType 在响应中,将加密文件路由下去。

典型配置

工作流程示例Common n8n workflow patterns using Secure Word Document.
发送一份保密报告
  1. 报告步骤会生成包含敏感数据的文档。
  2. Secure On Open 会应用保存在环境变量中的密码。
  3. 文件通过电子邮件发送,密码通过另一个渠道共享。
分发征求意见稿
  1. 保护类型设置为允许评论。
  2. 审阅者在不更改任何条款文本的情况下进行注释。
  3. 反馈信息到达时没有差异需要事后协调。
分发可填写表格
  1. 允许表单字段会保持周围的文字不变。
  2. 收件人只需填写分配给他们的字段。
  3. 返回的表单足够一致,可以自动解析。
锁定已批准的模板
  1. 模板已获批准并发布到共享驱动器。
  2. 只读保护可防止静默本地编辑。
  3. 所有人都依据同一份权威措辞进行工作。

实用技巧

Keep passwords out of the workflow
An expression reading a credential or environment variable keeps the secret out of exported workflow JSON and out of version control.
Use different values for the two passwords
Reusing one value means anyone who can open the file can also unlock editing, which removes the distinction you set up.
Pick the least restrictive type that works
Allow Comments or Allow Revisions often serves a review better than Read Only, because reviewers can still express changes.
Verify protectionType in the response
The echoed value confirms the restriction landed as intended, which is faster than opening a sample in Word every run.
Secure last in the chain
Watermarking, merging, and header updates all need an editable file. Apply protection after those steps, not before.
Record the passwords before scaling up
This action applies protection and offers no recovery. Store both values in your secret manager before running it across a batch.

速查表

场地价值
OperationSecure Word Document
Word File Input MethodFrom Previous Node (Binary Data)
Binary Data Property Namedata
Document Namedocument.docx
Secure On Openenabled
Open Password{{ $env.DOC_OPEN_PW }}
Protection TypeRead Only
Protection Password{{ $env.DOC_EDIT_PW }}
Output File Namesecured_document.docx
Output Binary Data Namedata

常见问题

What is the difference between the open password and the protection password?+
The open password gates the file itself: without it the document will not open at all. The protection password gates editing: the document opens for anyone but stays restricted until that second password is entered. They are separate fields and should hold different values, because a recipient who needs to read but not edit should only ever receive the first one.
What do the Protection Type options do?+
Read Only stops edits entirely. Allow Comments permits commenting but no text changes. Allow Form Fields permits filling fields while the rest stays locked. Allow Revisions permits editing only with tracked changes recorded. Microsoft describes the equivalent desktop behaviour under restricting changes in Word.
Where should I store the passwords in n8n?+
Not in the node. A password typed directly into either field is saved inside the workflow JSON, which gets exported, shared, and often committed to version control. Reference an n8n credential or an environment variable through an expression so the secret stays out of the workflow definition.
Can I apply both an open password and an editing restriction at once?+
Yes. Secure On Open and Protection Type are independent, so a document can require a password to open and still be read-only afterwards. That combination suits a confidential document a named recipient may read but nobody may alter.
How do I remove the protection later?+
Editing restrictions are lifted in Word by supplying the protection password, and the open password is entered when the file is opened. Keep both values in your secret store rather than relying on memory, because this action applies protection and there is no recovery path through it if the passwords are lost.

相关操作

在其他平台上执行相同任务

获取帮助