Retry failed payments with a payment API, Google Sheets, and Gmail
Ready for 3.0What this workflow does
This workflow has 26 nodes and runs when an HTTP GET request hits its webhook URL (plus 1 other trigger). Along the way it connects Google Sheets and Gmail.
How it runs
Trigger: When an HTTP GET request hits its webhook URL (plus 1 other trigger).
- Clean Up Payment Details (Code): runs custom JavaScript code
- Load Retry Queue (Google Sheets): uses Google Sheets
- Check If Event Already Saved (Google Sheets): uses Google Sheets
- Keep Only Due Payments (Code): runs custom JavaScript code
- Mark Duplicate or New (Code): runs custom JavaScript code
- Process One Payment at a Time (Loop Over Items (Split in Batches)): loops over the items in batches
- Is This a Duplicate? (If): checks a condition and branches into true / false
- Call Payment API to Retry (HTTP Request): calls an HTTP API (POST)
- Decide Retry Timing (Code): runs custom JavaScript code
- Read Retry Result (Code): runs custom JavaScript code
…plus 12 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102)
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)
- Google Sheets
n8n-nodes-base.googleSheets - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Gmail
n8n-nodes-base.gmail - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow receives failed-payment webhooks, logs retryable failures to a Google Sheets queue with reason-based retry timing, retries due payments on a 15-minute schedule via an HTTP payment API call, and notifies customers through Gmail…