Generate PDFs with n8n
Add a PDF step to any n8n workflow. The HTTP Request node calls PDFgen and returns a hosted link.
n8n’s HTTP Request node makes calling PDFgen a one-node step in any workflow. POST your data, get back a hosted PDF link, and feed it to the next node — email, storage, database, or a Slack message.
Self-hosted or cloud, there’s no native app to install — just the API call.
What is n8n?
n8n is a source-available workflow automation tool you can self-host or run in the cloud. Its HTTP Request node calls any REST API, so it integrates with PDFgen directly.
How to generate PDFs with n8n
Connect through HTTP Request node — no native app needed. Each step calls the PDFgen API and returns a hosted PDF link.
- 1
Add a trigger node
Use a Webhook, Cron, or any app trigger to start the workflow.
- 2
Add an HTTP Request node
Set method to POST and URL to https://pdfgen.com/api/v1/generate.
- 3
Set auth and body
Add a header Authorization: Bearer <your key>, set the body to JSON with template_id (or html) and data, and export_type "url".
- 4
Use the response
Reference the returned url in later nodes — store it, email it, or upload it.
- Method
- POST
- URL
- https://pdfgen.com/api/v1/generate
- Header
- Authorization: Bearer pdfg_live_xxx
JSON body
{"template_id": "tmpl_xxx","data": { "name": "Acme Corp", "total": "$2,400.00" },"export_type": "url"}
The response is { "url": "https://…" } — a hosted link to the PDF. Use html instead of template_id to send raw markup.
What you can build
- Generate invoices from a database trigger
- Render reports on a Cron schedule
- Create labels when a webhook fires
- Build documents in a self-hosted, private workflow
Frequently asked questions
- Does n8n need a PDFgen node?
- No — the built-in HTTP Request node calls /api/v1/generate directly. There’s no custom node to install.
- Does this work on self-hosted n8n?
- Yes. The HTTP Request node works the same on self-hosted and cloud n8n; only outbound HTTPS to pdfgen.com is required.
- How do I keep my API key secret?
- Store it as an n8n credential or environment variable and reference it in the Authorization header rather than hard-coding it.