Stripe and Slack: AI Churn-Signal Classifier Template
A scheduled Spojit workflow that lists your Stripe subscriptions, classifies each account as healthy, at-risk, or churning, and posts the at-risk ones to a Slack channel.
What It Builds
This template runs on a Schedule trigger, then uses an Agent-mode Connector node on the Stripe connector to list active subscriptions and recent payment history. The agent classifies each account into a churn-risk band with structured output, and a Slack Connector node posts the at-risk and churning accounts to a channel so your team can reach out before the renewal lapses. Healthy accounts are skipped to keep the channel signal high.
The Prompt
Paste this into Miraxa, the intelligent layer across your automation, and it builds the workflow, connecting the tools for you:
Build a workflow that runs every weekday at 8am and uses the Stripe connector in Agent mode to list active subscriptions along with their recent invoices and charges. For each account, classify it as healthy, at-risk, or churning based on failed payments, downgrades, and lapsed renewals, and return structured output with the customer name, classification, a short reason, and the monthly amount. For every account classified as at-risk or churning, post a message to the #customer-success Slack channel with the customer name, the risk band, the reason, and the amount at stake.
Connectors Used
- Stripe - lists subscriptions, invoices, and charges so the agent can judge payment health. Triggered on a Schedule (5-field cron, for example
0 8 * * 1-5, with an IANA timezone). - Slack - posts each at-risk or churning account to a channel using
send-message. - Agent-mode Connector node - reads the Stripe data and returns a structured classification per account via a Response Schema.
Customize It
Change 0 8 * * 1-5 in the prompt to your preferred cadence and timezone, swap #customer-success for your own Slack channel, and adjust the risk definitions (for example, treat two or more failed charges as churning). You can also tell Miraxa to include only accounts above a monthly amount so the channel focuses on your highest-value renewals, all without writing a second prompt.
Tips
- Add your Stripe and Slack connections first under Connections so Miraxa can wire the nodes to live credentials. Stripe needs read access to customers, subscriptions, invoices, and charges.
- The classification step belongs in Agent mode because it weighs several signals and returns structured output. Keep the Slack post in Direct mode with
send-messagefor a predictable, low-cost write. - Open the properties panel after Miraxa scaffolds the workflow to confirm the Response Schema fields (
customer,classification,reason,amount) match what your Slack message template references.
Common Pitfalls
- A large customer base can mean many subscriptions per run. Narrow the Stripe query to active subscriptions and a recent invoice window so the agent does not classify stale accounts.
- Cron in the Schedule trigger runs in the timezone you set, not the viewer's local time. Pick the right IANA zone (for example
Australia/Sydney) so the run lands during working hours. - If every account posts to Slack, your classification thresholds are too loose. Tighten the at-risk and churning definitions in the prompt or the agent's instructions so healthy accounts are filtered out.
Related
- How to Send Slack Alerts for Subscription Payment Events for a real-time variant on payment events.
- How to Use Structured Output for Reliable AI Data Extraction to shape the classification schema.
- How to Choose Between Agent Mode and Direct Mode to decide which node mode fits each step.