n8n workflow template: HTML to PDF

n8n workflow template: HTML to PDF

Free n8n workflow templates that turn HTML into PDF. Import the JSON, add your API key, and email Shopify invoices, Tally answers or Sheets rows as PDFs.

Quick answer. Download one of the four JSON files below, import it into n8n with Import from File, create a Header Auth credential with your html-pdf.com key, and run it. Each template uses a plain HTTP Request node that posts your HTML to https://html-pdf.com/v1/pdf, so there is nothing to install.

The four templates

Each file is a ready workflow with renamed nodes and sticky notes that explain every step. None of them contain secrets.

1. HTML to PDF (basic)

This is the smallest working example. A manual trigger feeds a Set node with an html field, and the HTTP Request node returns the PDF as a binary file in the data field. Use it to test your key, or as a starting block to paste into a bigger workflow.

Download html-to-pdf-basic.json

2. Shopify paid order to PDF invoice

A Shopify Trigger fires on orders/paid. A Code node builds a styled invoice from the order, with line items, shipping, tax and totals. The HTTP Request node asks for a link with "response": "url", and Gmail emails that link to the customer. The link is valid for 24 hours.

Download shopify-order-invoice-pdf.json

3. Google Sheets rows to PDFs in Google Drive

A Schedule Trigger runs every morning. Google Sheets reads your rows, a Code node turns each row into its own HTML page, the HTTP Request node returns each PDF as a file, and Google Drive uploads them. Rows with a value in a pdf_done column are skipped.

Download google-sheets-row-to-pdf.json

4. Tally form response to PDF

A Webhook node receives each Tally submission. A Code node lists every question and answer on a clean A4 page, and turns choice answers into their text. The HTTP Request node asks for a link, and Gmail sends it to the email the respondent entered. Setup details are in Tally to PDF.

Download tally-form-to-pdf.json

How to import a template

It takes about two minutes.

  1. In n8n, create a new workflow.
  2. Open the menu in the top right and choose Import from File, then pick the JSON. You can also choose Import from URL and paste the download link, or copy the file contents and paste them onto the canvas.
  3. Go to Credentials, add a Header Auth credential, set the name to Authorization and the value to Bearer hp_live_.... Get a free key if you don't have one.
  4. Open each node that shows a warning and pick your credential. The Shopify and Sheets templates also need Shopify, Gmail, Google Sheets or Google Drive credentials.
  5. Click Execute workflow to test, then activate it.

How the HTTP Request node is set up

All three templates use the same settings, so you can copy them into your own workflows.

Using JSON.stringify matters. It escapes quotes and line breaks in your HTML, so the body is always valid JSON.

How to customize the templates

Most changes happen in the JSON body or in the Code node.

You can browse ready HTML designs in the template gallery and paste them into the Set or Code node. The full step by step guide is in HTML to PDF in n8n, and every option is in the API reference.

What it costs

One credit is one PDF page. You get 100 free credits once you confirm your email, with no card. After that, packs start at $10 for 1,000 credits, and purchased credits never expire. A one page invoice costs one credit, and failed renders cost nothing.

FAQ

Do I need a community node to make PDFs in n8n?

No. The templates use n8n's built-in HTTP Request node, so they work on n8n Cloud and self-hosted with nothing to install.

Why does my PDF come out as JSON instead of a file?

The body probably includes "response": "url", which returns a link. Remove it and set the response format to File to get the binary PDF.

Yes. Use the File response format, then add the data field as an attachment in the Gmail or Send Email node.

Is it free to try?

Yes. You get 100 free credits once, with no card, and one credit is one PDF page.

This page as markdown · text