Track Stripe cancellations and classify churn reasons with Claude and Gmail
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (10)
- Stripe Trigger
n8n-nodes-base.stripeTrigger - Stripe
n8n-nodes-base.stripe - Code
n8n-nodes-base.code - n8n Form Trigger
n8n-nodes-base.formTrigger - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets
What it does
Quick overview This workflow tracks Stripe subscription cancellations, emails a one-question exit survey when no cancellation reason is available, categorizes the stated reason with Anthropic Claude, then notifies you via Gmail and logs each churn record to Google Sheets. How it works 1. Triggers when a Stripe subscription is cancelled and looks up the customer to capture email and any Stripe billing-portal cancellation feedback. 2. If Stripe already contains a cancellation reason, it skips the survey and proceeds with that reason; otherwise it sends the customer a Gmail message linking to an n8n Form exit survey. 3. Triggers again when the customer submits the n8n Form, and normalizes the survey response into the same churn record format. 4. Sends the captured reason text and account context to Anthropic Claude (via HTTP request) to classify the churn into a fixed category and decide if it is preventable and worth a human follow-up. 5. Emails you a structured churn note via Gmail, flagged by urgency based on the AI assessment. 6. Appends the churn details and category to a Google Sheets spreadsheet for ongoing reporting. Setup 1. Connect Stripe credentials and ensure the Stripe Trigger listens for the customer.subscription.deleted event. 2. Set an Anthropic API key as an environment variable named ANTHROPICAPIKEY for the Claude HTTP request. 3. Connect Gmail credentials for sending the customer survey email and sending internal notifications. 4. Connect Google Sheets credentials and select the target spreadsheet and sheet for the churn log. 5. Update the configuration values for brand name, sender name, notification recipient, and paste the n8n Form Trigger production URL into the survey link field.