Automate Invoice & Document Generation in n8n with Rendex

Most invoice and document jobs in n8n stall at the same step. You have the order data. You have a template. What you don't have is a clean way to turn that HTML into a real PNG or PDF without standing up a headless browser somewhere. Hosting a render service for one node in a workflow is overkill.
This guide uses the official Rendex node for n8n to render an HTML invoice template straight to an image or PDF on a trigger. No hosted page, no Chromium to babysit. The node hands the rendered file to the next step as binary data, so you can email it, upload it, or store it in one move. Full node reference lives at the n8n integration docs.
Prerequisites
- An n8n instance, Cloud or self-hosted
- A Rendex API key. The free plan covers 100 renders/month. Get one at rendex.dev/login.
- A trigger that carries order data (Google Sheets, a store webhook, etc.)
Step 1: Install the Rendex Node
In n8n, open Settings → Community Nodes, click Install, and paste the package name. Accept the community-node confirmation.
n8n-nodes-rendexOnce installed, a single Rendex node appears in the node picker. It talks to api.rendex.dev and covers the whole rendering surface: render raw HTML to an image, screenshot a live URL, or produce a paginated PDF.
Step 2: Add the Rendex API Credential
Create a new Rendex API credential and paste your key into the API Key field. A Rendex key is rdx_ followed by 22 characters, a single segment with no environment prefix. n8n verifies it live against the /v1/credential-check endpoint, so a green check confirms the key works before you build anything. The credential sends the key as a Bearer token automatically. You never set the Authorization header by hand.
Step 3: Build the Invoice Template
Write a self-contained HTML invoice with inline styles. External stylesheets won't load when you pass raw HTML to the renderer, so keep everything inline and reference any images or fonts by absolute HTTPS URL. n8n expressions work inline, so you can merge fields from the trigger node directly into the markup.
<!doctype html>
<html>
<body style="font-family: system-ui; padding: 48px; color: #1a1a1a">
<h1 style="color: #e2571a">Invoice #{{ $json.invoiceNumber }}</h1>
<p style="color: #6b7280">Issued: {{ $json.issuedAt }}</p>
<p><strong>Billed to:</strong> {{ $json.customerName }}</p>
<table style="width: 100%; border-collapse: collapse; margin-top: 24px">
<tr style="border-bottom: 2px solid #e2571a">
<th style="text-align: left; padding: 8px 0">Item</th>
<th style="text-align: right; padding: 8px 0">Amount</th>
</tr>
<tr>
<td style="padding: 8px 0">{{ $json.item }}</td>
<td style="text-align: right; padding: 8px 0">{{ $json.amount }}</td>
</tr>
</table>
</body>
</html>Step 4: Render the Document
Add a Rendex node after your trigger. Set Resource to Screenshot, Operation to Capture, and Source to HTML. Paste the template above into the HTML field. For a downloadable invoice, set Format to pdf; for a thumbnail or email preview, leave it at png.
Captureruns synchronously and finishes in a single node. It writes the rendered file to the node's binary property (named data by default) alongside a JSON metadata object. Rendering raw HTML is fast, so you rarely need anything more than this.
PDF page options live under Additional Options: PDF Page Format (A4, Letter, Legal), margins, landscape orientation, and print-background toggling. Every option maps 1:1 to the REST API parameters, so anything documented for the API is available in the node.
Step 5: Deliver the Invoice
Wire the Rendex node's binary output into any binary-capable node:
- Send Email — attach the
databinary as the invoice PDF. - Upload to S3 / Google Drive / Dropbox — map
datato the file content, set a filename likeinvoice-{{ $json.invoiceNumber }}.pdf. - HTTP Request— forward the file to a downstream API or accounting system.
That is the whole pipeline: trigger, render, deliver. Three nodes, no infrastructure.
Async and Batch Operations
For heavy pages or large jobs, the node exposes two more patterns:
- Capture Async (Resource
Screenshot): submits a job and returns ajobIdimmediately. Add a Webhook URLto receive an HMAC-signed callback when the render finishes, so the workflow run isn't blocked on a slow page. - Job → Get Status: polls an async job by
jobIdand returns a signed result URL once ready. - Batch → Submit: sends a list of URLs for parallel capture, up to 500 per batch depending on plan, with Batch → Get Status to poll the result. The webhook pattern is detailed in the webhooks docs.
For invoice rendering specifically, stick with synchronous Capture. HTML renders quickly and you get the file back in the same node without polling.
Troubleshooting
- Credential won't validate: Confirm the key starts with
rdx_and has exactly 22 characters after the prefix. A 401 against/v1/credential-checkusually means a trailing space or a rotated key. Re-paste from your dashboard. - Blank or broken layout: Inline all CSS and reference images and web fonts by absolute HTTPS URL. Raw HTML has no access to your local filesystem during the render.
- Expressions render as literal text: Toggle the HTML field to expression mode so n8n evaluates
{{ $json.x }}instead of treating it as a fixed string.
Next Steps
Test your invoice template before wiring up the workflow. Paste the HTML into the free URL-to-PDF tool and check the output in seconds, then iterate on margins and layout. If you prefer code over a visual builder, the same render runs from a Stripe webhook in the HTML-to-PDF invoice pipeline guide.
When you're ready, create a free API key (100 renders/month, no credit card) and install n8n-nodes-rendex from Community Nodes. Full operation reference is at the n8n integration docs.
For a broader overview of what the node covers, including batch submission, async captures, and AI Agent usage, read Rendex Is Now a Verified n8n Community Node.
Continue Reading
Jun 12, 2026
Rendex Is Now a Verified n8n Community Node
Jun 9, 2026
Generate Invoices from an HTML Template and JSON
May 5, 2026
Automating Invoice Generation with HTML-to-PDF
Solution
HTML to PDF Invoice API — Generate PDF Invoices at Scale
Solution
Rendex for n8n — Render Images & PDFs Inside Your Workflows
Documentation
N8n
Documentation
Api Reference
Free Tool
Url To Pdf Tool