Telegram Integration
Receive instant push notifications on your mobile device via Telegram. Perfect for on-the-go monitoring with inline action buttons and Markdown formatting.
Prerequisites
- Telegram account (personal or business)
- BlackTide account (any plan)
- Access to Alerts → Alert Channels in BlackTide
Step 1: Create a Telegram Bot
- Open Telegram and search for @BotFather
- Start a chat with BotFather and send
/newbot - Follow the prompts:
- Bot name: BlackTide Alerts (display name, can include spaces)
- Bot username: blacktide_alerts_bot (must be unique and end with "bot")
- BotFather will respond with your Bot Token (e.g.,
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz) - Copy and save this token securely (you'll need it in Step 3)
Step 2: Get Your Chat ID
Option A: Personal Chat (1-on-1 alerts)
- Search for your bot username in Telegram (e.g.,
@blacktide_alerts_bot) - Start a chat with your bot by clicking Start
- Send any message to the bot (e.g.,
/start) - Open this URL in your browser (replace
YOUR_BOT_TOKEN):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates - Look for
"chat":{"id":123456789in the JSON response - Copy the
chat id(e.g.,123456789)
Option B: Group Chat (team alerts)
- Create a Telegram group
- Add your bot to the group (search by username)
- Send a message in the group (e.g.,
/start) - Open the getUpdates URL from Option A
- Look for
"chat":{"id":-1001234567890in the JSON response - Copy the negative chat id (e.g.,
-1001234567890)
Option C: Channel (broadcast alerts)
- Create a Telegram channel
- Add your bot as an administrator
- Post a message in the channel
- Open the getUpdates URL from Option A
- Copy the
chat id(starts with-100)
Step 3: Configure BlackTide Telegram Channel
- Log in to BlackTide
- Navigate to Alerts → Alert Channels
- Click New Channel
- Select Telegram as the channel type
- Fill in the configuration:
- Name: On-Call Telegram (or descriptive name)
- Bot Token: Paste token from Step 1
- Chat ID: Paste chat ID from Step 2
- Parse Mode: Markdown (recommended) or HTML
- Disable Notification: false (enable sound/vibration)
- Click Test Channel to send a test message
- Verify the test message appears in your Telegram chat
- Click Save
Configuration Example
{
"type": "telegram",
"name": "On-Call Telegram",
"config": {
"botToken": "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz",
"chatId": "-1001234567890",
"parseMode": "Markdown",
"disableNotification": false
}
}Step 4: Create an Alert Rule
- Go to Alerts → Alert Rules
- Click New Rule
- Configure your rule:
- Name: Production API Down
- Monitors: Select monitors to watch
- Conditions: 3 consecutive failures
- Channels: Select your Telegram channel
- Notify on Recovery: Yes
- Save the rule
Message Format
Downtime Alert
🚨 *Monitor Down*
*Monitor:* Production API
*URL:* https://api.example.com/health
*Status:* Down
*Region:* US East
*Failed Checks:* 3 consecutive
*Error:* Connection timeout after 10s
*Time:* 2026-02-13 14:30:00 UTC
[View Monitor] [Dashboard] [Acknowledge]Recovery Alert
✅ *Monitor Recovered*
*Monitor:* Production API
*URL:* https://api.example.com/health
*Status:* Up
*Region:* US East
*Downtime:* 5 minutes 32 seconds
*Time:* 2026-02-13 14:35:32 UTC
[View Monitor] [View Incident]Advanced Features
1. Inline Action Buttons
Telegram messages include interactive buttons:
- View Monitor: Opens monitor detail page
- Acknowledge: Marks incident as acknowledged
- Silence 1h: Silences monitor for 1 hour
- Dashboard: Opens BlackTide dashboard
2. Markdown Formatting
Use Markdown for rich text formatting:
- Bold:
*text*or**text** - Italic:
_text_ - Code:
`code` - Code Block:
```code block``` - Link:
[text](url)
3. Silent Notifications
For low-priority alerts, disable sound/vibration:
{
"disableNotification": true // Silent notification
}4. HTML Formatting (Alternative)
If you prefer HTML over Markdown:
{
"parseMode": "HTML"
}
// Message format:
<b>Monitor Down</b>
<i>Production API</i>
<code>https://api.example.com</code>
<a href="https://blacktide.xyz">View Monitor</a>Best Practices
1. Use Different Chats for Different Severities
- Personal chat: P0 critical alerts only (immediate attention)
- Team group: P1-P2 production issues (shared awareness)
- Channel: All alerts (broadcast, no discussion)
2. Enable Notifications for Critical Alerts
// P0 (Critical) - Sound + vibration
"disableNotification": false
// P2-P3 (Low) - Silent
"disableNotification": true3. Use Bot Commands
Add commands to your bot for quick actions:
- Talk to @BotFather
- Send
/setcommands - Select your bot
- Add commands:
status - Check current monitor status incidents - View open incidents silence - Silence all monitors for 1 hour
4. Combine with Other Channels
Use Telegram alongside other notification methods:
- Primary: Telegram (instant mobile notifications)
- Backup: Email (reaches everyone)
- Team: Slack/Discord (team visibility)
5. Test Regularly
Telegram bots can stop working if:
- Bot token is revoked
- Bot is removed from group/channel
- Chat ID changes (rare)
Test your Telegram channels monthly to ensure they still work.
Troubleshooting
Test Message Not Appearing
Possible Causes:
- Bot token is incorrect or revoked
- Chat ID is incorrect
- Bot was removed from group/channel
- Bot doesn't have permission to send messages
Solution:
- Verify bot token is correct
- Test bot manually with curl:
curl -X POST \ "https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage" \ -d "chat_id=YOUR_CHAT_ID&text=Test from BlackTide" - Verify chat ID is correct (check getUpdates again)
- Ensure bot is still in the group/channel
- Check bot has permission to send messages (for channels, bot must be admin)
Messages Arriving but No Notification Sound
Solution:
- Set
"disableNotification": falsein channel config - Check your Telegram notification settings for the chat
- Verify your phone isn't in Do Not Disturb mode
Action Buttons Not Working
Possible Causes:
- Old Telegram client version
- BlackTide callback URL unreachable
Solution:
- Update Telegram to the latest version
- Verify buttons open correct URLs in browser
Getting "Forbidden" Error
Cause: Bot was blocked by user or kicked from group.
Solution:
- For personal chat: Unblock the bot and send
/start - For group: Re-add the bot to the group
- For channel: Re-add bot as administrator
Security Considerations
Bot Token Security
- Treat bot tokens as secrets (anyone with token can send messages as your bot)
- Don't commit tokens to version control
- Rotate tokens if they're accidentally exposed (talk to @BotFather, use
/revoke)
Chat ID Privacy
- Chat IDs are not secrets, but don't share unnecessarily
- Use private groups for sensitive alerts
- Consider using channels instead of groups for broadcast-only alerts
Sensitive Data in Alerts
- Don't include API keys, passwords, or tokens in monitor names
- Mask sensitive data in alert messages
- Use private chats/groups for alerts containing PII
Rate Limits
Telegram has rate limits for bot messages:
- Telegram API Limit: 30 messages per second (across all chats)
- Group Limit: 20 messages per minute per group
- BlackTide Limit: 30 alerts per hour per channel
If you hit the BlackTide rate limit, alerts are queued and sent when the window resets.
Bot API Reference
For advanced users, here are useful Telegram Bot API endpoints:
Send Message
POST https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage
{
"chat_id": "YOUR_CHAT_ID",
"text": "Your message",
"parse_mode": "Markdown",
"disable_notification": false
}Get Updates (Chat ID)
GET https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdatesGet Bot Info
GET https://api.telegram.org/botYOUR_BOT_TOKEN/getMeNext Steps
- Slack Integration: Team chat integration
- Discord Integration: Alternative chat platform
- PagerDuty Integration: On-call escalation
- Alert Rules: Configure when alerts trigger
- Best Practices: Optimize your alerting strategy