Page on-call by SMS when Sentry spots a production incident
Every 5 minutes, watch Sentry for new fatal or error-level issues and text the on-call engineer with a link plus a full write-up in Slack.
Build me an agent workflow that pages our on-call engineer over SMS when Sentry surfaces a new production-blocking issue. It should run on a cron trigger every 5 minutes.
On each run, call Sentry's List Organization Issues for a configured organization slug and project, filtered to unresolved issues at level:error or level:fatal with firstSeen inside the last poll window (roughly the last 6 minutes so we do not miss anything on the boundary). Dedupe by Sentry issue ID against a memory of issue IDs already paged during this shift, so a spiking error only pages once.
For each fresh issue that passes the severity gate, call Sentry Retrieve an Issue and Sentry Retrieve an Issue Event (latest event) to pull the exception type and message, the top stack frame (file + function + line), environment, release, tags, and the users-affected count. The severity gate is a configurable threshold on event count and users-affected. Skip anything below the threshold.
Then, for each qualifying issue, do two things in the same run:
1) Draft a short, urgent SMS under 300 characters naming the service, the exception, the number of users impacted, and a direct link to the Sentry issue page. Call ClickSend Send SMS to the configured on-call phone number in E.164 format.
2) Post a richer message to a configured #incidents Slack channel via Slack Bot Send a Message. Include the full summary, environment, release, tags, top stack frame, users-affected count, and the Sentry link so the rest of the team can jump into the thread.
Expose these knobs as workflow inputs: Sentry organization slug, Sentry project slug, on-call phone number, Slack channel, minimum event count, minimum users-affected count, and a quiet-hours override (start hour, end hour, timezone, and an alternate phone number or a Slack-only mode used during those hours).
Keep a small durable memory of the Sentry issue IDs already paged and the shift start time. If no fresh qualifying issues are found on a run, do nothing and exit quietly. Do not send a heartbeat SMS.
What does this prompt do?
- Checks Sentry every 5 minutes for brand-new fatal or error issues in the project you pick.
- Skips issues below the severity you set (event count or users affected), so a single one-off exception does not wake anyone up.
- Texts the on-call phone number a short, urgent message with the service, exception, users impacted, and a direct link to the issue.
- Posts a richer thread in your #incidents Slack channel with tags, environment, release, and a stack snippet so the rest of the team can jump in.
- Remembers which issues have already paged this shift, so a spiking error only pings once.
What do I need to use this?
- A Sentry account with access to the project you want monitored.
- A ClickSend account with SMS credit and the on-call phone number in international format.
- A Slack workspace with a bot user invited to your incidents channel.
How can I customize it?
- Adjust the severity gate. Raise the minimum event count or users-affected threshold if you only want to hear about widespread problems.
- Change the on-call recipient. Point the SMS at a shared rota number, or swap in a new number when the on-call rotation changes.
- Set quiet hours. Route weekend or overnight pages to a different number, or downgrade after-hours alerts to Slack only.
- Pick your Slack channel. Post to #incidents, a per-service channel, or a private engineering room instead.
FAQs
Will this wake me up for every tiny error?
What if the same error spikes hundreds of times?
Can I route pages to different people at night versus during the day?
Do I need a paid Sentry plan?
How fast will I hear about a new incident?
Related templates
Every logo, photo, video cut and ad export in one searchable grid, with previews, campaign tags and rights expiry dates at a glance.
Twice a day we spot the people clicking your pricing and demo pages, create a follow-up task for their owner, and post a ranked recap to Slack.
One board showing every dashboard and Look with its folder, owner and favorite count, so you can find dead content and retire it safely.
Watch every live room on one screen, remove disruptive guests, start recordings and end stuck sessions without anyone opening a terminal.
Every Monday we find leads who never bought, research a real reason to reach out, and send a short personal email instead of another check in.
See the exact hours your chat queue backs up and customers give up waiting, then plan next week's shifts before it happens again.
Stop finding out about outages from customers.
Connect Sentry, ClickSend, and Slack once, and Geni texts the on-call the moment production breaks.