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.
Trigger (Webhook)
Starts when an order form is submitted, capturing customer and order details.
Generate Random Order ID
A Function node creates a unique alphanumeric invoice ID (e.g., INV-X92B7D
).
Check for Duplicate Order ID
Google Sheets looks up the generated order ID in your invoice log sheet to prevent duplicates.
Conditional Check (IF Node)
Prepare Invoice Data
A Set node formats customer info, date, order items, and the unique order ID to fit your invoice template.
Convert HTML to PDF
HTTP Request node sends your invoice HTML to the RapidAPI HTML-to-PDF service and receives the PDF file.
Upload PDF to Cloud Storage
Save the PDF in Google Drive or Dropbox with a clear file name like Invoice-INV-X92B7D.pdf
.
Send Invoice Email to Customer
Email node attaches the PDF and includes the order ID in the email subject/body.
Log Invoice Details
Append invoice data (customer info, order ID, total, PDF link) to your Google Sheet for tracking.
INV-
.Invoice-{{$json["order_id"]}}.pdf
You can make a copy of the invoice log template here
This sheet includes columns for order\_id, customer name, email, total, and invoice PDF link. Customize it as needed.
Reach out via email at [email protected].