Convert to PDF using n8n action
PDF4me Convert to PDF transforms documents from various formats into high-quality PDF files through n8n automation workflows. Process Word (.docx), Excel (.xlsx), PowerPoint (.pptx), images (.jpg, .png), and other formats via n8n triggers, binary data, base64 strings, or public URLs to generate PDFs with preserved formatting, embedded fonts, original layouts, image quality, and professional styling. This solution is ideal for document archiving, compliance reporting, standardized document delivery, email attachments, content publishing, and automated PDF generation workflows that require reliable multi-format conversion with consistent output quality and seamless integration.
Setup
Add the PDF4me "Convert 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:
- Add PDF4me node to workflow
- Select "Convert to PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Convert to PDF action. Configure these parameters to control document to PDF conversion.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | Document Input Format Selection • Choose the format of your document data input • PDF4me supports multiple input types • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field | Binary | Binary Document File Input (Required if Binary Data) • Reference document file from previous n8n node or file upload • Supports: .docx, .pptx, .xlsx, .png and other formats • Required when Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 Document Content | String | Base64 Encoded Document Input (Required if Base64 String) • Provide document data as base64 encoded string • PDF4me automatically decodes and processes the content • Required when Input Data Type is "Base64 String" | UEsDBBQABgAI... |
| File URL | String | Public File URL Input (Required if URL) • Provide a public/open permission URL to the document file • PDF4me downloads and processes the file from URL • Required when Input Data Type is "URL" | https://abc.com/sample.docx |
| Input File Name*** | String | Input Document Filename • Specify the name of the input document file • Must include proper extension (.docx, .pptx, .xlsx, .png) • PDF4me uses this for format detection and processing | document.docx |
| Output File Name*** | String | PDF Output Filename • Specify the name for the generated PDF file • Must include .pdf extension • PDF4me ensures unique naming and format validation | output.pdf |
| Binary Data Output Name*** | String | Binary Data Output Mapping • Define the variable name for accessing generated PDF binary data • Used in subsequent workflow actions • Essential for workflow automation | data |
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 PDF generation settings • Optional for specialized requirements | { "outputDataFormat": "base64" } |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| fileName | String | PDF4me generated PDF filename - The complete filename of the successfully generated PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | 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 conversion engine. This ensures proper file handling and recognition across all systems and applications | application/pdf |
| fileSize | Number | PDF4me PDF file size in bytes - The exact size of the generated PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation | 293918 |
| success | Boolean | PDF4me conversion status indicator - Boolean flag indicating the success or failure of the document-to-PDF conversion process. PDF4me returns true for successful conversions and false for any errors, enabling robust error handling in automated workflows | true |
| inputDataType | String | PDF4me input data type indicator - Indicates the type of input data that was processed (binary, base64, or URL). PDF4me tracks the input method for audit trails and debugging purposes in enterprise workflows | base64 |
| sourceFileName | String | PDF4me source document reference - The original document filename (.docx, .pptx, .xlsx, .png) that was processed by PDF4me's conversion engine. This reference is maintained for audit trails, debugging purposes, and tracking the source of generated PDF documents in enterprise workflows | doc1.docx |
N8N Action Response
The PDF4me Convert to PDF 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:
[
{
"fileName": "output.pdf",
"mimeType": "application/pdf",
"fileSize": 293918,
"success": true,
"inputDataType": "base64",
"sourceFileName": "doc1.docx"
}
]
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | output.pdf |
| mimeType | application/pdf |
| fileSize | 293918 |
| success | true |
| inputDataType | base64 |
| sourceFileName | doc1.docx |
Schema View
The data structure and types of the response:
1 item
fileName: AB output.pdf
mimeType: AB application/pdf
fileSize: # 293918
success: ☑ true
inputDataType: AB base64
sourceFileName: AB doc1.docx
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual PDF file data and metadata:
data
─────────────────────────────
File Name: output.pdf
File Extension: pdf
Mime Type: application/pdf
File Size: 1.35 MB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
Use Cases
Document Standardization and Archiving
- Convert various document formats (Word, Excel, PowerPoint, images) to PDF format for document standardization, archiving, and long-term preservation
- Process mixed document collections, legacy files, and multi-format content by converting them to PDF format for unified document management and archiving
- Transform business documents, reports, and presentations to PDF format for consistent formatting, professional appearance, and universal accessibility
Business Process Automation and Workflow Integration
- Convert documents from different sources and formats to PDF format for automated business processes, workflow integration, and system compatibility
- Process incoming documents, email attachments, and file uploads by converting them to PDF format for standardized processing, review, and approval workflows
- Transform documents from various departments and systems to PDF format for unified document management, collaboration, and business intelligence
Compliance and Regulatory Documentation
- Convert documents to PDF format for regulatory compliance, legal documentation, and official record keeping that requires standardized, tamper-proof formats
- Process compliance documents, audit materials, and regulatory submissions by converting them to PDF format for official filing, legal validity, and regulatory compliance
- Transform business records, financial documents, and legal materials to PDF format for long-term storage, compliance auditing, and regulatory reporting