Skip to main content

Protect Document using n8n action

PDF4me Protect Document adds password protection and permission controls to PDF documents through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to apply user/owner passwords, restrict permissions (printing, copying, editing, annotations), implement encryption levels (40-bit, 128-bit, 256-bit AES), and configure granular access controls for document security. This solution is ideal for confidential document protection, access control, compliance requirements, intellectual property protection, secure distribution, and automated PDF security workflows that require robust encryption with flexible permission management and seamless integration.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

Setup​

Add the PDF4me "Protect Document" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Protect Document" action
  3. Configure input parameters (see below)
Protect Document

Parameters​

Complete list of parameters for the Protect Document action. Configure these parameters to control document protection.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterRequiredWhat it doesExample
Input Data TypeRequiredChoose how to provide the PDF file to protect. Options: Base64 String, Binary Data, URL. Default is `Binary Data`.Binary Data
Base64 PDF ContentConditionalBase64 encoded PDF document content. Shown when Input Data Type is Base64 String.UEsDBBQABgAI...
Input Binary FieldConditionalName of the binary property that contains the PDF file (usually "data" for file uploads). Shown when Input Data Type is Binary Data. Default is `data`.data
PDF URLConditionalURL to the PDF file to protect. Shown when Input Data Type is URL.
Output File NameOptionalName for the output protected PDF file. Default is `protected_output.pdf`.protected_output.pdf
PasswordOptionalPassword to protect the PDF. Default is `1234`.1234
PDF PermissionOptionalPermissions to allow on the protected PDF. Options: All, Assemble, Comment, Copy, Edit, Fill Forms, Print. Default is `All`.All
Binary Data Output NameOptionalCustom name for the binary data in n8n output. Default is `data`.data

Output​

Output Parameters​

FieldTypeWhat it contains
dataBinaryThe password-protected PDF. The item's JSON is empty: the node returns no fields.

N8N Action Response​

The PDF4me Protect Document API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"success": true,
"message": "PDF protected successfully",
"fileName": "protected_output.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"docName": "protected_output.pdf",
"isProtected": true,
"permissionLevel": "All"
}
]

Use Cases​

Document Security and Compliance​

  • Protect sensitive business documents with password encryption and access controls
  • Ensure compliance with data protection regulations and security standards
  • Secure confidential reports, contracts, and financial documents from unauthorized access

Enterprise Document Management​

  • Automate document protection in business workflows and approval processes
  • Control access permissions for different user groups and departments
  • Implement security policies across large document repositories and archives

Content Distribution and Sharing​

  • Protect intellectual property and proprietary content during distribution
  • Control how recipients can use shared documents (view-only, print restrictions)
  • Secure document sharing with external partners and clients while maintaining control

Get Help​