# Connect Telegram alerts

The Telegram section of Company → Settings → Notifications links your team's Telegram accounts and groups to PiGi's shared bot. Admins get operations alerts such as "WhatsApp disconnected"; staff get the notifications addressed to them; linked groups get the announcements you route to them. Staff link themselves with one team link: Start, then "Share my number".

Source: https://help.pigi.io/guides/company-setup/notifications/connect-telegram

## Quick answers

**Where do I set up Telegram?**
Company → Settings → Notifications, in the **Telegram** section below the templates
(/school/admin/company/settings/notifications?tab=telegram jumps straight to it).

**How does my team link their Telegram?**
Click **Copy message** under **Team link** and paste it into your team's group chat. Each
person taps the link, presses **Start** in Telegram, then taps **Share my number**. PiGi
matches the number to their PiGi profile and replies "You're linked". Their mobile number
must be on their PiGi profile at your school.

**Someone shared their number but the bot says it couldn't find it.**
The bot replies "We couldn't find that number on …'s team." when the number is not on the
mobile field of any active team member's PiGi profile. Add or correct their mobile number
on their profile, then have them tap the team link again.

**How do I link my own Telegram account?**
Click **Connect Telegram** (or **Connect another account** once someone is linked). The
bot opens in a new tab; press **Start**. The section shows "Waiting for you to verify in
Telegram" until Telegram confirms, then "Linked · PiGi will now message you on Telegram."

**How long is a Connect Telegram link valid?**
Ten minutes — the pending row shows "Link expires" and the time. After that the page says
"The link expired before it was verified. Try again." The team link itself does not
expire; once someone presses Start they have 30 minutes to share their number.

**What do Telegram alerts tell me?**
Operations alerts about your messaging — principally that the WhatsApp connection
disconnected, reconnected, or that an admin stopped it. They go to admins' own linked
accounts and to linked groups that have no announcement ticked. Staff who are not admins
do not get them; they get the Telegram notifications addressed to them.

**How do I post announcements to a team group?**
Click **Link a group**; Telegram asks which group to add PiGi to. Once linked, tick the
group under **Group messages** beside **Trip announcements** or **Low code stock**. A
group ticked for an announcement gets that announcement only, not operations alerts.

**How do I test that Telegram works?**
Click **Send a test**. The page reports, for example, "Test sent · 2 delivered, 0 failed."
The test goes where operations alerts go, so a non-admin's account is not counted. The
button is disabled until someone is linked.

**How do I stop someone getting Telegram messages?**
**Disconnect** on their row does not work at the moment — it shows "Failed to
disconnect". Until it is fixed, the person can block the PiGi bot in Telegram; PiGi then
switches their link off the next time it tries to message them.

## What this is

The **Telegram** section ("Telegram messages from PiGi · notifications and operations
alerts") links Telegram chats to your company through PiGi's shared bot. There is no bot
or token for you to set up. Each linked chat is tied to your company, so one bot serves
every school without mixing messages. For the full picture of what Telegram carries, see
[Get PiGi messages on Telegram](../integrations/telegram.md).

## Before you start

- You need the **admin** role for the company.
- Each person you want to link needs Telegram installed, and their mobile number on
  their PiGi profile for the team link.
- If the section shows "Telegram isn't available right now", Telegram is down on PiGi's
  side and every button is disabled until it is back.

## Steps

1. Open **Company → Settings → Notifications** and scroll to **Telegram**.
2. Under **Team link**, click **Copy message** and post it in your team group. The
   message reads "Get your PiGi alerts on Telegram:", the link, and "Tap Start, then
   “Share my number”. That's it."
3. To link your own account directly, click **Connect Telegram** and press **Start** in
   the bot. Use **Open Telegram** on the pending row if the tab did not open.
4. To link a group, click **Link a group** and pick the group in Telegram. The page says
   "Group linked · choose below which messages go there."
5. Under **Group messages**, tick which groups get **Trip announcements** and **Low code
   stock**.
6. Click **Send a test** to confirm delivery.

## What you see on a row

| What you see | Meaning |
|---|---|
| @username, or a group's title with a **Group** pill | Which chat is linked |
| **Active** | Verified and receiving messages |
| Last alert … / No alerts yet | When it last received an alert |
| **Pending** with "Link expires …" | A Connect Telegram or Link a group request still waiting for Telegram |
| **Disconnect** | Meant to stop messages to that chat (see Known limitations) |

Only verified, active chats are listed. A chat PiGi has switched off disappears from the
list.

## Known limitations

- **Disconnect does not work.** It shows "Failed to disconnect" and the chat stays
  linked. Blocking the bot in Telegram, or removing it from the group, stops messages.
- **Rows show the Telegram @username,** not the person's name in PiGi.
- **The Connect Telegram link is not checked against a number.** Whoever opens it within
  ten minutes is linked as you. Do not paste it into a shared chat — use the team link
  for others.
- **One shared bot.** Every school links to the same PiGi bot; the separation is per
  chat.
- **Alerts are one-way.** Replying to the bot does nothing.
- PiGi switches a link off automatically when Telegram reports the bot was blocked,
  removed from the group, or the chat no longer exists. Link it again to restore it.

## Related

- [Get PiGi messages on Telegram](../integrations/telegram.md)
- [Connect WhatsApp](connect-whatsapp.md)
- [Choose how notifications reach people](notification-methods.md)
- [Notification troubleshooting](notification-troubleshooting.md)
