# Telegram

EvoHub can post On-Call alerts to a Telegram group through the EvoHub bot. Each message shows the alert's severity, title, status, source and start time, with **Acknowledge**, **Resolve**, **Take over** and **Open in EvoHub** buttons. When the alert changes, EvoHub edits the message in place. Telegram runs alongside paging: it never replaces the phone calls, push notifications and emails your escalation policies send.

Telegram messages are free: they are not counted towards your usage.

## Connect a group

:::steps
### Create a connect link
In EvoHub go to **On-Call → Chat Channels** and click **Connect Telegram group**. Choose whether **every new alert** should be posted to the group, then click **Create link**.
### Add the bot to your group
Click **Open Telegram and choose the group**. Telegram asks which group to add the EvoHub bot to. Pick the group and confirm.
### Wait for the confirmation
The bot posts "This chat is now connected to EvoHub." in the group, and the group appears in **Chat Channels**. Click **Send test** to check.
:::

The link works once and expires after 15 minutes. If the bot is already in the group, send the command EvoHub shows you (`/start@<bot> <code>`) in the group instead. A group link only works in a group, and a profile link only in a private chat with the bot; using one in the wrong place does not use it up.

Connecting, testing and removing groups needs the On-Call settings permission. A group can be connected to more than one organization; each organization only sees its own alerts there.

## Link your Telegram account

The buttons act as a real EvoHub person, so each responder links their Telegram account once:

:::steps
### Open your profile
In EvoHub, click your avatar and open **Profile**. In the **Telegram** card, click **Link Telegram**.
### Start the bot
Click **Open Telegram** and press **Start** in the chat with the EvoHub bot. The bot replies "Your Telegram account is now linked to EvoHub."
:::

The bot's reply names the EvoHub person the account now acts as — if that is not you, unlink it. The link applies to the organization you were signed in to when you created it; link again from each organization you respond for. Linking a new Telegram account replaces your old one. A Telegram account already linked to someone else in the organization cannot be linked again until they unlink it. **Unlink** in the same card removes the link.

## Respond from Telegram

When someone presses a button, EvoHub checks, every time:

- that their Telegram account is linked to a member of the alert's organization,
- that the member may respond to alerts,
- and, if the alert belongs to a team, that they are in that team, are an admin, or are the person the alert is assigned to.

If any check fails, Telegram shows them why, for example:

- "Link your Telegram account to EvoHub first: in EvoHub open Profile and choose Link Telegram."
- "You are not allowed to respond to alerts in EvoHub. Ask an admin for a role that can respond."
- "You are not allowed to respond to this alert: it belongs to a team you are not in."

The action is recorded on the alert's timeline under their name, for example "Taken over from Telegram." Pressing a button twice, or two people pressing the same button at once, acts once; the second press is told the alert is already acknowledged.

## Where alerts are posted

- **Every new alert** — tick **Every new alert** on the group in **Chat Channels**.
- **From an escalation step** — open the escalation policy, click **Edit**, and in the step's **Chat** area pick the group under **Teams / Telegram**. See [Escalation policies](https://docs-dev.evohub.io/escalation-policies.md).

Telegram limits a group to about 20 messages a minute. EvoHub waits and retries once when Telegram asks it to slow down.

## Remove a group

In **On-Call → Chat Channels**, click the bin icon next to the group and confirm. You can also remove the bot from the group in Telegram; buttons on old messages then stop working.

## Related

- [Microsoft Teams](https://docs-dev.evohub.io/microsoft-teams.md)
- [Slack](https://docs-dev.evohub.io/slack.md)
- [Escalation policies](https://docs-dev.evohub.io/escalation-policies.md)
