Skip to main content

Unlock PDF using n8n action

PDF4me Unlock PDF removes passwords and restrictions from protected PDF documents through n8n automation workflows. Process password-protected PDFs via n8n triggers, binary data, base64 strings, or public URLs by providing the correct password to unlock documents, remove encryption, eliminate permission restrictions, and restore full document access for editing and processing. This solution is ideal for authorized PDF unlocking, document access restoration, legacy PDF processing, permission removal, workflow integration, and automated PDF unlocking that require password-based security removal with full access restoration and seamless integration.

Setup

Add the PDF4me "Unlock PDF" 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 "Unlock PDF" action
  3. Configure input parameters (see below)
Unlock PDF

Parameters

Complete list of parameters for the Unlock PDF action. Configure these parameters to control PDF unlocking.

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

ParameterTypeDescriptionExample
Input Data Type***StringPDF Input Format Selection
• Choose the format of your PDF data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary FieldBinaryBinary PDF File Input (Required if Binary Data)
• Reference PDF file from previous n8n node or file upload
• PDF4me processes binary PDF files with automatic format detection
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Document ContentStringBase64 Encoded PDF Input (Required if Base64 String)
• Provide PDF data as base64 encoded string
• PDF4me automatically decodes and processes the PDF content
• Required when Input Data Type is "Base64 String"
UEsDBBQABgAI...
File URLStringPublic PDF URL Input (Required if URL)
• Provide a public/open permission URL to the PDF file
• PDF4me downloads and processes the file from URL
• Required when Input Data Type is "URL"
https://abc.com/sample.pdf
Output File Name***StringUnlocked PDF Output Filename
• Specify the name for the generated unlocked PDF file
• Must include .pdf extension
• PDF4me ensures unique naming and format validation
unlocked_output.pdf
Password***StringDocument Password
• Provide the password for the protected PDF document
• Password used to unlock and remove security restrictions
• Must match the original protection password
SecurePassword123!
Binary Data Output Name***StringBinary Data Mapping
• Define the variable name for accessing generated unlocked PDF data
• Used in subsequent workflow actions
• Essential for workflow data flow
data

Advanced Options

The following parameters are available in the Advanced Options section and are optional:

ParameterTypeDescriptionExample
Custom ProfilesStringCustom Configuration Profiles
• Set additional options using custom profiles
• JSON-like format containing predefined parameters
• Supports outputDataFormat, preserveMetadata, etc.
• Optional for specialized requirements
{ "outputDataFormat": "json", "preserveMetadata": true, "optimizeForPrinting": false, "compressionLevel": "medium" }

Output

Output Parameters

ParameterTypeDescriptionExample
successBooleanPDF4me unlock status indicator - Boolean flag indicating the success or failure of the PDF unlock process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
messageStringPDF4me unlock status message - Human-readable status message providing details about the unlock process result. Includes success confirmation or error details for troubleshootingPDF unlocked successfully
fileNameStringPDF4me generated PDF filename - The complete filename of the successfully generated unlocked PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesunlocked_output.pdf
mimeTypeStringPDF4me output MIME type - MIME type of the generated PDF file, always "application/pdf" for PDF documents. Useful for content type validation and proper file handling in web applicationsapplication/pdf
fileSizeNumberPDF4me PDF file size in bytes - The exact size of the generated unlocked PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation125430
docNameStringPDF4me document name reference - The name of the processed document for reference and tracking purposes. This matches the fileName for consistency in document management workflowsunlocked_output.pdf
isUnlockedBooleanPDF4me unlock status confirmation - Boolean flag confirming that the PDF document has been successfully unlocked and security restrictions removed. Useful for verifying that unlocking was applied correctlytrue
securityRemovedBooleanPDF4me security removal confirmation - Boolean flag confirming that password protection and access restrictions have been completely removed from the PDF documenttrue

N8N Action Response

The PDF4me Unlock PDF 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 unlocked successfully",
"fileName": "unlocked_output.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"docName": "unlocked_output.pdf",
"isUnlocked": true,
"securityRemoved": true
}
]

Use Cases

Document Accessibility and Processing

  • Unlock password-protected documents for automated processing and content extraction
  • Remove security restrictions to enable document editing, conversion, and manipulation
  • Improve document accessibility for users with assistive technologies and screen readers

Legacy Document Management

  • Unlock old password-protected documents for migration to new document management systems
  • Remove outdated security restrictions that are no longer needed or relevant
  • Enable bulk processing of previously protected document archives and repositories

Workflow Integration and Automation

  • Automate document unlocking as part of business process workflows
  • Enable seamless document processing in automated systems and applications
  • Remove security barriers that prevent integration with third-party tools and services

Get Help