n8n Webhook Workflow: Invoices, Payments & Refunds to Google Sheets
n8n Webhook Workflow: Invoices, Payments & Refunds to Google Sheets
Regular price
£33.99
Regular price
£33.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Webhook Workflow: Invoices, Payments & Refunds to Google Sheets
Regular price
£33.99
Regular price
£33.99
Sale price
Unit price
/
per
Automatically log invoices, payments & refunds—then generate PDFs, upload them to Google Drive, and send emails
This n8n webhook workflow receives invoice, payment, and refund events via an authenticated POST request, validates them, prevents duplicates, writes all records to Google Sheets, generates invoice PDFs (with n8n-nodes-pdfbro), uploads PDFs to Google Drive, and sends invoice/receipt/refund notifications through SMTP.
What this workflow does
- Accepts webhook events: Receives a POST webhook event and checks required fields such as event_id and event_type.
-
Routes by event_type: Uses event_type to process only supported events:
- invoice.created
- payment.received
- refund.completed
- Prevents duplicates: For each event type, it checks Google Sheets for existing records (by invoice_id, payment_id, or refund_id) and returns a conflict/validation response when duplicates are detected.
- invoice.created: Appends the invoice to an invoice sheet, generates a PDF with PdfBro, uploads it to Google Drive, emails the invoice via SMTP, then updates the invoice row with the PDF link and sent status.
- payment.received: Appends payment details to a payments sheet, looks up the related invoice, and sends either a standard receipt or a “paid in full” email based on the invoice’s amount_due.
- refund.completed: Appends refund details to a refunds sheet, looks up the related invoice, emails a refund confirmation via SMTP, and updates the refund row as sent.
Use cases
- Build an invoice-to-PDF pipeline for SaaS billing ops using n8n webhook automations.
- Centralize billing records in Google Sheets while keeping customers updated with receipt and refund emails.
- Ensure reliable reconciliation by rejecting unsupported events and avoiding duplicate IDs.
Technical details
- Webhook (header-authenticated POST) + response handling with JSON success/conflict results
- Routing and control flow with nodes such as if, merge, and switch
- n8n-nodes-pdfbropdf (PdfBro) for invoice PDF generation
- Google Sheets for invoices, payments, and refunds logging + duplicate checks
- Google Drive for PDF storage and link updates
- Email Send via SMTP for invoice/receipt/refund notifications
