Back to docsRecipe
Recipe: Churn save email writer
Automatically generate and send personalized retention emails when a user cancels their subscription. This recipe wires up a churn webhook to an AI email writer that crafts compelling save offers based on the user's plan, usage history, and cancellation reason.
Ingredients
- 1Stripe cancellation webhook or Nimbus churn event
- 2User profile lookup (plan tier, days active, feature usage)
- 3AI prompt template with brand voice and save-offer rules
- 4Email delivery via Resend or SendGrid
Flow
- AStripe sends a
customer.subscription.deletedevent to your webhook endpoint. - BLook up the user's plan, feature adoption, and cancellation survey response from your database.
- CBuild a prompt with the user context and send to your LLM. The prompt instructs the model to write a warm, benefit-focused email offering a discount or feature unlock.
- DDeliver the generated email. Log the send for A/B testing open and recovery rates.
Prompt template
You are a retention specialist for Nimbus.
Write a short, warm email to {{user_name}} who
just canceled their {{plan_name}} plan.
Their top-used features: {{top_features}}.
Cancellation reason: {{cancel_reason}}.
Offer {{discount_percent}}% off for 3 months if
they reactivate within 48 hours. Keep it under
120 words. Do not sound desperate.Next: read Recipe: Trial expiry nudge