n8n Integration Guide
Learn how to integrate PDFBolt with n8n to automate PDF generation in your workflows. Generate professional documents from templates, HTML content, or web pages using n8n's visual workflow builder.
Prerequisites
Before starting, ensure you have:
- PDFBolt API Key
- Sign up or log in to your PDFBolt account.
- Navigate to API Keys section.
- Copy your API key for authentication.
- n8n Access
- n8n cloud account or self-hosted instance.
Basic Setup
Configure HTTP Request Node
Use n8n's HTTP Request node to call the PDFBolt API:
-
Add an HTTP Request node to your workflow.
-
Configure authentication:
- Method:
POST - URL:
https://api.pdfbolt.com/v1/direct - Authentication:
Generic Credential Type - Generic Auth Type:
Header Auth
- Create authentication credential:
- Name:
API-KEY - Value:
YOUR-API-KEY

- Configure request body:
- Send Body:
Enabled - Body Content Type:
JSON - Specify Body:
Using JSON

Choose Your Endpoint
Select the PDFBolt endpoint based on your workflow needs:
| Endpoint | Best For | Returns |
|---|---|---|
/v1/direct | Immediate PDF delivery | Raw PDF data in response |
/v1/sync | URL-based access | JSON with download URL |
/v1/async | High-volume processing | Webhook callback with results |
See API Endpoints for detailed specifications.
Choose Your Source
Select the content source that best fits your use case:
| Source | Best For | When to Use |
|---|---|---|
| Templates | Recurring documents with consistent layouts | Invoices, contracts, certificates – any document you generate repeatedly with different data |
| HTML | Custom documents | When you need full control over a unique layout |
| URL | Existing web pages | Archiving documentation, reports, capturing dashboards, saving public web content |
Learn more about source parameters in the API Documentation.
Source 1: Templates
Templates provide the most efficient way to generate consistent, branded PDFs by separating design from data.
How It Works
- Create your template in PDFBolt's Template section:
- Build custom layouts with HTML, CSS, and Handlebars variables.
- Or start with a ready-made template from the gallery.
-
Publish the template to make it available via API and get your unique
templateId. -
Send API request with only
templateIdandtemplateData. -
Receive your PDF – PDFBolt merges the data with your template and returns the generated PDF.
Learn how to create and manage templates in the Templates Documentation.
Example: Invoice Generation
Real-world scenario: Customer places an order in your e-commerce system. Automatically generate a professional invoice PDF and send it to the customer.
n8n HTTP Request Configuration:
- From Webhook
- Manual Data
If your workflow is triggered by a webhook, paste this expression into the JSON body field of the HTTP Request node:
{{ $json.body.toJsonString() }}

$json.body– Accesses the data received from the webhook.toJsonString()– Converts the object into JSON string format.- Result: PDFBolt receives the data in the correct structure for template processing.
Expected example webhook payload:
{
"templateId": "your-template-id",
"templateData": {
"invoice_number": "INV-2025-001",
"client_name": "John Doe",
"line_items": [
{
"quantity": "1",
"tax_rate": "10",
"unit_price": "1200.00",
"description": "Website Design",
"total_amount": "1200.00"
},
{
"quantity": "2",
"tax_rate": "10",
"unit_price": "250.00",
"description": "Logo Design Package",
"total_amount": "500.00"
}
],
"total_amount": "1700.00"
}
}
When your data comes from previous workflow nodes (like databases, forms, or APIs), map the fields manually using n8n expressions:
{
"templateId": "your-template-id",
"templateData": {
"invoice_number": "{{ $json.body.invoice_number }}",
"client_name": "{{ $json.body.client_name }}",
"line_items": {{ $json.body.line_items.toJsonString() }},
"total_amount": "{{ $json.body.total_amount }}"
}
}

- Use
{{ $json.body.fieldName }}to reference simple fields from the previous node. - Use
.toJsonString()for arrays and objects to maintain proper JSON structure. - All field names must match your template's Handlebars variables.
Template Workflow Example

Complete workflow:
- Webhook – Receives order data from your system.
- HTTP Request (PDFBolt) – Generates invoice PDF.
- Send Message – Sends PDF to customer.
Field names in templateData must exactly match Handlebars variables in your template. Mismatched names result in empty values.
Source 2: HTML
Convert HTML directly into PDFs – perfect for custom documents, event programs, announcements, or guides.
How It Works
- Prepare HTML content in your workflow.
- Base64 encode the HTML.
- Send encoded HTML to PDFBolt.
- Receive generated PDF.
Example: Event Program
Real-world scenario: Organizing a webinar or conference. Generate a PDF program with schedule, speakers, and session details that attendees can download.
- Add a Code node after your event registration trigger:
View Complete Code Example
// Static event program HTML – same for all attendees
const htmlContent = `
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: Arial; color: #333; line-height: 1.6; }
.header {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
color: white;
padding: 30px;
text-align: center;
}
h1 { margin: 0; font-size: 28px; }
.event-info {
background: #f8fafc;
padding: 20px;
border-radius: 8px;
margin: 20px 0;
}
.session {
border-left: 4px solid #6366f1;
padding: 15px;
margin: 15px 0;
background: #fff;
box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
page-break-inside: avoid;
}
.time {
color: #6366f1;
font-weight: bold;
font-size: 14px;
}
.speaker {
color: #64748b;
font-style: italic;
margin-top: 5px;
}
.break {
background: #fef3c7;
padding: 10px;
text-align: center;
margin: 15px 0;
border-radius: 4px;
}
</style>
</head>
<body>
<div class="header">
<h1>Tech Summit 2025</h1>
<p>Building the Future Together</p>
<p style="margin-top: 10px; font-size: 14px;">November 15, 2025 | Virtual Event</p>
</div>
<div class="event-info">
<strong>Event Details:</strong><br>
Date: November 15, 2025<br>
Time: 9:00 AM – 5:00 PM EST<br>
Platform: Zoom (link will be sent via email)
</div>
<h2>Event Schedule</h2>
<div class="session">
<div class="time">9:00 AM – 9:30 AM</div>
<strong>Opening Keynote: The Future of AI</strong>
<div class="speaker">Speaker: Dr. Sarah Johnson, AI Research Director</div>
<p>Exploring emerging trends in artificial intelligence and their impact on business.</p>
</div>
<div class="session">
<div class="time">9:45 AM – 10:30 AM</div>
<strong>Workshop: Building Scalable APIs</strong>
<div class="speaker">Speaker: Mike Chen, Senior Engineer</div>
<p>Hands-on session covering best practices for API design and implementation.</p>
</div>
<div class="break">☕ Coffee Break (10:30 AM – 11:00 AM)</div>
<div class="session">
<div class="time">11:00 AM – 11:45 AM</div>
<strong>Panel Discussion: Cloud Architecture</strong>
<div class="speaker">Panelists: Various industry experts</div>
<p>Interactive discussion about modern cloud infrastructure and DevOps practices.</p>
</div>
<div class="session">
<div class="time">12:00 PM – 1:00 PM</div>
<strong>Networking Session</strong>
<p>Connect with other attendees and speakers in breakout rooms.</p>
</div>
<div class="break">🍽️ Lunch Break (1:00 PM – 2:00 PM)</div>
<div class="session">
<div class="time">2:00 PM – 2:45 PM</div>
<strong>Case Study: Digital Transformation Success</strong>
<div class="speaker">Speaker: Lisa Martinez, CTO</div>
<p>Real-world example of successful digital transformation journey.</p>
</div>
<div class="session">
<div class="time">3:00 PM – 4:00 PM</div>
<strong>Q&A with Speakers</strong>
<p>Ask questions and get insights from all our speakers.</p>
</div>
<div style="margin-top: 30px; padding-top: 20px; border-top: 2px solid #e2e8f0; text-align: center; color: #64748b;">
<p><strong>Questions?</strong> Contact us at events@example.com</p>
</div>
</body>
</html>
`;
// Encode to base64
const base64Html = Buffer.from(htmlContent).toString('base64');
return {
json: {
html: base64Html
}
};
HTML must be Base64 encoded before sending to PDFBolt. Use Buffer.from(html).toString('base64') in Code nodes.
- In the HTTP Request node body, configure PDF settings:
{
"html": "{{ $json.html }}",
"format": "A4",
"printBackground": true,
"margin": {
"top": "30px",
"bottom": "30px",
"right": "30px",
"left": "30px"
}
}

HTML Workflow Example

Complete workflow:
- Typeform Trigger – New registration form submitted.
- Code Node – Generate event program (Base64-encoded HTML content).
- HTTP Request (PDFBolt) – Generate a PDF.
- Gmail – Send confirmation email with PDF program to the attendee.
By separating PDF settings into the HTTP Request body, you can easily adjust format, margins, and other options without modifying the HTML code. See Conversion Parameters for all available options.
Source 3: URL
Generate PDFs from any publicly accessible webpage, perfect for archiving web content, capturing dashboards, or generating reports.
How It Works
- Provide the target URL.
- PDFBolt loads and renders the page.
- Returns PDF of the rendered page.
Example: Daily Dashboard Report
Real-world scenario: Your team uses an analytics dashboard. Every morning, automatically capture the dashboard as PDF and share it on Slack so the team stays informed.
In the HTTP Request node body, configure the URL and PDF settings:
{
"url": "https://analytics.yourcompany.com/dashboard",
"format": "A4",
"landscape": true,
"printBackground": true,
"waitUntil": "networkidle",
"margin": {
"top": "20px",
"right": "20px",
"bottom": "20px",
"left": "20px"
}
}

Use waitUntil: "networkidle" to ensure all dashboard charts and data finish loading before capturing the PDF. For pages with specific loading indicators, use waitForSelector instead.
URL Workflow Example

Complete workflow:
- Schedule Trigger – Every weekday at 8:00 AM.
- HTTP Request (PDFBolt) – Capture dashboard as PDF.
- Slack – Shares report with team.
- Google Drive – Archives PDF.
Additional Resources
PDFBolt Documentation
- Templates Management Guide – Detailed creation and management instructions.
- Templates Docs – Templates overview, benefits, and use cases.
- API Endpoints – All available endpoints.
- Conversion Parameters – Complete parameter reference.
- Error Handling – Error codes and solutions.
- Automate PDF Generation in n8n: Complete Guide – Practical implementation example.