Telegram setup
Connect your agent to Telegram with your own bot. It takes about two minutes: create a bot with Telegram’s official BotFather, find your Telegram user id, and paste both into Cohort. Your agent then answers your messages in Telegram — DMs and group chats.
You’ll need two things: a bot token (from BotFather) and your numeric Telegram user id (so your agent knows it’s you). Both are covered below, and the in-app wizard links here at each step.
Step 1 — Create your bot with BotFather
BotFather is Telegram’s built-in tool for creating bots.
-
In Telegram, open @BotFather and tap Start.
-
Send the command
/newbot. -
When prompted, enter a display name (e.g. “My Cohort Agent”).
-
Then enter a username — it must be unique and end in
bot(e.g.my_cohort_bot). -
BotFather replies with your API token, which looks like:
1234567890:<token-from-botfather>
Copy the whole token. Keep it secret — anyone with it can control your bot. If it ever leaks, send /revoke to BotFather to roll it.
Step 2 — Find your Telegram user id
Your agent answers only you, so Cohort needs your numeric Telegram user id (this is a number like 1534593841 — it’s not your @username).
- In Telegram, open @userinfobot and tap Start.
- It replies immediately with your details, including a line like
Id: 1534593841. - Copy that number.
Step 3 — Connect in Cohort
- In Cohort, go to Settings → Channels and click Connect on Telegram.
- Follow the BotFather walkthrough (or skip it if you already have your token).
- Paste your bot token and your Telegram user id, then click Connect.
- When prompted, send your bot a message in Telegram (any message). Once your agent replies, the connection is confirmed.
That’s it — your agent is live in Telegram.
Using your agent in a group
Telegram bots have privacy mode on by default, which means a bot only sees messages that directly mention it or reply to it. That’s usually what you want in a group. If you want your agent to read all group messages:
- Message @BotFather , send
/setprivacy, choose your bot, and select Disable. - Remove and re-add the bot to the group — Telegram caches the privacy setting when the bot joins, so the change only takes effect after a rejoin.
(Alternatively, promote the bot to a group admin, which also lets it see all messages.)
Troubleshooting
The bot doesn’t reply.
- Make sure you messaged the exact bot you just created — check the
@usernamein your chat matches the one BotFather gave you. - Make sure the Telegram user id you entered is yours (the account you’re messaging from). Your agent ignores messages from anyone else. Re-check it with @userinfobot .
- Give it a few seconds — Telegram can take a moment to deliver the first message.
“Bot token is invalid.”
- Copy the entire token from BotFather (numeric id, a colon, then 35+ characters). If in doubt, send
/tokento BotFather to see it again.
It says the bot is already connected.
- Each bot connects to one workspace at a time. Disconnect it from Settings → Channels first, then re-connect.
I want to start over.
- Disconnect the channel in Settings → Channels, then run through the wizard again. To fully retire a bot,
/revokeits token in BotFather.