Telegram alerts

Bugsink sends alerts through a Telegram bot to a private chat, group, channel, or group topic.

Create a bot and find the destination

  1. Open @BotFather, run /newbot, and follow the prompts.
  2. Copy the bot token and keep it secret. Anyone with the token can control the bot.
  3. Add the bot to the destination group. For a channel, make the bot an administrator so it can post. For a private chat, send the bot a message.
  4. Determine the destination’s numeric chat ID, or use a public channel username such as @errors.

For a private chat or group, send the bot a message and inspect the message.chat.id returned by https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates. Telegram’s bot tutorial covers bot creation, and the Bot API documents getUpdates.

Add the bot to Bugsink

  1. Open Projects and select the project’s megaphone icon (Alerting Settings).
  2. Select Add, enter a display name, and choose Telegram.
  3. Enter the bot token and the numeric chat ID or @channelusername.
  4. For a group with topics enabled, optionally enter its numeric topic ID.
  5. Save the service, select Test, and check Telegram.

A topic ID can only be combined with a numeric chat ID. The Bot API calls this value message_thread_id; it is present on messages sent inside a topic.

A Bugsink test alert delivered in Telegram
A successful Bugsink test message in Telegram.

See the alerts overview for alert conditions, multiple destinations, and delivery-failure reporting.