Hourly
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.
- Runs
- Hourly
- Apps
- Segment
- AI
- Not needed
- Access
- Public API token
Send this to your assistant
Create a ClickRuntime automation: every hour, check delivery metrics for my Segment destinations and message me in Slack if any destination has failed deliveries.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Segment sits between a company's apps and the tools that depend on its data: the ad platforms, the warehouse, the email tool, the CRM. When one destination starts failing, nothing visibly breaks in Segment. Events keep arriving. But Facebook conversions stop reaching the ad account, or the warehouse load fails on a schema change, and the damage is quiet. Campaigns run on incomplete data for days before an analyst notices that the numbers in one tool no longer match the others.
Every hour the automation gets delivery metrics for each destination in your workspace, compares the failure rate or failed count with a threshold you choose, and posts to Slack when one is above it. Healthy destinations produce no message at all. Data engineers and marketing operations people use it as a lightweight monitor on the pipes their reporting depends on.
What you get out of it
Ad spend is not wasted on bad data
If conversion events stop reaching an ad platform, its optimization drifts. An hourly alert means the gap is hours long, not a week, and campaign budgets are not spent on stale signals.
Warehouse gaps are repaired sooner
Failed deliveries to a warehouse leave holes in tables that analysts rely on. Learning of the failure within an hour makes replay or backfill easier and keeps dashboards trustworthy. One failed load on a Tuesday leaves a hole in every revenue table built on that day.
Root causes are easier to find
A failure that starts at a known hour points to a specific change, like an expired API key or a renamed field. A short time window narrows the search to a handful of recent deploys.
Owners know which destination is affected
The message names the destination, so the person who manages that tool can act. Nobody has to open the Segment workspace and click through every destination page to find the problem.
Silence means things are working
The check posts only when a threshold is crossed, so the channel stays quiet on normal days. A message therefore carries weight and is read promptly, rather than being muted as noise.
How it works
What happens, step by step
Every hour, ClickRuntime checks how many deliveries to each Segment destination failed in the last hour.
It keeps the destinations whose failures are over the limit you set.
If any are, your Slack channel gets a message listing each destination and how many deliveries failed.
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 clickruntime import on_trigger, credentials, http, state, notify
SOURCE_ID = "qwerty1234"
DESTINATIONS = {"dest_abc123": "Amplitude", "dest_def456": "BigQuery"}
@on_trigger
def run(event):
headers = {"Authorization": f"Bearer {credentials.secret('SEGMENT_TOKEN')}"}
alerted = state.get("alerted") or {}
problems = []
for dest_id, name in DESTINATIONS.items():
data = http.get(f"https://api.segmentapis.com/destinations/{dest_id}/delivery-metrics",
headers=headers, params={"sourceId": SOURCE_ID, "granularity": "HOUR"}).json()
summary = data["data"]["deliveryMetricsSummary"]
failed = sum(m["total"] for m in summary["metrics"] if m["metricName"].startswith("discarded")
or m["metricName"].startswith("failed"))
if failed and alerted.get(dest_id) != summary["endTime"]:
problems.append(f"• {name}: {failed:,} failed deliveries")
alerted[dest_id] = summary["endTime"]
if problems:
notify.slack("Segment delivery failures in the last hour:\n" + "\n".join(problems), channel="#data")
state.set("alerted", alerted)
return {"failing": len(problems)}FAQ
Common questions
What counts as a delivery failure in Segment?
Can I set a different threshold for each destination?
Which Segment access is needed?
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
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.
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 “Hear when a Segment destination starts failing” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.