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
- Triggers when a Stripe subscription is cancelled and looks up the customer to capture email and any Stripe billing-portal cancellation feedback.
- 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.
- Triggers again when the customer submits the n8n Form, and normalizes the survey response into the same churn record format.
- 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.
- Emails you a structured churn note via Gmail, flagged by urgency based on the AI assessment.
- Appends the churn details and category to a Google Sheets spreadsheet for ongoing reporting.
Setup
- Connect Stripe credentials and ensure the Stripe Trigger listens for the customer.subscription.deleted event.
- Set an Anthropic API key as an environment variable named ANTHROPIC_API_KEY for the Claude HTTP request.
- Connect Gmail credentials for sending the customer survey email and sending internal notifications.
- Connect Google Sheets credentials and select the target spreadsheet and sheet for the churn log.
- Update the configuration values for brand name, sender name, notification recipient, and paste the n8n Form Trigger production URL into the survey link field.