Skip to main content

Add Form Fields To PDF using n8n action

PDF4me Add Form Fields To PDF converts static PDF documents into interactive, fillable forms through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to add form fields (text boxes, checkboxes) with customizable positioning, field names, default values, size control, page-specific targeting, and flexible alignment options. This solution is ideal for form template creation, interactive document generation, data collection forms, survey creation, and automated form design workflows that require professional form field creation with precise positioning and seamless integration.

Setup

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

Parameters

Complete list of parameters for the Add Form Fields To PDF action. Configure these parameters to control form field addition.

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 document 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
• Works with any PDF document for form field addition
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 PDF ContentStringBase64 Encoded PDF Input (Required if Base64 String)
• Provide PDF content as base64 encoded string
• Supports various PDF formats for form enhancement
• Required when Input Data Type is "Base64 String"
JVBERi...
PDF URLStringPublic PDF URL Input (Required if URL)
• Provide a public/open permission URL to the PDF file
• Downloads and processes the document for form field addition
• Required when Input Data Type is "URL"
https://abc.com/doc.pdf
Initial Value***StringForm Field Default Value
• Set the initial or default text value for the form field
• Text appears in the field when PDF is opened
• Provides guidance or pre-filled information for users
input text
Position X***NumberHorizontal Field Position
• Define the horizontal position (X coordinate) for the form field
• Works with alignment settings (Left, Right, Center)
• Default value is 0
300
Position Y***NumberVertical Field Position
• Define the vertical position (Y coordinate) for the form field
• Works with alignment settings (Top, Bottom, Middle)
• Default value is 0
300
Field Name***StringForm Field Identifier
• Specify a unique name for the form field
• Used to identify field in form data extraction and processing
• Use descriptive names for better form management
Input Field Name
Size***NumberForm Field Size
• Define the size or font size for the form field
• Controls appearance and usability of the form field
• Default value is 0
4
Pages***StringTarget Page Specification
• Specify page indices as comma-separated values or ranges
• Examples: "0,1,2-" or "1,2,3-7"
• Default processes all pages if not specified
1
Form Field Type***StringField Type Selection
• Choose the type of form field to add
• Options: TextBox (text input), CheckBox (checkbox field)
• Different types provide different functionality
TextBox
Output File Name***StringOutput Filename
• Specify the name for the generated PDF file with form fields
• Must include .pdf extension
• PDF4me ensures unique naming and format validation
form_fields_output.pdf
Output Binary Field Name***StringBinary Data Mapping
• Define the variable name for accessing generated PDF binary data
• Used in subsequent workflow actions
• Essential for workflow data flow
data
AsyncBooleanAsynchronous Processing
• Enable or disable asynchronous processing
• When enabled, operation runs in background for better performance
• Recommended for enterprise workflows and high-volume processing
true

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringPDF4me generated filename - The complete filename of the successfully processed PDF document with form fields with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesform_fields_output.pdf
mimeTypeStringPDF4me 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 applicationsapplication/pdf
fileSizeNumberPDF4me file size in bytes - The exact size of the generated PDF file in bytes, provided for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation121883
successBooleanPDF4me form field addition status indicator - Boolean flag indicating the success or failure of the form field addition process. Returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
messageStringPDF4me form field addition status message - Descriptive message indicating the result of the form field addition process. Provides clear status messages for successful operations and detailed error information for troubleshooting purposesForm fields added to PDF successfully
fieldNameStringPDF4me form field identifier - The name of the form field that was added to the PDF document. This identifier matches the Field Name parameter used during field creation and is essential for form data extraction and field managementTest Box
formFieldTypeStringPDF4me field type confirmation - The type of form field that was successfully added to the PDF document. Confirms the field type (TextBox, Checkbox, Radio Button, Combo Box) that was created during the operationTextBox
initialValueStringPDF4me field default value - The initial or default text value that was set for the form field. This value appears in the field when the PDF is opened and provides guidance or pre-filled information for usersinput
positionObjectPDF4me field position coordinates - The exact position where the form field was placed on the page, containing X and Y coordinates measured in points from the page edges{"x": 200, "y": 200}
sizeNumberPDF4me field size confirmation - The size or font size that was applied to the form field. This confirms the field dimensions and appearance settings that were configured during field creation3
pagesStringPDF4me target page confirmation - The page number where the form field was successfully added. Confirms the specific page within the document where the field was placed"1"

N8N Action Response

The PDF4me Add Form Fields To 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": "Form fields added to PDF successfully",
"fileName": "form_fields_output.pdf",
"mimeType": "application/pdf",
"fileSize": 121883,
"fieldName": "Test Box",
"formFieldType": "TextBox",
"initialValue": "input ",
"position": {
"x": 200,
"y": 200
},
"size": 3,
"pages": "1"
}
]

Use Cases

Digital Form Creation and Conversion**

  • Convert paper forms into interactive digital PDF forms with fillable fields
  • Add form fields to existing documents for data collection and user input
  • Create custom form templates for surveys, applications, and feedback collection

Document Enhancement and Interactivity

  • Enhance static documents with interactive elements for better user engagement
  • Add data collection capabilities to existing PDF documents and reports
  • Transform documents into fillable forms for automated data processing

Workflow Automation and Data Collection

  • Automate form creation for standardized data collection processes
  • Integrate form field addition into document processing workflows
  • Create dynamic forms for various business processes and applications

Get Help