Skip to content

The moment it happens

Ask cancelling customers why, and get a weekly churn summary

Customers who cancel get one personal question by email, their replies are sorted by reason, and you get a weekly summary.

Runs
The moment it happens
Apps
Gmail, Stripe
AI
Yes, uses the built-in AI allowance
Access
Stripe read; gmail.modify

Send this to your assistant

Create a ClickRuntime automation: when a Stripe subscription is cancelled, email the customer from Gmail asking why they left; classify their replies with AI and send me a weekly churn summary.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A subscription app loses a few dozen customers a month. Stripe records that they cancelled but not why, and the in-app cancellation form gets skipped. The founder has a guess (price, a missing feature, a competitor), but no evidence, so the roadmap is shaped by whoever complained loudest.

This automation sends every cancelling customer one short, personal question from the founder's Gmail. People reply to a plain email far more readily than to a survey. The replies are read and sorted into reasons such as price, missing feature or switched tool, and once a week a summary lands in the inbox showing what is actually driving churn.

What you get out of it

  • Real reasons, not guesses

    Customers say in their own words why they left, and those answers are collected in one place.

  • Higher reply rates

    A one-line question from a person's address gets more answers than a form or survey link.

  • Reasons sorted for you

    AI groups replies into a few categories, so trends are visible without reading every email.

  • A weekly view of churn

    One summary email each week shows counts by reason and a few representative quotes.

  • Chances to win customers back

    Some replies describe a fixable problem, and you see them while there is still time to respond.

How it works

What happens, step by step

  1. When a subscription is cancelled, Stripe tells ClickRuntime straight away, and the message is checked to be genuinely from Stripe.

  2. The customer is emailed one short question from your Gmail, and the conversation is remembered.

  3. Each day, ClickRuntime checks those conversations for replies, and AI sorts each new reply into a reason.

  4. Once a week, you get an email with the number of cancellations by reason and a few quotes.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Stripe
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Ask cancelling customers why, and get a weekly churn summaryjust nowSucceeded
Email · Weekly churn summaryprice: 4 · missing feature: 3 · switched tool: 2 · no longer needed: 1. 'We needed a Xero integration' came up twice.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Gmail and Stripe steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
cancellation_exit_survey_and_churn_reasons.pyexample
import base64, stripe, time
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, on_trigger, credentials, verify, state, ai, notify, report_fetched

@on_event
def handle(event):
    if not verify.stripe(event.body, event.header("Stripe-Signature"), credentials.secret("STRIPE_WEBHOOK_SECRET")):
        return {"ignored": "bad signature"}
    email = stripe.Customer.retrieve(event.json["data"]["object"]["customer"], api_key=credentials.secret("STRIPE_API_KEY")).email
    msg = EmailMessage(); msg["To"], msg["Subject"] = email, "Quick question"
    msg.set_content("Sorry to see you go. What was the main reason you cancelled? A one-line reply is plenty.")
    build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(
        userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
    state.set("asked", (state.get("asked") or []) + [email])
    return {"asked": email}
@on_trigger
def check(event):
    g = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages()
    replies = [m for e in state.get("asked") or [] for m in g.list(userId="me", q=f"from:{e} newer_than:1d").execute().get("messages", [])[:1]]
    report_fetched(len(replies))
    if not replies:
        return {"replies": 0}
    reasons = (state.get("reasons") or []) + [ai.generate("Classify this cancellation reply as price, missing feature, switched tool, no longer needed, technical problems or other. "
        "Answer with the category only.\n" + g.get(userId="me", id=m["id"]).execute()["snippet"], max_output_tokens=10).text.strip() for m in replies]
    if time.gmtime().tm_wday == 0:
        notify.email_me("Weekly churn reasons", "\n".join(f"{r}: {reasons.count(r)}" for r in sorted(set(reasons)))); reasons = []
    state.set("reasons", reasons)
    return {"replies": len(replies)}

FAQ

Common questions

What does the customer receive?
A short plain email from your address, such as 'Sorry to see you go. What was the main reason you cancelled?' You can change the wording.
Which reasons does it sort into?
By default: price, missing feature, switched to another tool, no longer needed, technical problems and other. You can give your AI assistant your own list.
What if they don't reply?
Nothing else is sent. One question is enough, and customers who don't answer are counted as no reply in the weekly summary.
What permissions does it need?
Stripe read; gmail.modify. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Ask cancelling customers why, and get a weekly churn summary” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.