Telegram
A plain-text message from a bot for every alert incident, error-issue notice or on-call escalation routed to the channel. Suited to a small team that already lives in a Telegram group.
This is a notification channel for the metrics module, and a Business plan feature. Event destinations (the mapping-driven feed used by Slack) are a separate feature.
Connecting
Two ways, under Metrics → Channels:
- Connect Telegram — the easy path. The button mints a one-use link that
opens the deployment's bot (
@…); press Start in the DM to link your own chat, or add the bot to a group and send/link <token>— the link shows the command to paste. The chat id is captured from the message itself, so there is nothing to look up. The link expires after 15 minutes. Available when the deployment has configured a platform bot (SPM_TELEGRAM_BOT_TOKEN, andSPM_TELEGRAM_BOT_USERNAMEto pin the handle); the platform registers the bot's webhook at/api/v1/telegram/webhookautomatically the first time the button is used. - Add a channel → Telegram — the manual path, for a bot you own: paste the BotFather token and the chat id.
Prerequisites for the manual path
- A bot created with @BotFather.
- A chat the bot can post to: a group it has been added to, or a public channel where it is an administrator.
What to collect
| Value | Where to find it | Stored as |
|---|---|---|
| Bot token | BotFather → /newbot (or /token for an existing bot). Looks like 123456789:AA…. |
Vault |
| Chat id | For a group: add the bot, send it any message, then open https://api.telegram.org/bot<token>/getUpdates and read message.chat.id (groups and channels are negative numbers). For a public channel: its @name. |
Config |
The token is the credential — anyone who has it can post as the bot and read its updates — so it is stored in the vault, sent to Telegram once per delivery and never shown again. Rotate it from the channel form; the previous credential is revoked.
The message
◆ Alert firing: API latency
p95 of api.request.duration is above 500 (currently 912.50) over the last 15 min
https://saaspro.dev/o/acme/apps/site/metrics/incidents
Severity critical · SaaS Pro Max
Sent with sendMessage, link previews off, no parse_mode: the text is shown
exactly as written, so a title containing _ or * cannot break the delivery.
Messages are capped at Telegram's 4096 characters; the body is cut before the
link and the footer are.
Verifying
Press Send test. A message titled "Test notification" arrives in the chat.
A failed delivery is recorded with the HTTP status and Telegram's own
description — HTTP 401: Unauthorized for a bad token, HTTP 400: Bad Request: chat not found when the bot is not in the chat — never with the request that
carried the token.
Privacy
Everything in the notification (alert names, error messages, the incident link) is a copy of the data that leaves SaaS Pro Max's permission model. Anyone in the group reads it; the incident link still requires a console session.
Limitations
- One message per notification, with no batching or digest.
- 10 second timeout and no retry: a refused delivery is recorded and the alert moves on to its other channels.
- Telegram rate-limits bots to roughly one message per second per chat and twenty per minute in a group. Route noisy rules elsewhere.