๐Ÿงพ Auto-send PDF invoices with Stripe payment triggers and Gmail

โšก 387 views ยท ๐Ÿงพ Invoice Processing

Description

๐Ÿ’ฐ Auto-Send PDF Invoice When Stripe Payment is Received

This workflow automatically generates a PDF invoice every time a successful payment is received in Stripe, then emails the invoice to the customer via Gmail. Perfect for freelancers, SaaS businesses, and service providers who want to automate billing without manual effort.


โš™๏ธ How It Works

  1. Stripe Payment Webhook

    • Listens for successful payment events (payment_intent.succeeded).
    • Triggers the workflow whenever a new payment is made.
  2. Normalize Payment Data

    • A Code node extracts and formats details like:
      • Payment ID
      • Amount & currency
      • Customer name & email
      • Payment date
      • Description
    • Generates a unique invoice number.
  3. Generate Invoice HTML

    • A Code node builds a professional invoice template in HTML.
    • Data is dynamically inserted (amount, customer info, invoice number).
    • Output prepared for PDF generation.
  4. Send Invoice Email

    • The Gmail node sends an email to the customer.
    • Invoice is attached as a PDF file.
    • Includes a confirmation message with payment details.

๐Ÿ› ๏ธ Setup Steps

1. Stripe Webhook

2. Gmail Setup

3. Customize Invoice


๐Ÿ“ง Example Email Sent

Subject: Invoice INV-123456789 - Payment Confirmation

Body:
Dear John Doe, Thank you for your payment! Please find your invoice attached. Payment Details: Amount: USD 99.00 Payment ID: pi_3JXXXXXXXX Date: 2025-08-29 Best regards, Your Company Name

(Attached: invoice_INV-123456789.pdf)


โšก With this workflow, every Stripe payment automatically creates and delivers a polished PDF invoice โ€” no manual work required.

๐Ÿ”— Nodes Used

Webhook, Gmail

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup