Configuring Telegram Integration

StatusDrift integrates with Telegram to send monitoring alerts directly to your Telegram chats or groups. This guide explains how to configure the Telegram integration using a bot to receive real-time notifications.

What This Integration Does

The Telegram integration sends messages to your configured chat when:

  • A monitored service goes down or becomes degraded
  • A service recovers and returns to normal status
  • SSL certificates are approaching expiration
  • Performance thresholds are exceeded

Prerequisites

Before configuring the Telegram integration, ensure you have:

  • A StatusDrift account with at least one monitor configured
  • A Telegram account
  • Access to create a Telegram bot (via BotFather)

Step 1: Create a Telegram Bot

First, create a bot using Telegram’s BotFather:

  1. Open Telegram and search for @BotFather
  2. Start a conversation and send the command /newbot
  3. Follow the prompts to set a name for your bot (e.g., “StatusDrift Alerts”)
  4. Choose a username for the bot (must end in “bot”, e.g., “statusdrift_alerts_bot”)
  5. BotFather will provide an API token – copy and save this securely

Step 2: Get Your Chat ID

To send messages, you need your Telegram chat ID:

For personal chats:

  1. Search for your new bot in Telegram and start a conversation
  2. Send any message to the bot
  3. Visit https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates in your browser
  4. Find the chat.id value in the response

For group chats:

  1. Add your bot to the group
  2. Send a message in the group that mentions the bot
  3. Use the same getUpdates URL to find the group’s chat ID (will be a negative number)

Step 3: Add the Telegram Channel in StatusDrift

Now configure the integration in your StatusDrift dashboard:

  1. Log in to your StatusDrift account at app.statusdrift.com
  2. Navigate to Notification Channels in the sidebar
  3. Click Add Channel
  4. Select Telegram from the integration type dropdown
  5. Enter a descriptive name for this channel
  6. Enter the Bot Token from BotFather
  7. Enter the Chat ID where notifications should be sent
  8. Click Save to create the channel

Step 4: Assign to Monitors

Connect the notification channel to your monitors:

  1. Go to Monitors in the sidebar
  2. Select the monitor you want to receive Telegram notifications
  3. Scroll to the Notification Channels section
  4. Check the box next to your Telegram channel
  5. Save the monitor configuration

Testing the Integration

Verify your Telegram integration is working:

  1. Go to Notification Channels
  2. Find your Telegram channel in the list
  3. Click the Test button
  4. Check your Telegram chat for the test message

Configuration Options

The Telegram integration supports these configuration options:

FieldRequiredDescription
Bot TokenYesThe API token provided by BotFather when creating your bot
Chat IDYesThe Telegram chat ID where notifications will be sent
Parse ModeNoMessage formatting mode (HTML or Markdown)
Disable NotificationNoSend messages silently without notification sound

Troubleshooting

Messages not being received

  • Verify the bot token is correct and the bot has not been deleted
  • Confirm the chat ID is correct (personal chats are positive, groups are negative)
  • Ensure you have started a conversation with the bot (required for personal chats)
  • For groups, verify the bot has been added and has permission to post

Bot removed from group

  • Re-add the bot to the group
  • The chat ID may change – verify and update in StatusDrift if needed

Rate limiting

  • Telegram has rate limits for bot messages
  • If you have many monitors, consider grouping alerts or using fewer notification channels

Was this article helpful?