Get started
Home/Integrations/n8n

Generate PDFs in your n8n workflows

The official PDF4.dev node for n8n. Render invoices, certificates, shipping labels and any HTML template directly inside your workflow, then pipe the PDF to Gmail, Drive, S3, or any downstream node.

Zero runtime deps Verified-ready MIT

Install in 30 seconds

On any self-hosted n8n instance (v1.0+), open Settings → Community Nodes → Install and paste the package name:

bash
n8n-nodes-pdf4

After install, the PDF4.dev node appears in the node palette under the Transform category. Create a PDF4.dev API credential with an API key from your dashboard settings (starts with p4_live_), and you are ready to render.

Operations

Two resources, four operations. Everything you need to render and manage templates from a workflow.

PDF

Render From Template

Generate a PDF from a saved template with variable data. Pass a template ID or slug plus a JSON data object.

PDF

Render From HTML

Generate a PDF from raw HTML without creating a template first. Handlebars variables supported.

Template

List

List every template in your PDF4.dev account. Each template is returned as a separate n8n item so downstream nodes can iterate.

Template

Get

Fetch a single template by ID or slug. Useful for reading the latest HTML before rendering.

Workflow ideas

Three patterns that cover 80% of PDF generation needs in n8n. Drop the PDF4.dev node between your trigger and your delivery node, pass the data through, done.

Invoice PDF from a new Airtable record

  1. Airtable Trigger: on new record in Invoices
  2. PDF4.dev: Render From Template with template_id=invoice and the record fields
  3. Gmail: send the binary PDF as an attachment to the customer

Certificate PDF from a Typeform submission

  1. Typeform Trigger: on new form submission
  2. PDF4.dev: Render From Template with template_id=certificate and the respondent name
  3. Google Drive: upload the binary PDF to a shared folder

Shipping label on every paid Shopify order

  1. Shopify Trigger: on order paid
  2. PDF4.dev: Render From Template with template_id=shipping-label and the order address
  3. Email to warehouse with the label attached

What you get

  • 4 operations: Render From Template, Render From HTML, List Templates, Get Template
  • Binary or base64 output: plug directly into Gmail, Drive, S3, Slack
  • Optional PDF format overrides (A4, Letter, custom size) at render time
  • Zero runtime dependencies (verified community node compliant)
  • Light and dark icons, n8n codex metadata
  • MIT licensed, open source

Credentials

The node authenticates with a single Bearer API key, sent on every request.

  1. Sign up at pdf4.dev (free tier available, no credit card)
  2. Go to Dashboard → Settings → API Keys
  3. Create a key. It starts with p4_live_ and is shown once.
  4. In n8n, add a new credential of type PDF4.dev API and paste the key.

The Base URL field only needs to change for self-hosted PDF4.dev instances. Leave it as https://pdf4.dev for the hosted service.

Ready to generate PDFs from n8n?

The free tier is enough to run thousands of renders per month while you build your workflow. Upgrade only when you outgrow it.