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.

Agentic Task
SentryClickSendSlack BotEngineeringOperationsNotifications & AlertsResearch & Monitoring
PromptCreate

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.

Additional information

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.

Frequently asked questions

Will this wake me up for every tiny error?
No. You set a severity threshold based on event count and users affected, so noisy one-off exceptions stay in Sentry and only production-blocking issues page you.
What if the same error spikes hundreds of times?
The workflow remembers which Sentry issues it has already paged during your shift and will not text you again about the same one. You still get the full picture in the Slack thread.
Can I route pages to different people at night versus during the day?
Yes. The prompt includes a quiet-hours override so you can send after-hours alerts to a different number, or keep them Slack-only until morning.
Do I need a paid Sentry plan?
No. Any Sentry plan that lets you view issues and events works. You just need a personal auth token with read access to issues and events.
How fast will I hear about a new incident?
The workflow runs every 5 minutes on a schedule, so worst case you learn about a new production-blocking issue about 5 minutes after Sentry sees it.

Stop finding out about outages from customers.

Connect Sentry, ClickSend, and Slack once, and Geni texts the on-call the moment production breaks.