Getting started
Quickstart
~5 minutesYou'll install the pdfmill node in n8n, connect it with an API key, and render the built-in Invoice template with sample data — a real PDF on the node's output, ready to email or save.
You need an n8n instance where you can install community nodes (self-hosted, or n8n Cloud on a plan that allows them) and a pdfmill account. Nothing else — no Chrome, no server.
Create a pdfmill API key
Sign in to the pdfmill dashboard, open API Keys, and choose New key. The key is shown once — copy it now and keep it somewhere safe. It looks likepk_live_….Install the Generate PDF node
In n8n go to Settings → Community Nodes → Install and enter the package name:Confirm the install. A Generate PDF node now appears in the node panel.community noden8n-nodes-generate-pdfAdd the pdfmill credential
Add a new credential of type pdfmill API and fill in two fields:- API Key — the
pk_live_…key you just copied. - Base URL — leave it as
https://api.pdfmill.dev(only change this for a self-hosted engine).
- API Key — the
Build a three-node workflow
On a new canvas, add these nodes and connect them left to right:- Manual Trigger — When clicking ‘Execute workflow’.
- Edit Fields (Set) — switch its mode to JSON and paste the sample invoice below. This stands in for the real data your workflow produces.
- Generate PDF — configured in the next step.
sample invoice data (paste into the Set node){ "invoiceNumber": "INV-2026-0042", "issuedAt": "2026-07-15", "dueAt": "2026-08-14", "paymentTerms": "Net 30", "currency": "USD", "from": { "name": "Fieldstone Automation LLC", "address": "2211 Alder Street, Suite 4\nPortland, OR 97205, USA", "email": "billing@fieldstone-automation.com", "taxId": "US 84-2210417" }, "billTo": { "name": "Harbor & Lane Coffee Roasters", "address": "18 Dockside Avenue\nSeattle, WA 98101, USA", "email": "accounts@harborandlane.com" }, "items": [ { "description": "n8n workflow build", "quantity": 1, "unitPrice": 2400, "lineTotal": 2400 }, { "description": "Custom PDF template design", "quantity": 2, "unitPrice": 350, "lineTotal": 700 } ], "subtotal": 3100, "taxRate": 8.5, "taxAmount": 263.5, "total": 3363.5, "notes": "Payment by ACH to the account on file. Thank you!" }Configure Generate PDF
Open the Generate PDF node and set:- Operation: Generate from Template.
- Template Name or ID: pick Invoice from the dropdown (it loads the built-in starter templates live, authenticated with your API key).
- Data: leave the default
{{ $json }}— it uses the incoming item, which is your sample invoice. - Format: PDF. Put Output File in Field:
data.
Run it
Click Execute workflow. The Generate PDF node outputs your invoice as a binary on thedataproperty — open the binary to view the PDF — plus a JSON summary (pages,bytes,requestId, and the file name). That's your first document.
Now wire it to a real destination
Add a Gmail or Google Drive node after Generate PDF and use the
data binary property as the attachment or upload. Swap the manual trigger and the Set node for your real trigger (a Stripe event, a webhook, a spreadsheet row).New to PDFs in n8n?
If you're weighing the options first — self-hosting Chrome, a document API, or a focused node — the guide How to generate PDFs in n8n lays them out honestly, then lands back here for the setup.
Prefer the raw HTTP API, or not using n8n? The same render is one POST /v1/render call. Want to shape your own document? See the templates guide.