Flag Stripe trials that end before onboarding is complete
Create a HubSpot review task when a Stripe trial is ending and the onboarding tracker has not confirmed first value, giving customer success a specific gap to check.
Integrations used in this example
Give customer success a timely, specific review
Stripe's trial-ending event identifies the subscription and customer. This automation looks for that Stripe customer ID in an Airtable onboarding tracker. A row marked First Value Done is left alone. If the row is missing, duplicated, or not marked complete, it creates a high-priority HubSpot task for the customer success owner you choose.
The task says exactly what the tracker showed and asks the owner to check real product usage before contacting the customer. The tracker needs a reliable update from your product or an accountable teammate. Creating the table alone does not measure activation.
The operator reported about 21 days from signup to first real use; by then, roughly half of their trials had expired before customers finished setup.Source: A B2B SaaS team's slow onboarding report on Reddit
What you'll tell the agent
- The Airtable base and onboarding table that track Stripe Customer ID and a First Value Done checkbox.
- How that checkbox will be updated when a customer reaches first value.
- The HubSpot owner who should review trials without confirmed progress.
- 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 tracker and Automate.ax project. It will ask how your product records first value and help connect that signal or arrange a manual owner before deployment. A restricted Stripe key needs Account read and Webhook Endpoints write access.
The automation
A Stripe trial-ending event searches the tracker by customer ID. It creates a HubSpot task unless exactly one row says the first-value milestone is complete.
import { automation, t } from "automate.ax"
import { airtable } from "automate.ax/airtable"
import { hubspot } from "automate.ax/hubspot"
import { stripe } from "automate.ax/stripe"
export default automation(
"Review trials ending before first value",
{
parameters: [
{ label: "Airtable base ID", name: "baseId", type: "text" },
{ label: "Onboarding table name", name: "tableName", type: "text" },
{
label: "HubSpot customer success owner ID",
name: "successOwnerId",
type: "text",
},
],
},
({ parameters }) => {
const trial = stripe.onSubscriptionTrialWillEnd()
const customerId = trial.data.object.customer.transform((customer) =>
typeof customer === "string" ? customer : customer.id,
)
const tracker = airtable.listRecords({
baseId: parameters.baseId,
table: parameters.tableName,
filterByFormula: customerId.transform(
(id) => `{Stripe Customer ID} = '${id}'`,
),
maxRecords: 2,
})
const assessment = tracker.transform(trial, (page, event) => {
const firstValueDone =
page.records[0]?.fields["First Value Done"] === true
const status =
page.records.length === 0
? "No onboarding tracker row"
: page.records.length > 1
? "Multiple onboarding tracker rows"
: firstValueDone
? "First value marked complete"
: "First value not marked complete"
return {
subscriptionId: event.data.object.id,
customerId:
typeof event.data.object.customer === "string"
? event.data.object.customer
: event.data.object.customer.id,
status,
}
})
const needsReview = assessment.filter(
({ status }) => status !== "First value marked complete",
)
hubspot.createTask({
timestamp: trial.created.transform((seconds) => new Date(seconds * 1000)),
ownerId: parameters.successOwnerId,
subject: t`Review trial ending for Stripe subscription ${needsReview.subscriptionId}`,
body: t`Stripe customer: ${needsReview.customerId}\nOnboarding tracker: ${needsReview.status}\nCheck the actual product usage and offer setup help if appropriate. The tracker is not proof of usage.`,
priority: "HIGH",
taskType: "TODO",
})
},
)
What a run looks like
Example input
Stripe says a trial will end soon, and the matching Airtable row has First Value Done unchecked.
Expected result
The configured customer success owner gets a high-priority HubSpot task with the subscription ID, customer ID, and tracker status. No customer email is sent.
Set it up
- Copy the setup prompt at the top into your coding agent.
- Define the first product milestone that signals real value. Ask the agent to create or connect an Airtable table with Stripe Customer ID and First Value Done fields.
- Decide how the field stays current. The agent can connect an available product event, or assign a teammate to update it. Do not treat an unused checkbox as an activation signal.
- Choose a HubSpot owner, authorize Stripe, Airtable, and HubSpot, and have the agent deploy and test with a Stripe test subscription and tracker row.
Check the result
Use Stripe test data. Confirm an unchecked row creates a HubSpot task, a checked row creates none, and a missing or duplicate row creates a task that says the tracker needs review. Check the task's subscription ID against Stripe.
Where this workflow stops
- Stripe sends trial-ending events shortly before the end; this is a late intervention, not a replacement for onboarding during the trial.
- The Airtable checkbox is only as accurate as the process that updates it. A stale checked row suppresses the task; a stale unchecked row creates one.
- The task goes to one configured HubSpot owner and is not associated with a HubSpot contact. The owner must confirm the customer identity and usage.
- This automation neither extends a trial nor changes Stripe billing. A teammate decides whether any outreach or trial change is appropriate.
Common questions
Does Stripe tell the automation whether the customer used the product?
No. Stripe supplies subscription details. Your Airtable tracker supplies the first-value status, and it must be updated from your product or by a responsible teammate.
What if the customer is absent from Airtable?
The owner gets a task saying no tracker row was found. The automation does not assume the customer failed to activate.