Idempotent Invoice & Dunning Workflow (Gmail, n8n Data Tables)
Idempotent Invoice & Dunning Workflow (Gmail, n8n Data Tables)
Regular price
£51.99
Regular price
£51.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
Idempotent Invoice & Dunning Workflow (Gmail, n8n Data Tables)
Regular price
£51.99
Regular price
£51.99
Sale price
Unit price
/
per
Stop duplicate billing emails and automate dunning end-to-end with an idempotent n8n invoice workflow
This Idempotent Invoice & Dunning Workflow listens for job completion and payment webhooks, creates invoices with deterministic deduplication, and runs a controlled reminder/escalation sequence via Gmail—stopping immediately as soon as payment is confirmed. Invoice state is persisted in n8n Data Tables so replays can’t accidentally resend invoices or nudge paid customers again.
What this workflow does
- Receives job completion webhooks, validates a shared token, normalizes the payload against a fixed price book, and ignores non-completion events.
- Idempotent invoice creation: deduplicates completion events using a deterministic invoice key, stores invalid payloads as dead letters, and persists valid invoices to an n8n Data Table.
- Sends a controlled test invoice email using Gmail and updates the invoice row as sent so webhook replays do not generate a second invoice.
- Receives payment webhooks, validates the token, normalizes payment payloads, and deduplicates payment events.
- Stops dunning on payment: if the invoice exists and is not already marked paid, it marks it Paid (preventing future reminders). If the invoice can’t be matched, it queues the payment in a separate Data Table for human review.
- Daily scheduled sweeps recheck invoice status, claim due reminder actions, and send controlled reminder emails while updating nudge counters and next-due dates.
- Escalation sweep for stuck/high-value overdue: identifies stuck or high-value overdue invoices, sends a controlled escalation email, and marks the invoice as Escalated.
Use cases
- SaaS operators who want reliable invoice + dunning automation without duplicate emails.
- Automation engineers integrating job completion and payments via webhooks.
- Teams that need auditable invoice state using n8n Data Tables and dead-letter handling.
Technical details
- Integrations/nodes: Webhook, Gmail, n8n Data Table, plus if, code, and Sticky Note.
- Core mechanisms: token validation, payload normalization to a fixed price book, deterministic deduplication keys, dead-letter storage, and scheduled sweeps for reminders and escalation.
- Setup includes creating two n8n Data Tables—one for invoices and one for unmatched payments (for review).
