Recover failed Stripe payments with OpenAI, Gmail, Sheets and Slack
Ready for 3.0What this workflow does
This AI workflow has 9 nodes and runs on Stripe events (invoice.payment failed). Along the way it connects Stripe, OpenAI Chat Model, Gmail and Google Sheets and 1 more.
How it runs
Trigger: On Stripe events (invoice.payment failed).
- Prepare Invoice Data (Edit Fields (Set)): sets 6 fields: customer_email, customer_name, amount_due…
- Draft Dunning Email (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Dunning Model; output parser: Configure Dunning Output
- Send Email via Gmail (Gmail): uses Gmail
- Append to Dunning Sheet (Google Sheets): append
- If: checks a condition and branches into true / false
- Notify Owner on Slack (Slack): post (message)
Services it uses
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.
Nodes used (9)
- Stripe Trigger
n8n-nodes-base.stripeTrigger - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack
From the author
Quick Overview This workflow triggers on failed Stripe invoice payments, uses OpenAI to generate an escalating dunning email, sends it through Gmail, logs the attempt to Google Sheets, and notifies the owner in Slack when the final reminder threshold is…