Turn recurring Sentry errors into deduped GitHub issues

By General Input

Every 30 minutes, file a tracking GitHub issue for each high-frequency Sentry error, skip ones already filed, and ping engineering in Slack.

Integrations

  • Sentry
  • GitHub
  • Slack

Type

Agentic Task

Categories

  • Engineering

Build me an agent workflow that runs on a cron every 30 minutes and converts recurring production errors in Sentry into actionable, deduped GitHub issues, with a Slack ping to engineering.

Trigger: cron, every 30 minutes.

Step 1. Use the Sentry List Organization Issues operation to fetch unresolved, high-frequency, recent issues from my Sentry organization. Sort by frequency, only include issues with status unresolved, and limit to issues that have been seen in the last 24 hours. Filter to a configurable minimum event count (default 10) so we ignore one-off noise.

Step 2. For each Sentry issue returned, use the GitHub Search Issues and Pull Requests operation against the target repo to look for an existing tracking issue. The search query should look for a marker string of the form sentry-issue-id:<id> in the issue body, scoped to the configured repo. If a match comes back, skip the Sentry issue entirely. This dedupe step is the whole point of the workflow, so do not skip it.

Step 3. For each Sentry issue with no existing tracking issue, use the Sentry List an Issue's Events operation to pull a single representative event so we can include the stack trace and breadcrumbs in the GitHub issue body.

Step 4. Use the GitHub Create an Issue operation to file a tracking issue in the configured repo. The title should be a short, human-readable summary of the error (error type plus the top frame). The body should include: the occurrence count, the number of affected users, the environment, a permalink back to the Sentry issue, the stack trace inside a fenced code block, the most recent breadcrumbs, and a final line containing the dedupe marker sentry-issue-id:<id> so future runs can find it. Keep the marker on its own line at the bottom of the body.

Step 5. Use the GitHub Add Labels to an Issue operation to attach a from-sentry label to the new issue. If the label does not exist yet, that is fine, surface a clear error and stop on that issue.

Step 6. Use the Slack Send a Message operation to post a short alert to the engineering channel. Include the error title, the occurrence count, the affected user count, a link to the new GitHub issue, and a link back to the Sentry issue. One Slack message per newly filed GitHub issue, not a digest.

Configurable inputs: Sentry organization slug, optional Sentry project filter, GitHub repo (owner/name), Slack channel ID, minimum event count threshold, and time window for unresolved issues.

Integrations to use: Sentry, GitHub, and Slack. Do not introduce other services.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes