Page on-call by SMS when Sentry spots a production incident

By General Input

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.

Integrations

  • Sentry
  • ClickSend
  • Slack Bot

Type

Agentic Task

Categories

  • Engineering
  • Operations

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.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them