Telegram bot for alerts from ArgoCD and Alertmanager.
Official Docs: https://core.telegram.org/bots
- Open Telegram, find @BotFather
- Send
/newbot - Enter bot name (e.g.,
MyProject Alerts) - Enter username (e.g.,
myproject_alerts_bot) - Save the token →
TELEGRAM_BOT_TOKENfor Doppler
- Create new group (e.g.,
MyProject Alerts) - Go to group settings → Topics → Enable
- Create topics:
Critical— critical alertsWarning— warningsInfo— informationalDeploys— deployment notifications
- Open group → Add members → Search your bot
- Make bot admin (required for posting to topics)
- Send any message to each topic
- Open in browser:
https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/getUpdates - Find in response:
chat.id→ Chat ID (negative number like-100XXXXXXXXXX)message_thread_idfor each topic → topic IDs
Example response:
{
"message": {
"chat": {"id": -1001234567890},
"message_thread_id": 2,
"text": "test"
}
}Add to shared config:
| Key | Value |
|---|---|
TELEGRAM_BOT_TOKEN |
Bot token from BotFather |
global:
telegram:
chatId: "-1001234567890"
topics:
critical: "2"
warning: "3"
info: "4"
deploys: "5"After deployment, trigger a test alert:
# Check ArgoCD notifications
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-notifications-controller
# Manual test (from argocd-notifications)
argocd admin notifications trigger telegram-alerts --resource app:argocd/apps- Check bot is admin in the group
- Check
TELEGRAM_BOT_TOKENin Doppler - Check chat ID is correct (negative number)
- Verify
message_thread_idmatches topic - Send test message to topic and check
/getUpdatesagain