This workflow automatically generates and delivers professional invoice PDFs whenever a Stripe checkout session completes. It fetches the line items from Stripe, formats them into a clean invoice with your company details, generates a branded PDF via TemplateFox, emails it to the customer, and saves a copy to Google Drive.
Without this automation, invoicing after a Stripe payment requires:
This workflow handles all of that automatically for every Stripe checkout, including proper invoice numbering, due dates, and tax calculations.
You need a TemplateFox invoice template for this workflow. You can:
Once your template is ready, select it from the dropdown in the TemplateFox node — no need to copy template IDs manually.
Step 1: Stripe Trigger
Fires on every completed checkout session (checkout.session.completed). This captures successful payments with full customer and product details.
Step 2: Get Line Items
An HTTP Request node calls the Stripe API to fetch the line items for the checkout session (product names, quantities, amounts). Stripe doesn't include line items in the webhook payload, so this separate call is required.
Step 3: Format Invoice Data
A Code node combines the Stripe session data and line items into a clean invoice structure: company details, client info (from Stripe customer), line items with prices, subtotal, tax, total, invoice number (auto-generated from date + session ID), and due date (Net 30).
Step 4: TemplateFox — Generate Invoice
Select your invoice template from the dropdown — the node automatically loads your template's fields. Map each field to the matching output from the Code node (e.g. client_company → {{ $json.client_company }}). TemplateFox generates a professional invoice PDF using your custom template.
Step 5a: Email Invoice
Sends the invoice PDF link to the customer via Gmail with invoice number, amount, and due date.
Step 5b: Save to Google Drive
Downloads the PDF and uploads it to a Google Drive folder for bookkeeping. Runs in parallel with the email step.
invoiceNumber format in the Code node (default: INV-YYYY-MMDD-XXXXXX).Note: This template uses the TemplateFox community node. Install it from Settings → Community Nodes.