PICKED FROM N8N.IO · FINANCE & ADMIN

When an order form posts to a webhook, the workflow creates a unique invoice number, checks it is not already in Google Sheets, builds an HTML invoice and converts it to PDF. The PDF is saved to Google Drive, emailed to the customer and logged in the sheet.

Template by Joseph · 8.7k views on n8n.io · listed there as “Generate invoices, save to Drive and send email to customer with JS + G Sheets”

THE WORKFLOW11 NODES
⚡︎Webhook Simulator{}Generate InvoiceID▦Check if IDAlready Exists⑂If Does not Exist≡Set Fields{}Create InvoiceHTML↯HTML to PDF▲Upload PDF toGDriveEEmail Invoice toCustomer▦Append Details toInvoices Sheet↯Download PDF fromAPI
DIFFICULTY
Intermediate
NODES
11
USES AI
No
PUBLISHED
May 2025

001 / WHAT HAPPENS

  1. 01

    A webhook receives the order form data with customer and order details.

  2. 02

    A code step creates a random invoice ID and Google Sheets is checked for duplicates.

  3. 03

    The invoice details are formatted and an HTML invoice is built.

  4. 04

    An HTML to PDF API converts it and the PDF is saved to Google Drive.

  5. 05

    The PDF is emailed to the customer and the invoice is logged in Google Sheets.

WHO IT SUITS

Suits a small business that takes orders through a web form and wants an invoice emailed out automatically.

CONNECTS

  • Google Sheets
  • Google Drive
  • SMTP email

002 / BEFORE YOU USE IT HERE

  • !The invoice is emailed to customers with no approval step, so start by sending to yourself and add an approval step before going live.
  • !The PDF is made by an outside HTML to PDF service called over HTTP, so customer names and addresses go to that provider; check where it hosts data.
  • !The template has no GST or ABN fields, which a valid Australian tax invoice requires, so add them to the HTML.
  • !Sheet IDs, the invoice layout and the HTML to PDF service details are placeholders that you need to replace.

LOCAL SWAP

Swap the invoice build for the Xero node to create and email the invoice from Xero, which handles GST and tax invoice formatting.

Need n8n and the AI hosted in Australia? →

004 / QUESTIONS

Anything else is quicker to answer on a call. Thirty minutes, free, with the people who would build it.

Yes. Every template on this list is free on n8n.io. You need an n8n account (n8n Cloud or self-hosted) and accounts for the apps it connects to, some of which charge for API use.

We adapt templates to your systems, add approval steps where customers are involved, host n8n in Australia when the data calls for it and hand it over documented.

Book a free call→