Fill a PDF Form using n8n action
PDF4me Fill a PDF Form populates PDF form fields with structured data through n8n automation workflows. Process PDF forms via n8n triggers, binary data, base64 strings, or public URLs to automatically fill text fields, checkboxes, radio buttons, and dropdown menus using JSON data mapping with support for single document or batch processing modes. This solution is ideal for automated form completion, customer document generation, personalized forms, application processing, data population, and high-volume form workflows that require accurate field mapping with flexible data input and seamless integration.
Setup
Add the PDF4me "Fill a PDF Form" 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:
- Add PDF4me node to workflow
- Select "Fill a PDF Form" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Fill a PDF Form action. Configure these parameters to control form data filling.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| PDF Input Data Type*** | String | PDF Input Format Selection • Choose the format of your PDF form template input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field | Binary | Binary PDF File Input (Required if Binary Data) • Reference PDF file from previous n8n node or file upload • Works with any PDF form template • Required when PDF Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 PDF Content | String | Base64 Encoded PDF Input (Required if Base64 String) • Provide PDF content as base64 encoded string • Supports various PDF form formats • Required when PDF Input Data Type is "Base64 String" | JVBER... |
| PDF URL | String | Public PDF URL Input (Required if URL) • Provide a public/open permission URL to the PDF form template • Downloads and processes the form for data population • Required when PDF Input Data Type is "URL" | https://abc.com/temp.pdf |
| Data Type*** | String | Processing Mode Selection • Choose between single document or batch processing • Single Document: process one form at a time • Batch Processing: handle multiple forms efficiently | Single Document |
| Form Data (JSON)*** | String | Form Field Data Mapping • Provide structured JSON data with field names and values • Field names must match PDF form field names exactly • Essential for successful data mapping | {"name": "John", "email": "[email protected]"} |
| Output Type*** | String | Output Format Specification • Define the output format for the filled form • Currently supports PDF format • Maintains form structure and field properties | pdf |
| Input Data Type*** | String | Input Data Format • Specify the format of the input data being provided • Currently supports JSON format • For structured data mapping to form fields | json |
| Output File Name*** | String | Output Filename • Specify the name for the generated filled PDF form • Must include .pdf extension • PDF4me ensures unique naming and format validation | filled_form_output.pdf |
| Output Binary Field Name*** | String | Binary Data Mapping • Define the variable name for accessing generated filled PDF data • Used in subsequent workflow actions • Essential for workflow data flow | data |
| Meta Data | String | Additional Metadata • Provide optional metadata information • Can include processing timestamps, user information, custom identifiers • Associated with the filled form for document tracking | Processing timestamp: 2024-01-15 |
| Meta Data JSON | String | Structured Metadata • Provide structured metadata in JSON format • Supports complex metadata structures for enterprise workflows • Advanced document tracking and processing information | {"timestamp": "2024-01-15T10:30:00Z", "userId": "user123"} |
Advanced Options
The following parameters are available in the Advanced Options section and are optional:
| Parameter | Type | Description | Example |
|---|---|---|---|
| Custom Profiles | String | Custom Configuration Profiles • Set additional options using custom profiles • JSON-like format containing predefined parameters • Enables advanced form filling settings • Optional for specialized requirements | { "fieldValidation": true, "preserveFormatting": false } |
Form Data Structure
JSON Data Format
The Form Data (JSON) parameter accepts structured data in JSON format where field names correspond to PDF form field names:
{
"fieldName1": "value1",
"fieldName2": "value2",
"fieldName3": "value3"
}
Field Mapping Guidelines
| Aspect | Description | Best Practices |
|---|---|---|
| Field Names | Must exactly match PDF form field names | Use case-sensitive field names |
| Data Types | Supports strings, numbers, and booleans | Ensure data type compatibility |
| Special Characters | Escape special characters in JSON | Use proper JSON formatting |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | PDF4me generated filename - The complete filename of the successfully processed filled PDF form with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | filled_form_output.pdf |
| mimeType | String | PDF4me MIME type identifier - The standardized MIME type for the generated PDF file, always set to application/pdf by PDF4me's processing engine. This ensures proper file handling and recognition across all systems and applications | application/pdf |
| fileSize | Number | PDF4me file size in bytes - The exact size of the generated filled PDF file in bytes, provided for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation | 139552 |
| success | Boolean | PDF4me form filling status indicator - Boolean flag indicating the success or failure of the form filling process. Returns true for successful operations and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me form filling status message - Descriptive message indicating the result of the form filling process. Provides clear status messages for successful operations and detailed error information for troubleshooting purposes | PDF form filled successfully |
| dataType | String | PDF4me processing mode confirmation - Confirms the processing mode that was used for form filling. Returns "single" for single document processing or "batch" for batch processing operations. This field helps verify the processing approach used during the operation | single |
| formFields | Number | PDF4me form field count - The total number of form fields that were successfully filled during the operation. This count provides confirmation of how many fields were processed and helps verify complete form population | 3 |
N8N Action Response
The PDF4me Fill a PDF Form API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
[
{
"success": true,
"message": "PDF form filled successfully",
"fileName": "filled_form_output.pdf",
"mimeType": "application/pdf",
"fileSize": 139552,
"dataType": "single",
"formFields": 3
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | PDF form filled successfully |
| fileName | filled_form_output.pdf |
| mimeType | application/pdf |
| fileSize | 139552 |
| dataType | single |
| formFields | 3 |
Schema View
The data structure and types of the response:
success: ✓ true
message: AB PDF form filled successfully
fileName: AB filled_form_output.pdf
mimeType: AB application/pdf
fileSize: # 139552
dataType: AB single
formFields: # 3
Type Indicators:
AB= String#= Number✓= Boolean
Binary Data View
The actual PDF file data and metadata:
data
─────────────────────────────────────────
File Name: filled_form_output.pdf
File Extension: pdf
Mime Type: application/pdf
File Size: 136.3 KB
Use Cases
Document Automation and Personalization
- Automatically populate customer information in PDF forms for personalized document generation
- Fill registration forms, applications, and contracts with user-specific data
- Generate personalized reports and documents with dynamic content injection
Business Process Automation
- Streamline form completion workflows for customer onboarding and data collection
- Automate invoice generation and contract processing with dynamic data mapping
- Process bulk form filling for large-scale document operations
Integration and Workflow Enhancement
- Connect form filling with CRM systems and databases for seamless data flow
- Integrate with web applications and APIs for real-time form population
- Enhance document processing pipelines with intelligent form completion