Convert HTML to PDF Automatically with n8n and ConvertAPI

Save time converting HTML documents to PDFs with n8n automation using ConvertAPI. This workflow turns HTML content into a polished PDF file quickly, eliminating manual steps and ensuring consistent output.
manualTrigger
httpRequest
code
+3
Workflow Identifier: 2473
NODES in Use: Manual Trigger, Set, Code, HTTP Request, Read Write File, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow changes HTML code into a PDF file automatically, fixing the problem of slow manual work and errors.

It takes HTML text, sends it to a service that turns it into PDF, and saves the PDF file to your computer.

This avoids copying and pasting HTML by hand and reduces mistakes in the PDF files.


Who Should Use This Workflow

Anyone who needs to turn HTML designs or reports into PDF files regularly and fast.

This helps content managers, report builders, or teams who want the same PDF layout every time without spending hours.


Tools and Services Used

  • n8n automation platform: Runs the workflow steps to convert and save files.
  • ConvertAPI service: Converts the HTML files to PDF files remotely.
  • HTTP Query Auth credentials in n8n: Keeps API access secure.
  • File system access: Lets the PDF file be saved on your computer.

Inputs, Processing Steps, and Output Explained

Inputs

The starting input is an HTML code in simple text format inside the workflow.

Processing Steps

  • Prepare the HTML content in a specific field within the workflow.
  • Change the HTML text into a file format that can be sent in an upload.
  • Use an HTTP call to send the HTML file to ConvertAPI which changes it to PDF.
  • Receive the PDF file back as a response from the service.
  • Save the returned PDF file into a chosen folder on the computer.

Output

A PDF file called document.pdf saved locally with correct formatting from HTML.


Beginner Step-by-Step: How to Use This Workflow In Production Inside n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to run the automation.
  3. Click on menu, choose “Import from File”, and select the downloaded workflow.

Step 2: Configure Credentials and Settings

  1. Add your ConvertAPI API Key into the HTTP Query Auth credentials in n8n settings.
  2. Update any file paths or names in the Save File node if different storage location or name is needed.

Step 3: Test the Workflow

  1. Click the manual trigger node called Manual Trigger to start a test run.
  2. Check if the PDF file named document.pdf appears where configured.
  3. Open the PDF file to see if it matches the original HTML layout.

Step 4: Activate for Production

  1. Once tested, activate the workflow by switching it from draft to active mode.
  2. Optionally, replace the Manual Trigger with a Cron node for scheduled runs.

For users hosting the workflow themselves, consider self-host n8n for reliable automation.


Customization Ideas

  • Change the HTML code inside the create HTML node to generate different PDF content.
  • Modify the saved PDF filename in the write file node to fit naming needs.
  • Add date or time in the filename using expressions like document_{{$now.toISOString().slice(0,10)}}.pdf for version tracking.
  • Switch ConvertAPI with another HTML to PDF API by changing HTTP Request node’s URL and credentials.
  • Change triggers to run workflow automatically using scheduling.

Common Problems and Fixes

  • Authentication errors: These happen if API Key is wrong or missing in HTTP Query Auth setup. Fix by confirming keys are correct and active.
  • Empty or broken PDF files: Caused by wrong data field naming or missing binary content in code node or write file node. Fix by ensuring binary field is called exactly “data” and referenced properly.

Summary of What You Get

✓ A workflow that turns HTML to PDF without manual copy-paste.

✓ Saves hours of repetitive work each week.

✓ Produces consistent PDF files with correct formatting.

→ PDF files saved automatically to your chosen folder.

→ Easy to customize content and filename.

Frequently Asked Questions

It automatically changes HTML code into a PDF file and saves the PDF on your computer, removing the need for manual copying or software.
The workflow uses ConvertAPI, a remote service that accepts HTML uploads and returns PDF files.
Authentication errors happen when the ConvertAPI API Key is incorrect or not set up properly in the HTTP Query Auth credentials.
Change the filename parameter in the write file node to the desired name or use expressions to add timestamps.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free