Daily
Get a daily event count for each Segment source
Each morning you get yesterday's event volume per source, with any source down more than 20% called out.
- Runs
- Daily
- Apps
- Segment
- AI
- Not needed
- Access
- Public API token (Workspace Member read)
Send this to your assistant
Create a ClickRuntime automation: every morning at 7, email me yesterday's Segment event count for each source and flag any source that dropped more than 20% from the day before.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Event volume is one of the best signs that tracking still works. A mobile release breaks the signup event and the count drops by 40 percent. A website change removes a tag and a source goes silent. A bot floods another source and the count triples. In Segment, you only see this by opening each source's dashboard and comparing it to what you remember, so these shifts go unnoticed until reports look strange or a product manager asks why activation fell.
Each day the automation queries event volume for every source, compares it with the numbers stored from earlier days, and emails you a digest. Sources with a large change are flagged at the top. Data and analytics teams use it to start the morning knowing which sources need a closer look before they trust the dashboards built on them.
What you get out of it
Broken tracking found the day it breaks
A source that drops sharply after a release is flagged the next morning. Fixing a missing event in a day saves weeks of unusable data in funnel and retention reports.
Spam and bot floods noticed
A sudden surge in events from one source can mean bot traffic or a looping client. Seeing it early protects event-based billing and keeps analytics from being skewed by junk.
Dashboards can be trusted
Analysts can check the digest before presenting numbers. If a source was flagged as unusual yesterday, they know to qualify a chart rather than present a drop as a real change in behavior.
A baseline for each source
Stored history lets the digest say what is unusual for that source, instead of one fixed rule. A source with 2,000 events a day and one with 2 million are each compared with themselves.
Less time on routine checking
Opening a dozen source dashboards daily is repetitive work. One email covers all of them, with only the exceptions highlighted, so the person responsible can start real analysis sooner. Opening twelve source pages each morning takes twenty minutes that an analyst could spend on a funnel.
How it works
What happens, step by step
Every morning, ClickRuntime gets yesterday's event count for each of your Segment sources.
It compares each count with the one saved from the day before.
You get an email with every source's volume, and any source that fell by more than 20% is marked with a warning.
Today's counts are saved for tomorrow's comparison.
Before it runs live
- Connect Segment
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 Segment steps into one automation
Under the hood
The code that runs this automation
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, state, notify
@on_trigger
def run(event):
day = date.today() - timedelta(days=1)
resp = http.get("https://api.segmentapis.com/events/volume",
headers={"Authorization": f"Bearer {credentials.secret('SEGMENT_TOKEN')}"},
params={"granularity": "DAY", "groupBy": "source",
"startTime": f"{day}T00:00:00Z", "endTime": f"{day + timedelta(days=1)}T00:00:00Z"})
resp.raise_for_status()
counts = {r["source"]["id"]: r["total"] for r in resp.json()["data"]["result"]}
before = state.get("counts") or {}
lines = []
for source, total in sorted(counts.items(), key=lambda kv: -kv[1]):
prev = before.get(source)
flag = " ⚠ down {:.0%}".format(1 - total / prev) if prev and total < prev * 0.8 else ""
lines.append(f"{source}: {total:,}{flag}")
notify.email_me(f"Segment events for {day}", "\n".join(lines))
state.set("counts", counts)
return {"sources": len(counts)}FAQ
Common questions
How does it decide that a change is big?
Does it show volume per event name or only per source?
What happens on weekends when volume naturally drops?
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
Hear when a Segment destination starts failing
Within the hour, you know which destination is failing deliveries instead of finding gaps in a report later.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksPost a morning briefing to Slack
Your team starts the day with the weather, a reminder or anything else you'd like in #general.
See how it worksKeep exploring
Set up “Get a daily event count for each Segment source” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.