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:
- Open Telegram and search for @BotFather
- Start a conversation and send the command
/newbot - Follow the prompts to set a name for your bot (e.g., “StatusDrift Alerts”)
- Choose a username for the bot (must end in “bot”, e.g., “statusdrift_alerts_bot”)
- 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:
- Search for your new bot in Telegram and start a conversation
- Send any message to the bot
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesin your browser - Find the
chat.idvalue in the response
For group chats:
- Add your bot to the group
- Send a message in the group that mentions the bot
- 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:
- Log in to your StatusDrift account at app.statusdrift.com
- Navigate to Notification Channels in the sidebar
- Click Add Channel
- Select Telegram from the integration type dropdown
- Enter a descriptive name for this channel
- Enter the Bot Token from BotFather
- Enter the Chat ID where notifications should be sent
- Click Save to create the channel
Step 4: Assign to Monitors
Connect the notification channel to your monitors:
- Go to Monitors in the sidebar
- Select the monitor you want to receive Telegram notifications
- Scroll to the Notification Channels section
- Check the box next to your Telegram channel
- Save the monitor configuration
Testing the Integration
Verify your Telegram integration is working:
- Go to Notification Channels
- Find your Telegram channel in the list
- Click the Test button
- Check your Telegram chat for the test message
Configuration Options
The Telegram integration supports these configuration options:
| Field | Required | Description |
|---|---|---|
| Bot Token | Yes | The API token provided by BotFather when creating your bot |
| Chat ID | Yes | The Telegram chat ID where notifications will be sent |
| Parse Mode | No | Message formatting mode (HTML or Markdown) |
| Disable Notification | No | Send 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