Give every canceled Stripe subscription a review record
Record each canceled Stripe subscription in Airtable and assign a Linear investigation, so someone reviews the account and confirms why the customer left.
Integrations used in this example
Make cancellation review a repeatable habit
When Stripe reports a deleted subscription, the automation records its subscription ID, customer ID, and event time in Airtable. It also creates a Linear issue for the customer success team with the Airtable record ID.
A teammate checks usage and support history, then writes the confirmed reason in Airtable. The investigation stays visible while the reason remains for a person to confirm.
The founder described personally reviewing each canceled account for about 20 minutes a day to understand the business beyond a churn number.Source: A founder's account-by-account cancellation review on Reddit
What you'll tell the agent
- An Airtable base and table for cancellation reviews.
- The Linear customer success team that will investigate each account.
- Account authorization.
The agent will create the project and ask you for these details. When Automate.ax asks you to connect an account, authorize the integrations you want this workflow to use.
The agent can create the Airtable table, find the Linear team ID, set up the Automate.ax project, and guide account authorization. A restricted Stripe key needs Account read and Webhook Endpoints write access.
The automation
The Stripe event creates a review row first. Its Airtable record ID then appears in the Linear investigation issue.
import { automation, t } from "automate.ax"
import { airtable } from "automate.ax/airtable"
import { linear } from "automate.ax/linear"
import { stripe } from "automate.ax/stripe"
export default automation(
"Create a review record for each canceled subscription",
{
parameters: [
{ label: "Airtable base ID", name: "baseId", type: "text" },
{
label: "Cancellation review table name",
name: "tableName",
type: "text",
},
{
label: "Customer success Linear team ID",
name: "successTeamId",
type: "text",
},
],
},
({ parameters }) => {
const cancellation = stripe.onSubscriptionDeleted()
const details = cancellation.transform(({ id, created, data }) => ({
eventId: id,
eventTime: new Date(created * 1000).toISOString(),
subscriptionId: data.object.id,
customerId:
typeof data.object.customer === "string"
? data.object.customer
: data.object.customer.id,
}))
const record = airtable.createRecord({
baseId: parameters.baseId,
table: parameters.tableName,
fields: {
"Subscription ID": details.subscriptionId,
"Stripe Customer ID": details.customerId,
"Event Time": details.eventTime,
"Review Status": "Needs review",
},
})
linear.createIssue({
teamId: parameters.successTeamId,
title: t`Review canceled Stripe subscription ${details.subscriptionId}`,
description: t`Stripe customer: ${details.customerId}\nStripe cancellation event: ${details.eventId}\nEvent time: ${details.eventTime}\nAirtable review record ID: ${record.id}\n\nReview product usage and any support history, then record the confirmed reason in Airtable. Do not infer why the customer left from the Stripe event alone.`,
priority: 3,
})
},
)
What a run looks like
Example input
Stripe reports that subscription sub_123 was deleted for customer cus_456.
Expected result
Airtable gets a review row marked Needs review, and customer success gets a Linear issue with its record ID. No cancellation reason is invented.
Set it up
- Copy the setup prompt at the top into your coding agent.
- Tell the agent which Linear team owns cancellation reviews. Ask it to create an Airtable table with the fields shown in the code.
- Authorize Stripe, Airtable, and Linear, then have the agent deploy the project.
- Run a cancellation in Stripe test mode and check the Airtable row and Linear issue before enabling the workflow for live subscriptions.
Check the result
Cancel a Stripe test subscription. Compare its subscription ID, customer ID, and event time with the Airtable row and Linear issue; confirm a teammate can update Review Status after investigation.
Where this workflow stops
- A Stripe cancellation event does not explain why the customer left. A person must investigate and record the confirmed cause.
- The example does not join product usage or support data. Add those sources only after deciding which evidence your team trusts.
Common questions
Will this contact customers who cancel?
No. It creates an internal review record and issue. A teammate decides whether and how to contact the customer.
Does the automation identify the churn reason?
No. It records the cancellation and assigns a person to review usage, support history, and any feedback.