Sentry alerts in Telegram: new errors in your team chat

Sentry alerts in Telegram take no code in nana800: Sentry sends a webhook about a new error to the address of your scheme, and the bot posts its title and link to a private chat or team chat. You need a bot from @BotFather and access to the organization settings in Sentry, with no server and no plugins. One alert is two runs at the basic block price.

Build it in the builder

What you can automate

  • Post every new error to the team chat: title, project and an Open in Sentry button
  • Get only what matters: a Sentry alert rule, such as an error seen more than 100 times in an hour, sends the webhook through the integration
  • Know when an issue is resolved, assigned or ignored: Sentry sends these events as webhooks too
  • Add how many times the error happened and for how many users: the Sentry.io Request block reads the issue by ID
  • Route errors to different chats: the free condition block sends one project to one group and the rest to another

How to set it up

  1. 1

    Create a scheme with a webhook

    Create a scheme in the builder and add the webhook trigger with the POST method and a path such as /sentry. Turn the scheme on: a disabled scheme answers webhooks with an error. Press the API button in the builder and copy the webhook address.

  2. 2

    Create an internal integration in Sentry

    In Sentry open Settings, Developer Settings and create an Internal Integration. Paste the nana800 address into Webhook URL, give read access to Issue & Event and tick the issue subscription in the Webhooks section: Sentry will then send every new error.

  3. 3

    Or send only alert rule notifications

    If you do not need every error, turn on Alert Rule Action in the integration. Then create an alert rule in Alerts with a condition, such as an error seen more than 100 times in an hour, and pick sending through this integration as the action.

  4. 4

    Add the Telegram message send block

    Trigger a test error and open the run history of the scheme: the trigger body holds action (what happened) and data with the error: title, project, level and link. Add the Telegram message send block, paste the bot token and chat ID, put these fields into the text and pick the plain_text format. Put the link into a button.

  5. 5

    Answer Sentry right away

    Put the free webhook response block with code 200 right after the trigger: Sentry gets its answer without waiting for the message, and the scheme keeps going.

  6. 6

    Add details (optional)

    The Sentry.io Request block with the issue section, the get action and the issue ID from the webhook returns how many times the error happened and for how many users. It needs a Sentry token with event:read. Keep the scheme on. While it is on, it costs $0.0042 per hour.

Pricing

A run of a Sentry block costs $0.002, a run of a Telegram block costs $0.001. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Sentry

    Fetch Sentry issues, change their status, assign owners and create releases without code. Free balance every month, no card needed.

  • Telegram

    Build a Telegram bot without code: reply to messages, add buttons, send leads and alerts to a chat, group or channel. Free balance every month, no card needed.

Frequently asked questions

One alert is a webhook trigger run and a Telegram send, both at the basic block price ($1 per 1,000 runs). The webhook response and condition blocks are free, and a Sentry.io Request run costs twice the basic price. The scheme stays on all the time, which is $0.0042 per hour. Your balance is topped up to $3.50 for free every month, and most of it goes to scheme hours.

Not for the alerts themselves: Sentry sends them to the webhook address on its own. A token is needed only if the scheme reads more data with the Sentry.io Request block. Create it in Settings, Developer Settings, Organization Tokens or Personal Tokens, and event:read is enough to read issues.

Every webhook is a separate scheme run and a separate message. If errors come in bulk, send alert rule notifications with a threshold instead of every new error, for example more than 100 events in an hour. You can also skip warnings with the free condition block by comparing the error level with error.

Yes, if your Sentry can send requests to the internet: the nana800 webhook accepts them from any address. For the Sentry.io Request block choose the self_hosted server and enter the address of your Sentry, which must be reachable from the internet.

Check that the scheme is on and the trigger uses POST, otherwise nana800 answers with an error. The Sentry integration needs the issue subscription ticked or an alert rule with an action through it. If the run history has the run but no message came, open the Telegram block result: it has the error text, for example that the bot is not in the group.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder