Generate invoices, save to Drive and send email to customer with JS + G Sheets
Ready for 3.0What this workflow does
This workflow has 11 nodes and runs when an HTTP GET request hits its webhook URL. Along the way it connects Google Sheets and Google Drive. It also calls html2pdf2.p.rapidapi.com and rhodium-tecnologia-html2pdf.s3.amazonaws.com over HTTP.
How it runs
Trigger: When an HTTP GET request hits its webhook URL.
- Generate Invoice ID (Code): runs custom JavaScript code
- Check if ID Already Exists (Google Sheets): uses Google Sheets
- If: checks a condition and branches into true / false
- Set Fields (Edit Fields (Set)): sets 5 fields: order_id, customer_name, customer_email…
- Create Invoice HTML (Code): runs custom JavaScript code
- HTML to PDF (HTTP Request): calls html2pdf2.p.rapidapi.com (POST)
- Download PDF from API (HTTP Request): calls rhodium-tecnologia-html2pdf.s3.amazonaws.com
- Upload PDF to GDrive (Google Drive): uses Google Drive
- Email Invoice to Customer (Send Email): sends an email over SMTP
- Append Details to Invoices Sheet (Google Sheets): append or update
Services it uses
HTTP calls to: html2pdf2.p.rapidapi.com, rhodium-tecnologia-html2pdf.s3.amazonaws.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive - Send Email
n8n-nodes-base.emailSend
From the author
This workflow automates invoice generation from form submissions, ensuring unique order IDs, creating PDF invoices, storing files, emailing customers, and logging invoice data — all seamlessly integrated. --- 🔹 Workflow Overview 1. Trigger (Webhook) Starts…