On a schedule
Get a Slack list of Chargebee trials ending soon
Every weekday at 9am, Chargebee trials ending in the next 3 days are posted to Slack with the customer, plan, end date and whether a payment method is on file.
- Runs
- On a schedule
- Apps
- Chargebee
- AI
- Not needed
- Access
- read-only key; chat:write
Send this to your assistant
Create a ClickRuntime automation: every weekday at 9am, post to #sales in Slack the Chargebee subscriptions whose trial ends in the next 3 days, with customer, plan, trial end date and whether they have a card on file.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The last days of a trial are when a short, helpful message changes the outcome. Chargebee knows exactly when each trial ends, but the sales team usually finds out after the subscription has already cancelled.
This checks Chargebee every weekday morning and posts the trials ending within three days to Slack. Trials with no saved card are marked and listed first, since those are the ones that will not convert on their own.
It suits SaaS teams with self-serve trials, founders who handle sales themselves and customer success teams that run onboarding calls.
What you get out of it
Reach out before the trial ends
Three days' notice leaves time for a check-in email or a short call. After the end date, the customer has already moved on.
Focus on trials at risk
Flagging no-card trials shows where effort makes a difference. Customers who already added a card need less attention.
Daily habit in the sales channel
A morning post in Slack fits into how the team already works. No one needs to build a saved view in Chargebee.
Plan names included
Knowing whether a trial is on the starter or growth plan helps decide who should follow up and what to say.
Read-only key
The automation reads subscriptions and customers. It cannot extend trials, change plans or charge anyone.
How it works
What happens, step by step
Every weekday morning ClickRuntime asks Chargebee for subscriptions still in trial.
It keeps those whose trial ends within the next three days.
For each one it notes the customer, plan, end date and whether a payment method is saved.
The list is posted to your Slack channel, with no-card trials flagged first.
Before it runs live
- Connect Chargebee
What you get
Build your own
Need it to work differently?
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
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Chargebee steps into one automation
Under the hood
The code that runs this automation
import time
from datetime import datetime
from clickruntime import on_trigger, credentials, http, notify
SITE = "yourcompany" # yourcompany.chargebee.com
DAYS = 3
@on_trigger
def run(event):
api, auth = f"https://{SITE}.chargebee.com/api/v2", (credentials.secret("CHARGEBEE_API_KEY"), "")
params = {"status[is]": "in_trial", "trial_end[before]": int(time.time()) + DAYS * 86400,
"sort_by[asc]": "updated_at", "limit": 100}
rows = http.get(f"{api}/subscriptions", auth=auth, params=params).json()["list"]
if not rows:
return {"ending": 0}
lines = []
for r in sorted(rows, key=lambda r: (r["customer"].get("payment_method") is not None, r["subscription"]["trial_end"])):
c, s = r["customer"], r["subscription"]
name = c.get("company") or f"{c.get('first_name', '')} {c.get('last_name', '')}".strip() or c.get("email", c["id"])
card = c.get("payment_method") is not None
when = datetime.fromtimestamp(s["trial_end"]).strftime("%a %d %b")
lines.append(f"{'✅' if card else '⚠️'} {name} ({c.get('email', '')}) · {s['subscription_items'][0]['item_price_id']} "
f"· ends {when} · {'card on file' if card else 'no card'}")
notify.slack(f"⏳ {len(rows)} Chargebee trials end in the next {DAYS} days\n" + "\n".join(lines), channel="#sales")
return {"ending": len(rows)}FAQ
Common questions
Why does it matter whether there is a card on file?
Can it skip weekends?
Does it work with Chargebee's older product catalog?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Email a list of cards expiring this month
On the first of each month you get the customers whose saved cards run out before their next renewal.
See how it worksPost a daily Chargebee revenue summary to Slack
Every morning at 8am Slack gets yesterday's Chargebee figures: money collected, failed payments, refunds, new subscriptions and cancellations.
See how it worksAnnounce new Chargebee subscriptions in Slack
Each new subscription is posted with the customer, plan and amount as soon as it's created.
See how it worksKeep exploring
Set up “Get a Slack list of Chargebee trials ending soon” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.