Recover failed Stripe payments by decline reason with Gmail and CRM
Ready for 3.0What this workflow does
This workflow has 22 nodes and runs on Stripe events (invoice.payment failed). Along the way it connects Stripe and Gmail. It also calls api.stripe.com over HTTP.
How it runs
Trigger: On Stripe events (invoice.payment failed).
- Set Initial Configurations (Edit Fields (Set)): sets 4 fields: teamEmail, companyName, crmWebhookUrl…
- Initialize Recovery Case (Code): runs custom JavaScript code
- Fetch Latest Stripe Charge (HTTP Request): calls api.stripe.com
- Determine Decline Reason (Code): runs custom JavaScript code
- Configure Recovery Schedule (Code): runs custom JavaScript code
- Route by Decline Type (Switch): routes items into 3 branches
- Notify Retry Scheduled (Gmail): uses Gmail
- Request Card Update (Gmail): uses Gmail
- Email Risk Alert (Gmail): uses Gmail
- Email Unclassified Alert (Gmail): uses Gmail
…plus 10 more steps. See the full node list below.
Services it uses
Other Stripe + Gmail templates (44)
HTTP calls to: api.stripe.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (9)
- Stripe Trigger
n8n-nodes-base.stripeTrigger - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Wait
n8n-nodes-base.wait - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick overview This workflow listens for failed Stripe invoice payments, classifies the decline reason, and then either emails the customer via Gmail, alerts your billing team, and/or updates your CRM through an inbound webhook, including follow-up retries…