Skip to content
AdvancedPremiumFinance & AccountingWebhook trigger9 nodes

Recover failed Stripe payments with a dunning sequence

Classifies Stripe payment failures by decline code and responds differently to each: a soft retry note, a card-update request, or escalation to a human for hard declines.

The Stripe trigger subscribes to invoice.payment_failed and verifies Stripe's signature itself. A Set node lifts the customer, email, amount — divided from Stripe's minor units exactly once — currency, decline code and attempt number. A Switch then classifies the decline into three named outcomes with a fallback: insufficient funds and processing errors take a soft 'we'll try again' email, expired or incorrect card details take a specific update-your-card email naming the code and linking to the billing portal, and everything else — fraud blocks, do-not-honour — goes to a human in Slack without contacting the customer at all. All three branches converge on a Google Sheets log recording the code, attempt number and which branch fired. Every external call retries and routes failures to an error rail on Discord, because a failed dunning message is silent churn.

Key benefits

  • Each decline code gets the response that fits it, instead of one generic email that loses recoverable customers
  • Suspected-fraud declines go to a person, never to the customer's inbox
  • The amount is converted from Stripe's minor units once, so no branch quotes a figure 100× wrong
  • The dunning log tells you whether recovery is working rather than assuming it
  • No money moves anywhere in this workflow — the Stripe key only needs read access

Use cases

  • Subscription businesses losing customers to involuntary churn
  • Finance teams chasing failed payments from a Stripe dashboard by hand
  • SaaS teams that want dunning without paying for a dunning vendor
  • Anyone whose current flow emails 'your payment failed' to every decline code alike

Integrations

StripeGmailSlackGoogle SheetsDiscord

Workflow preview (9 nodes)

The template's actual node layout and connections. Node parameters and credential slots unlock with the download.

Stripe Payment FailedStripe TriggerRead the Failure ReasonSetRecoverable Decline?SwitchAsk Them to RetryGmailAsk Them to Update the …GmailEscalate a Hard DeclineSlackLog the Dunning AttemptGoogle SheetsCapture Dunning FailureSetAlert Billing on DiscordDiscord

What's inside (9 nodes)

A look at the node types this workflow uses. No purchase required — full parameters and credentials are yours after you buy.

DiscordGmailGoogle SheetsSetSlackStripe TriggerSwitch

From download to running in 3 steps

  1. 1
    Import. In n8n, open Workflows → menu → “Import from File” and pick the downloaded JSON.
  2. 2
    Connect. Add your own credentials on the app nodes - n8n highlights exactly which ones need them.
  3. 3
    Activate. Run it once to test, then toggle Active. The automation is live.

What you'll learn

Production level

Production-grade: idempotency, dead-letter handling, and reconciliation included.

  • Moving data between Gmail, Slack and Google Sheets in a single run
  • Adding retries and an explicit error path to external calls
  • Testing against pinned sample data before connecting anything real

Every node carries its own documentation on the canvas, plus notes explaining why the architecture was built this way, a credential setup guide, troubleshooting, and three practice exercises. Sample data comes pinned to the trigger, so you can hit Execute and watch data flow before connecting a single account.

Common questions

What exactly do I get?

The complete, ready-to-import n8n workflow as a JSON file, delivered instantly after payment. Import it into your own n8n (cloud or self-hosted), add your credentials, and it runs.

How do I import it into n8n?

In n8n, open Workflows, click the three-dot menu, choose “Import from File”, and select the downloaded JSON. Then connect your own app credentials on the highlighted nodes.

Do I need anything else for it to work?

You need your own n8n instance and accounts/credentials for the apps this workflow connects to (Stripe, Gmail, Slack, Google Sheets, …). No coding is required.

What if it doesn't work for me?

If the file is faulty, won't import, or isn't as described, contact us within 7 days and we'll fix it or refund you - see our refund policy.

Can I modify or resell it?

You can freely adapt and use it in your own or your clients' projects. Reselling or redistributing the template file itself is not permitted.

Original n8n workflow template created and owned by WorkflowCrate. After purchase you receive the ready-to-import JSON file and a license to use and adapt it in your own projects.