> ## Documentation Index
> Fetch the complete documentation index at: https://squad.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Telegram

> Connect your main Telegram bot, then add extra bots for other teammates and other people.

Telegram is optional. Setup does not ask for it, and you can connect it at any time. Telegram has two kinds of bots:

* **The main bot.** Your chief of staff answers it, and only the owner can message it. You connect it first.
* **Extra bots.** Each one has its own teammate and its own list of people who can message it.

For how channels compare, see [Talk to your squad from Telegram, Discord, or Slack](https://squad.so/docs/channels.md).

## Before you start

* Have the Telegram app open, signed in to your own account.
* Get your Telegram user ID. Send any message to @userinfobot on Telegram, and copy the number that it sends back.

## Open the Telegram screen

Select **Settings** at the bottom of the sidebar, then **Apps**, then the **Telegram** tab. You can also press ⌘K (Ctrl+K on Windows) and type Telegram. A link to the old **Channels** tab of the **Apps** page opens the **Telegram** tab.

The owner and Administrators can open it. A Collaborator or a Viewer cannot.

## Connect the main bot

The owner connects the main bot first. Squad locks the main bot to the owner's Telegram user ID, typed in these steps. Until the owner's Telegram account is on file, an Administrator who opens the tab sees no connect form. The card says, for example, "The squad owner connects the bot first, because it needs the squad owner’s own Telegram ID to know who it answers. After that, you can switch bots here." After that, an Administrator can also switch the main bot, and the card says that your squad answers the owner from the bot and that the owner messages it once to pair. Squad refuses a Telegram ID that anyone but the owner sends. To correct the ID later, see [Change your Telegram user ID](#change-your-telegram-user-id).

**1. Create the bot**

In Telegram, open @BotFather and send `/newbot`.

**2. Name the bot**

Give the bot a display name, then a username. The username must end in `bot`.

**3. Copy the token**

Copy the token that BotFather sends. It looks like `123456789:AA…`.

**4. Paste the token**

On the Squad **Telegram** tab, paste the token into the **Paste its token** step.

**5. Wait for the check**

Wait for **Found** followed by the bot username, for example "Found @acme\_squad\_bot". This means Telegram accepted the token.

**6. Add your user ID**

If the **Add your Telegram user ID** step shows, type your Telegram user ID.

**7. Connect**

Select **Connect** followed by the bot username.

**8. Pair the bot**

In Telegram, send the bot one message. This pairs the bot with your account.

The card shows "Connected @" and the bot username, then "Message the bot once on Telegram to pair. Your squad answers from it once no teammate is working."

Your squad answers from the bot. Nothing restarts. If your squad is in the middle of work, the bot starts answering when the work finishes.

> [!WARNING]
>
> Check your user ID before you select **Connect**. It must be your own ID, not the bot's. The main bot answers only the account with that ID. To fix a wrong ID later, see [Change your Telegram user ID](#change-your-telegram-user-id).

> [!WARNING]
>
> Keep the bot token secret. Anyone with the token controls the bot.

### Check that it works

* The **Main bot** card shows the bot. It shows **Not connected** only when the bot is not connected.
* **Access** shows **Locked to your Telegram account** and your ID, for example **Locked to your Telegram account · ID 726882145**.
* The card shows **Who can message it: just you**.
* Your chief of staff answers when you message the bot. **Open in Telegram** opens the bot.

When an Administrator opens the tab, the card names the owner instead: **Locked to** and the owner's name and **’s Telegram account**, and **Who can message it: only** and the owner's name. When Squad does not know the owner's name, the card says "the squad owner". It says how the Administrator can reach a teammate on Telegram: an extra bot can list their own Telegram user ID. When the bot answers no one, the Administrator reads that the owner can add or change the ID on this page.

## Change your Telegram user ID

The main bot answers only the Telegram account whose user ID is on file. If that ID is wrong, for example because the bot's own ID was typed, fix it here. Only the owner can. Administrators see the **Access** row without **Change**.

**1. Get your ID**

In Telegram, from your own account, send any message to @userinfobot. Copy the number that it sends back.

**2. Open the form**

On the **Main bot** card, select **Change** on the **Access** row. With no ID on file, the link is **Add your ID**. When the bot answers no one, the form is already open.

**3. Save the ID**

Type your ID into **Your Telegram user ID, e.g. 726882145** and select **Save**.

**4. Check it**

Send your bot a message from that Telegram account.

The card says "Saved. Message your bot from that Telegram account to check it answers you." If your squad is in the middle of work, or your squad's computer is still applying the change, the card says so instead. Until then, the old ID can still apply.

What changes in the same save:

* Every bot, the main bot and each extra bot, answers your new ID instead of the old one. Everyone else on a bot's list keeps access.
* Routines and heartbeats that report to your old Telegram account report to the new one. Their bot and schedule stay the same. See [Where a routine reports](https://squad.so/docs/scheduled.md#where-a-routine-reports).
* Conversations that you last had from the old account point to the new one, so replies that go "where you asked" reach the new account.
* An ID that you entered as your own before is left off when you save a bot's list. Beside the list, the card says "\[ID] was left off: you entered it as your Telegram ID before." with **Add anyway**. Select **Add anyway** to add it. Later saves then keep it. An Administrator reads "\[ID] was left off: the owner entered it as their Telegram ID before." A teammate cannot add such an ID for you.

On Squad for Mac, the steps are the same. The **Access** row reads, for example, "Locked to your Telegram account, ID 726882145". **Cancel** closes the form, except when it opened by itself.

## What the main bot does

* Your chief of staff answers it. The main bot card has no **Answered by** control.
* Only the owner can message it. You cannot add other people to it. To share a teammate with someone, connect an extra bot.
* Your chief of staff's **About** page has **Message on Telegram** in its **More** (⋯) menu, which opens the bot.
* The **Group chats** switch is off when you first connect. If you turn it on, the bot works in group chats that it is added to, but it still answers only the owner.

To use a different bot as the main bot:

1. On the **Main bot** card, select **Switch to a different bot…**.
2. Paste the new bot's token and wait for **Found** and the bot username.
3. Select **Switch to** followed by the new bot username.
4. In Telegram, send the new bot one message to pair again.

> [!WARNING]
>
> The old bot stops answering when your squad moves to the new bot.

## Add an extra bot

Extra bots run alongside the main bot. Use them to put another teammate on Telegram, or to let other people talk to a teammate.

Before you start: the main bot must be connected. Without it, Squad refuses the extra bot with "Connect your main bot first. This squad has no Telegram owner yet."

**1. Create the bot**

In Telegram, open @BotFather, send `/newbot`, and copy the new token.

**2. Find the connect card**

On the Squad **Telegram** tab, below **More bots**, find the **Put another teammate on Telegram** card.

**3. Paste the token**

Paste the token into **Paste its token and connect**.

**4. Connect**

Select **Connect bot**.

Do not use the main bot's token. Squad refuses it.

The page shows "Connected @" and the bot username, then "Set who answers it below." The new bot gets its own card under **More bots**, with these controls:

| Control | What it does |
| - | - |
| **Answered by** | The teammate that answers this bot. The default is **Your chief of staff**. |
| **Who can message it** | The people who can message this bot. The owner is always on the list. |
| **Group chats** | A switch. On by default for extra bots. In a group, the bot still answers only the people on its list. |
| **Group topics** | Opens a form that creates a topic in a group chat that uses Topics. **Hide group topics** closes it. |
| **Remove** | Removes the bot. Select **Really remove? Messages stop once no teammate is working** to confirm, or **Keep it** to cancel. |

The card shows **Offline** when the bot is not running. A running bot shows no status. A bot that you just saved, while your squad is busy or the bot is still starting, shows "Your squad starts answering in Telegram once it finishes what it’s working on." instead. The page checks again by itself for a while. See [Channels](https://squad.so/docs/channels.md#how-a-channel-works). While a change saves, the card shows **Saving…**. A switch moves only after your squad's computer has the change.

### Choose who can message an extra bot

1. Ask the person to send any message to @userinfobot on Telegram and send you the number.
2. On the bot's card, under **Who can message it**, type the number into the field.
3. Select **Add**.

To remove a person, select the x on their ID. Squad always keeps the owner on the list. When only you can message the bot, the list shows **Just you so far.**

A list can hold up to 50 people, including you. See [Limits and defaults](https://squad.so/docs/limits-and-defaults.md).

### Create a topic in a group

**1. Turn on Topics**

Turn on Topics in the Telegram group settings.

**2. Add the bot**

Add the extra bot to the group.

**3. Open Group topics**

On the bot's card, select **Group topics**.

**4. Enter the group and topic**

Paste the group's chat ID, for example `-1001234567890`, and type a **Topic name**.

**5. Create**

Select **Create**.

The card confirms that the topic was created.

## Troubleshooting

**The teammate replies "⚠️ I hit a problem before I could finish replying." and a cause.**
Cause: the run failed, for example because of a usage limit or a model that your AI account cannot use. The cause after the first sentence says what went wrong, for example "The model \[model] is not available on the ChatGPT account I use. Choose another model for me, or connect a ChatGPT account that has it." Squad sends that only after your other ChatGPT accounts and the models under **When it can’t answer** could not answer. Fix: fix the cause that the reply names, then send your message again. See [Chat failure messages](https://squad.so/docs/agent-stuck.md#chat-failure-messages).

**The teammate replies with a sentence about Z.AI, for example "⚠️ Z.AI turned this away because too many teammates were working at the same time. Send it again in a minute."**
Cause: your squad uses a Z.AI GLM Coding Plan, and Z.AI refused the run under one of its plan's limits: too many requests at once, a used-up usage limit, an expired plan, a model that the plan does not include, or its Fair Usage Policy. Fix: do what the sentence says. See [Z.AI's own limits](https://squad.so/docs/agent-stuck.md#zai-limits).

**The main bot does not answer.**
Cause: the bot is not paired yet, or your squad has not switched to it yet because it is in the middle of work. Or the Telegram user ID on file is not yours. Fix: send the bot one message, then wait a short time and try again. Check the ID on the **Access** row. If it is not yours, see [Change your Telegram user ID](#change-your-telegram-user-id).

**Someone cannot message an extra bot.**
Cause: their ID is not on the bot's list, or they are in a group and not on the list. Fix: add their Telegram user ID under **Who can message it**.

**The Access line shows "Your bot answers no one yet. Add your Telegram user ID."**
Cause: the squad has no Telegram user ID for the owner. Fix: as the owner, type your ID in the form below the line and select **Save**. See [Change your Telegram user ID](#change-your-telegram-user-id).

**The Access line shows "Your bot answers no one: the ID on file is the bot’s own. Change it to yours."**
Cause: the bot's own ID was typed as your user ID. Fix: get your own ID from @userinfobot and save it in the form below the line. See [Change your Telegram user ID](#change-your-telegram-user-id).

### Messages when you paste a token

| Message | Cause | Fix |
| - | - | - |
| "Telegram doesn’t recognize that token. Copy it fresh from BotFather." or "Telegram rejected that token — double-check it in BotFather." | The token is wrong, incomplete, or was revoked. | Copy the token again from @BotFather. |
| "That doesn’t look like a Telegram bot token." | The text is not in the token format `123456789:AA…`. | Copy the whole token, with the number and the colon. |
| "Couldn’t reach Telegram to check the token." or "Couldn’t reach Telegram to verify the token — try again." | Squad could not reach Telegram. | Wait a moment, then paste the token again. |
| "This bot token is already connected to another workspace — create a fresh bot with @BotFather and use its token" | A main bot works in one squad only. | Create a new bot with @BotFather and use its token. |
| "That token belongs to a main bot — create a fresh bot with @BotFather." | You pasted a main bot's token as an extra bot. | Create a new bot for the extra bot. |
| "Connect your main bot first. This squad has no Telegram owner yet." | You added an extra bot before the main bot. | Connect the main bot first. |
| "Couldn’t check the bot’s pending messages — try again in a moment." | Squad could not clear old messages that wait for the bot. | Try again in a moment. |

### Messages when you connect or switch the main bot

| Message | Cause | Fix |
| - | - | - |
| "That’s your bot’s ID, not yours. Message @userinfobot on Telegram to get your own." | You typed the bot's own ID as your user ID, or pasted a bot token. | Message @userinfobot from your own account and type the number that it sends. |
| "Add your Telegram user ID first. Message @userinfobot to get it." | The **Add your Telegram user ID** field is empty. | Type your Telegram user ID. |
| "A Telegram user ID is a number, like 726882145." | The field has text that is not only a number, for example a space inside the number, or letters. | Type only the number from @userinfobot. |
| "This squad has no Telegram owner on file. Enter your Telegram user ID (message @userinfobot to get it) and try again." | Squad needs your ID before it can lock the bot to you. | Type your ID and try again. |
| "Couldn’t reserve the new bot token — nothing changed; try again." | The switch did not start. Your old bot still works. | Try again. |
| "… — and restoring the previous bot’s routing also failed. Run the rotation again to finish switching (your old bot may not receive messages until then)." | The switch stopped halfway. | Paste the new token and switch again. |
| "Your new bot is saved. Your squad is in the middle of work, so the new bot starts answering when it finishes. No need to rotate again." | The switch worked. The new bot starts when your squad finishes its current work. | Wait, then message the new bot. |
| "Your new bot is saved, but it did not connect. Check the token with @BotFather and rotate again." | The new bot did not start. | Check the token with @BotFather, then switch again. |
| "Your new bot is saved, but your squad is still switching to it. Give it a minute; the bot answers once it has. No need to rotate again." | The switch worked. Your squad has not finished switching yet. | Wait a minute, then message the new bot. |
| "Your new bot is saved, but the workspace runtime is still restarting. Give it a minute; the bot answers once it's back. No need to rotate again." | The switch worked. Your squad's computer restarted to apply it and is not back yet. | Wait a minute, then message the new bot. |
| "Couldn’t switch the bot." or "Couldn’t connect the bot." | The change did not go through. | Try again. |

### Messages when you change your Telegram user ID

| Message | Cause | Fix |
| - | - | - |
| "A Telegram user ID is a number, like 726882145." | The ID is not a valid Telegram user ID, for example 0, or the field has a space inside the number, letters, or other characters. | Type only the number from @userinfobot. |
| "That’s your bot’s ID, not yours. Message @userinfobot on Telegram to get your own." | You typed the ID of one of your bots, or pasted a bot token. | Type your own ID. |
| "Another Telegram change is still being saved. Try again in a moment." | Another Telegram change is saving. | Try again in a moment. |
| "Couldn’t move your Telegram ID to your bots." and a reason | Your squad's computer did not take the change. The reason says why, or says "Try again." | Fix what the reason names, then try again. For a full disk, see [Messages on every channel screen](https://squad.so/docs/channels.md#messages-on-every-channel-screen). |
| "Couldn’t reach your squad’s computer. Try again." | Squad could not reach your squad's computer. | Try again. |
| "Connect your main bot first." | No main bot is connected. | Connect the main bot first. See [Connect the main bot](#connect-the-main-bot). |
| "Couldn’t save your ID. Try again." | The save failed. | Try again. |

### Messages on the list and on topics

| Message | Cause | Fix |
| - | - | - |
| "A Telegram ID is a number, like 726882145." or "Telegram user IDs are numbers. Check the list." | The ID has letters or other characters. | Type only the number from @userinfobot. |
| "A list can hold at most 50 people." | The list is full. | Remove people who no longer need access, or connect another bot for them. |
| "Give the topic a name." | **Topic name** is empty. | Type a name. |
| "Topics need the group to be a forum: in Telegram, open the group’s settings and turn on Topics, then try again." | Topics is off in the group. | Turn on Topics in the group settings, then select **Create** again. |
| "This bot isn’t on your squad’s computer yet." | The bot was added a moment ago. | Wait a minute, then try again. |
| "Telegram refused to create the topic.", "Couldn’t create the topic.", or another reason from Telegram | Telegram refused the request, for example because the group chat ID is wrong or the bot is not in the group. | Check the group chat ID and add the bot to the group, then try again. |

For messages that all channel screens share, see [Messages on every channel screen](https://squad.so/docs/channels.md#messages-on-every-channel-screen).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.