Connect a Telegram bot
On this page
Connect a Telegram bot and answer its chats from your Deskwoot inbox. Every private chat with the bot becomes a conversation, and so does every Telegram group you add the bot to, with the name of the member who wrote each message.
Step 1: Create a Telegram bot
- Open Telegram and search for @BotFather.
- Start a chat with BotFather and send
/newbot. - Choose a display name and a username for your bot. The username must end in bot, for example
AcmeSupportBot. - BotFather answers with an API token. Copy it, you need it in the next step.
Important: keep the token private. Anyone who has it can control your bot.
Step 2: Connect the bot to Deskwoot
- Go to Settings > Inboxes.
- Under Add a channel, pick Telegram.
- Enter an Inbox Name.
- Paste the token into Bot Token.
- Click Create Inbox.
Deskwoot links the bot to Telegram right away. If Telegram does not accept the token, you see why and no inbox is created.
The last step, Inbox Created, shows under Group messages whether the bot reads every message in groups (see Step 3).
Round robin hands the inbox's conversations to the agents you add under Who answers in the inbox. See Auto assignment and round robin.
Step 3: Let the bot read every group message
You need this step only for groups. Telegram's privacy mode is on for a new bot. With it on, a bot in a group only receives messages that mention it, commands and replies to its own messages, so your team would miss most of the group.
To receive every message, turn privacy mode off:
- In Telegram, open @BotFather and send
/setprivacy. - Pick your bot and choose Disable.
- Remove the bot from each group and add it again, so the change applies there.
Or make the bot an admin of the group. Admins receive every message.
To see where your bot stands:
- Go to Settings > Inboxes.
- Click your Telegram inbox.
- Under In groups, click Group messages.
It says Reads all group messages, or that only some group messages reach Deskwoot, together with the steps above. After you change the setting in BotFather, click Check again.
Private chats
When someone writes to your bot, the chat shows up as a conversation in your inbox, with that person as the contact. Your team answers in Deskwoot and the reply reaches them in Telegram.
Your replies can carry text and files: images, videos, audio and documents. When Fynn answers, a line such as "Fynn, the AI assistant of Acme" stands under his first reply in a conversation, see How customers see that Fynn is an AI.
Telegram only lets a bot write to people who started a chat with it, so the customer always writes first.
Telegram groups
Add your bot to a Telegram group and the group becomes one conversation in your inbox, with the group's name as the contact. Your customers and your own staff can all write there.
A group is a chat that keeps going, and by default so does its conversation: when someone writes after it was resolved, it reopens, however long ago that was.
The days in the inbox's row Writing again and closing only decide who gets it back: inside them it stays with the agent who had it, after them it goes to your team like a new conversation.
A new conversation for each request
Want each new request in a group to start its own conversation? Open the inbox, click Writing again and closing and switch off Group chats stay one conversation (it starts on).
Groups then follow the days and the pause like private chats, so with 0 days the next message after a resolve starts a new conversation. If you set 0 days while the switch is on, the window tells you that groups still reopen and offers Start new conversations for groups too.
Who wrote what
Every message shows the name of the member who wrote it.
- Click the name or the round picture next to it to open the member's card: their name, their @handle (a link to their Telegram profile) and their Telegram ID.
- Click the arrow next to the name to open their contact in a new tab.
- In the iPhone and Android app, tap a member's name to see their details, with Open contact or Save as contact.
Each person who writes in the group gets their own contact, the same one Deskwoot uses when they write to your bot in a private chat.
On older messages a member may not have a contact yet. The card then offers Save as contact, which needs the permission to manage contacts (the standard Agent role has it).
Reply to one message
- Move the pointer over a message and click Reply.
- A bar above the reply box says Replying to Anna. Your answer arrives in Telegram as a reply to that message.
Cancel reply (the x in the bar) removes it. Reply works in private Telegram chats too. In the iPhone and Android app, long press a message and pick Reply.
When someone in Telegram replies to an earlier message, Deskwoot shows the quoted message above theirs. Click the quote to jump to it.
One conversation per topic
In a supergroup with topics, each topic is a conversation of its own, named after the topic. Messages in the General topic go to the group's main conversation. Your reply goes into the topic of the conversation you answer in.
Your team in the group
A teammate may write in the group from the Telegram account they connected under Settings > Profile (Connected accounts). Deskwoot then shows the message as their reply, not as a customer message, makes no contact for them and does not send the message a second time.
This works whether their Telegram notifications are on or off. Messages of teammates who did not connect their Telegram count as customer messages.
Your AI bot answers only when asked
Your team sees every group message the bot receives. Fynn answers only a message that mentions your bot (for example @AcmeSupportBot) or replies to one of Fynn's own messages. A reply to an agent's message does not count, even though agents answer through the same bot.
No other automatic message, such as an out of office reply, goes into a group. The satisfaction survey only does when you switch on Surveys in group chats (see below).
Settings for group chats
- Go to Settings > Inboxes.
- Click your Telegram inbox.
- Under In groups, click Group chats.
- Show the agent's name in group replies. An agent's reply into a group starts with their display name, like "Anna: Your order ships today", so the group sees who answers. Private chats and the AI bot's replies stay as they are.
- Every group is an organization. A group without an organization gets one named after the group the next time it writes, and the people who wrote in it can join it. Teammates are left out. The rules are in Organizations.
To turn one group into an organization right away, use Create organization from this group in the Organization section of the conversation's Details tab. It shows while the group has no organization yet, for anyone with the permission Manage contacts (create, edit).
In the row Rating (Business plan and above), Surveys in group chats sends the satisfaction survey into the group, or into the topic, when its conversation is resolved. Each person who wrote since the last resolve can rate once, teammates can't. See CSAT surveys and results.
When a group becomes a supergroup
Telegram gives a group a new chat ID when it turns into a supergroup. Deskwoot follows the move: the group keeps its contact and its history, its conversation continues, and your replies reach the supergroup.
If messages of the supergroup arrived before the move was known, the group had 2 conversations for a moment. The one the group continues in stays.
The other one is resolved, with a line only your team sees: "This group became a Telegram supergroup and continues in conversation #123."
Telegram handles on contacts
A contact keeps its Telegram @handle under Social links on the contact page, with a button that opens the Telegram profile.
You can search for the contact by that handle, with or without the @. This works when you pick a contact in the dashboard (for a new message or to merge two contacts) and in the app's contact search.
- When a contact has chatted with your bot or written in one of its groups, Telegram fills in the handle (if the person has one) and the Telegram ID. The field says Filled in from Telegram. and cannot be changed.
- Any other contact takes a handle you type into the Telegram field, also when you add a new contact. Save with Update contact. A handle has 5 to 32 letters, digits or underscores.
Troubleshooting
- Only some group messages arrive: privacy mode is still on, or the bot was not removed from the group and added again after you turned it off. See Step 3.
- No messages arrive at all: if you made a new token in BotFather after connecting (
/revoke), the inbox stops receiving messages. The fix is in the question about a new bot token below. - "This Telegram bot is already connected to another Deskwoot inbox": Telegram sends a bot's messages to one inbox only. Remove the bot from that inbox first, or create a new bot with @BotFather.
- The bot was connected to another service before: a Telegram bot sends its messages to one webhook only. Connecting it to Deskwoot replaces the other service's webhook, so that service stops getting the bot's messages. If it sets its webhook again later, messages stop reaching Deskwoot.
Tips
- Give your bot a clear name that matches your brand, so customers recognize it.
- Set a description and a profile photo in BotFather with
/setdescriptionand/setuserpic. - Use labels and assignment to organize Telegram conversations next to your other channels.
Frequently asked questions
Why do I only see some group messages?
Telegram's privacy mode is still on for your bot, or the bot was not added to the group again after you turned it off. Step 3 shows how to fix it. Messages from before the change do not come back.
Is there a cost per Telegram message?
No. Telegram does not charge for its bot API. When Fynn answers, it counts as an AI conversation in Deskwoot, the same as on every other channel. A transcribed voice message counts the same way, once per conversation window.
Which kinds of messages come through?
Text, photos, videos, audio files, voice messages and documents, with their captions. Stickers, locations, polls and round video messages do not reach Deskwoot, and a message someone edits later in Telegram does not change in Deskwoot.
Your replies can include text, images, videos, audio and documents. Voice messages and audio files are transcribed automatically, so Fynn can answer them and your team can read them, see Fynn and voice messages.
Will old Telegram messages be imported?
No. Telegram does not give bots the messages from before they joined a chat. Only messages sent after you connected the bot (and, in a group, after the bot was added) show up in Deskwoot.
What if I make a new bot token after connecting?
The inbox stops working with the old token, and the token of an existing inbox cannot be changed. Delete the old Telegram inbox under Settings > Inboxes (its conversations stay in Deskwoot), then connect the new token as a new Telegram inbox.
Use /revoke in BotFather only when you really need to.
Can I connect several Telegram bots?
Yes. Each bot becomes its own inbox, which helps with separate brands, product lines or languages. One bot can only be connected to one Deskwoot inbox.
Was this guide helpful?
Keep reading
- Connect your X (Twitter) accountConnect your X (Twitter) account to Deskwoot and answer Direct Messages from your shared inbox.Read guide
- Connect SMS with TwilioAdd SMS as a support channel by connecting a Twilio phone number to Deskwoot.Read guide
- Forward Gmail to DeskwootForward every email that reaches your Gmail or Google Workspace address to your Deskwoot forwarding address, so each one becomes a conversation.Read guide