Every 15 minutes
Text you and alert Slack when a metric crosses a threshold
When a number you watch crosses your limit, you get a text and the team gets a Slack message, once per breach.
- Runs
- Every 15 minutes
- Apps
- Slack, Twilio
- AI
- Not needed
- Access
- Twilio send; chat:write
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, check our error rate at my metrics URL; if it goes over 5%, text me and post to #ops, and don't alert again until it recovers.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Small teams watch a handful of numbers that really matter: error rates, queue lengths, ad spend, stock. A Slack message alone is easy to miss after hours, and texting everyone for every blip burns people out.
Texting the person responsible and posting in Slack the moment a threshold is crossed, and only once per breach, gets attention when it matters without crying wolf.
What you get out of it
Noticed after hours
A text reaches you when Slack is muted.
The team stays informed
The Slack post lets everyone see what's happening.
One alert per problem
You're alerted again only after the value recovers.
Any metric
Works with any number you can fetch from a web address.
How it works
What happens, step by step
Every 15 minutes it fetches the metric from your source.
The value is compared with your threshold.
If it has just crossed, you get a text and a message is posted to Slack.
When it comes back within limits, a recovery note is posted and the alert resets.
Before it runs live
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
- Connect Twilio
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 Google Sheets
- Combine it with other Slack and Twilio steps into one automation
Under the hood
The code that runs this automation
from twilio.rest import Client
from clickruntime import on_trigger, credentials, http, notify, state
METRIC_URL = "https://metrics.example.com/api/error-rate"
LIMIT = 5.0
ON_CALL = "+447700900123"
FROM = "+15005550006"
def sms(to, body):
return Client(credentials.secret("TWILIO_ACCOUNT_SID"), credentials.secret("TWILIO_AUTH_TOKEN")).messages.create(to=to, from_=FROM, body=body)
@on_trigger
def run(event):
value = float(http.get(METRIC_URL, headers={"Authorization": f"Bearer {credentials.secret('METRICS_TOKEN')}"}).json()["value"])
breached, was = value > LIMIT, bool(state.get("breached"))
if breached and not was:
sms(ON_CALL, f"⚠️ Error rate {value:.1f}% (limit {LIMIT:.0f}%)")
notify.slack(f":rotating_light: Error rate is {value:.1f}% (limit {LIMIT:.0f}%)", channel="#ops")
elif was and not breached:
notify.slack(f":white_check_mark: Error rate back to {value:.1f}%", channel="#ops")
state.set("breached", breached)
return {"value": value}FAQ
Common questions
Can I watch more than one metric?
Will it tell me when it recovers?
Can different people get the text?
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
Text appointment reminders and see confirmations in Slack
Clients get a text the day before their appointment, and the team sees in Slack who confirmed, cancelled or wants to reschedule.
See how it worksText quiet leads a follow-up and nudge sales in Slack
Leads who haven't replied in a few days get a short, friendly follow-up text, and sales gets a Slack summary of who was nudged.
See how it worksText back missed callers and post a call-back note in Slack
If you miss a call, the caller gets a text right away and a call-back note appears in Slack.
See how it worksKeep exploring
Set up “Text you and alert Slack when a metric crosses a threshold” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.