Convert Markdown to PDF using n8n action
PDF4me Convert Markdown to PDF transforms Markdown content into high-quality PDF documents through n8n automation workflows. Process Markdown files via n8n triggers, binary data, base64 strings, or public URLs to generate PDFs with preserved formatting including headers, lists, code blocks, tables, images, links, embedded HTML, syntax highlighting, and professional typography. This solution is ideal for technical documentation, README files, API documentation, content management systems, GitHub integration, knowledge base exports, and automated document workflows that require accurate Markdown rendering with professional PDF output and seamless integration.
Setup
Add the PDF4me "Convert Markdown 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 Markdown to PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Convert Markdown to PDF action. Configure these parameters to control Markdown 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 | Markdown Input Format Selection � Choose the format of your Markdown data input � PDF4me supports multiple input types � Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field | Binary | Binary Markdown File Input (Required if Binary Data) � Reference Markdown file from previous n8n node or file upload � PDF4me processes binary Markdown files with automatic format detection � Required when Input Data Type is "Binary Data" | {{ $binary.data }} |
| Base64 Markdown Content | String | Base64 Encoded Markdown Input (Required if Base64 String) � Provide Markdown content as base64 encoded string � PDF4me automatically decodes and processes the Markdown content � Required when Input Data Type is "Base64 String" | IyBIZWxsbyBXb3JsZA== |
| Markdown URL | String | Public Markdown URL Input (Required if URL) � Provide a public/open permission URL to the Markdown file � PDF4me downloads and processes the file from URL � Required when Input Data Type is "URL" | https://abc.com/readme.md |
| Document Name*** | String | Markdown Input Filename � Specify the name of the input Markdown file � Must include proper extension (.md, .markdown) � PDF4me uses this for format detection and processing | sample.md |
| 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 | markdown_to_pdf_output.pdf |
| Output Binary Field 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 | markdown_to_pdf_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 | 76256 |
| success | Boolean | PDF4me conversion status indicator - Boolean flag indicating the success or failure of the Markdown-to-PDF conversion process. PDF4me returns true for successful conversions and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me conversion status message - Descriptive message indicating the result of the Markdown-to-PDF conversion process. PDF4me provides clear status messages for successful conversions and detailed error information for troubleshooting purposes | Markdown converted to PDF successfully |
| originalFileName | String | PDF4me original filename reference - The original filename of the input Markdown file 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 | markdown_file |
N8N Action Response
The PDF4me Convert Markdown 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": "markdown_to_pdf_output.pdf",
"mimeType": "application/pdf",
"fileSize": 76256,
"success": true,
"originalFileName": "markdown_file",
"message": "Markdown converted to PDF successfully"
}
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| fileName | markdown_to_pdf_output.pdf |
| mimeType | application/pdf |
| fileSize | 76256 |
| success | true |
| originalFileName | markdown_file |
| message | Markdown converted to PDF successfully |
Schema View
The data structure and types of the response:
fileName: AB markdown_to_pdf_output.pdf
mimeType: AB application/pdf
fileSize: # 76256
success: ☑ true
originalFileName: AB markdown_file
message: AB Markdown converted to PDF successfully
Type Indicators:
AB= String#= Number☑= Boolean
Binary Data View
The actual PDF file data and metadata:
data
─────────────────────────────
File Name: markdown_to_pdf_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
Technical Documentation and Developer Resources
- Convert README files, API documentation, and technical guides from Markdown format to PDF for offline access, printing, and distribution to development teams and stakeholders
- Process GitHub documentation, project wikis, and code documentation by converting Markdown content to PDF format for formal documentation and compliance requirements
- Generate PDF versions of technical specifications, design documents, and architecture guides from Markdown source files for client presentations and project deliverables
Content Management and Publishing
- Convert blog posts, articles, and online content from Markdown format to PDF for print publishing, ebook creation, and offline content distribution
- Process documentation websites and knowledge bases by converting Markdown content to PDF format for archiving, backup, and offline reference purposes
- Generate PDF versions of newsletters, reports, and publications from Markdown source files for professional distribution and formal documentation
Academic and Educational Content
- Convert research papers, thesis documents, and academic content from Markdown format to PDF for submission to journals, conferences, and academic institutions
- Process course materials, lecture notes, and educational content by converting Markdown files to PDF format for student distribution and offline learning
- Generate PDF versions of study guides, textbooks, and educational resources from Markdown source files for formal publication and educational distribution