Talk to your Wiro AI agent in Telegram
Talk to your AI agent through your own Telegram bot, in direct messages and in the groups you allow.
Draft a reply to the customer asking if we deliver on Sundays. We don't, but Saturday slots run until 6 pm.
Here is a reply you can send:
Thanks for asking. We don't deliver on Sundays, but our Saturday delivery slots run until 6 pm. Would a Saturday slot work for you?
Overview
What Telegram does for your agent
Connects a bot you create with @BotFather to the agent. The people you list by their numeric Telegram user ID message the bot directly, and in the groups you add, the members listed for that group mention it by its @username or reply to one of its messages. It is the same agent as in Chat, with the same skills and connectors, and a connector action that asks first in Chat asks in the Telegram chat instead, where yes allows it once and no declines it.
The agent keeps its own connection to Telegram, so there is no webhook or server address to set up. Messages from people who are not on a list get no reply, and a bot cannot start a chat: each person writes to the bot first.
Use cases
What your Wiro agent can do with Telegram
Ask the agent from your phone between meetings
Message the bot the way you would message a colleague: ask for a reply to a customer, a summary of notes you paste, or a task done with the agent's connectors. The answer comes back in the same Telegram chat, with no dashboard to open.
Scheduled Task reports in your Telegram chats
A Scheduled Task, such as a Monday sales summary or a daily stock check, posts its report in Chat and then sends it to the people on the direct-message list. Each person messages the bot once before it can write to them.
Approve the agent's actions with a yes
When a connector action asks first, such as sending an email or changing a CRM record, the agent asks in the Telegram chat and shows the whole request. Reply yes to allow it once or no to decline it. In a group, any member listed for that group can answer.
A team group that shares one assistant
Add the bot to your team's group and list the members who may use it. A listed member mentions the bot with a question or a draft to tighten, and the whole group sees the answer. The group keeps a conversation of its own, apart from anyone's direct messages.
Voice notes from the road
A driver or a technician records a voice note instead of typing. The agent turns it into text, writes up the job notes or the delivery problem, and drafts the follow-up for you to check in the same chat.
How it works
How Telegram works with Wiro
- 01
Create the Telegram bot
Make a bot of your own in Telegram, then copy its token and the user IDs of the people who will talk to it.
- 02
Paste its token in the Channels tab
Open the agent's Channels tab, choose Telegram, fill in what it asks for and save. It turns on by itself.
- 03
Talk to your agent there
Message the bot directly, or mention it in a group you listed. It is the same agent as in Chat, with the same skills and connectors.
- Where it runsThe agent keeps its own connection to Telegram. Nothing to set up for incoming messages.
- Who can talk to itIn direct messages, the people you list by user ID. In a group you list, the people listed for it, when they mention the agent or reply to it.
- Where its token is keptStored encrypted. Never send it in a chat.
Setup
Set up Telegram for your Wiro agent
Create the bot at Telegram, then paste what the Channels tab asks for.
In Telegram, open @BotFather and check that the handle is exactly
@BotFather. Send/newbot, then pick a display name and a username that ends inbot.Copy the token BotFather sends back. It looks like
123456:ABC-DEF...and works like a password: anyone who has it controls the bot, so never paste it into a chat.Ask each person who will use the agent to send the new bot a message. Before you connect the bot, open
https://api.telegram.orgwith your token in place of/bot<token> /getUpdates <token>and copy each sender'smessage.from.id, a positive number (getUpdates).For groups, send
/setprivacyto @BotFather, pick the bot and turn privacy mode off, so a plain mention reaches it. If the bot is already in a group, remove it from the group and add it again so the change applies there, or make it an admin of the group, since a bot admin receives every message.For a group, add the bot to it, send
/start@YourBotUsernamethere and read the group'smessage.chat.idfromgetUpdatesthe same way. A group ID is negative, and a supergroup's starts with-100.In the agent's Channels tab, open Telegram and paste the token into Telegram Bot Token. Add each person's ID, one per entry, under Allowed Telegram DM User IDs.
For each group, add a row under Allowed Telegram Groups with its Group Chat ID and the Allowed User IDs of the people who may use the agent there. Then Save: Telegram turns on by itself, and a running agent restarts.
Message the bot to talk to the agent. In a listed group, mention it by its username or reply to one of its messages, as in
@NorthwindDeskBot draft a reminder for Friday's stock count.
What the Channels tab asks for
| Field | About |
|---|---|
| Telegram Bot TokenRequired | Stored encrypted. |
| Allowed Telegram DM User IDsRequired | One per entry. |
| Allowed Telegram GroupsOptional | One row each, with Group Chat ID and Allowed User IDs. |
For developers
Set up Telegram from your own product
Your product can set up Telegram for a customer's agent with your project's API key: send the values the Channels tab asks for to UserAgent under the credential key telegram, in one request. It turns on once its required values are saved.
Questions
Telegram and Wiro FAQ
What can an AI agent do in Telegram?
It works as it does in Chat, through your own Telegram bot. People you list message it directly, listed members of a group mention it there, and it answers with its own skills and connectors. A connector action that asks first asks in that chat. It also sends its Scheduled Task reports to the people on the direct-message list, and the bot's command menu lists the agent's chat commands, such as /new_session for a fresh conversation.
How do I set up Telegram for my agent?
Create a bot with /newbot in @BotFather and copy its token. Have each person message the bot and read their numeric user IDs from the Bot API's getUpdates, then paste the token and the IDs into the Telegram card on the agent's Channels tab and save. Telegram turns on by itself once Telegram Bot Token and Allowed Telegram DM User IDs are filled in. Groups are optional rows with user lists of their own.
Who can talk to the agent on Telegram?
Only the people whose numeric user IDs you list; usernames and phone numbers are never used. Allowed Telegram DM User IDs covers direct messages, and each group row has its own Allowed User IDs, so someone on the direct-message list can use the agent in a group only once you add them to that group's row. Anyone else gets no reply. With Chat Mode set to Private in the agent's Settings, each person has a conversation of their own; Collaborative shares one across the team, and a group always keeps its own.
Does the agent read every message in a Telegram group?
No. It answers a listed member's message that mentions the bot by its @username or replies to one of its messages. Telegram's privacy mode, on by default, lets a bot in a group see commands and replies meant for it but not a plain mention, so the setup turns privacy mode off. With privacy mode off, or with the bot made a group admin, the bot receives every message in the group: the agent keeps the listed members' recent messages and reads up to 50 of them as context when someone mentions it, and it answers only mentions and replies to it.
Can people send the agent photos, files or voice notes?
Yes. A voice note reaches the agent as text, unless the agent's Model Access rule blocks voice models. Photos and documents reach it as files when Telegram lets a bot download them, which it does up to 20 MB each.
Does Telegram cost extra on an agent plan?
No. Telegram is included in every agent plan and changes no price, and Telegram lets a bot message its users at no cost. The agent's AI usage in Telegram counts the same as in Chat. When the plan's included usage and the balance are used up, the agent replies with a short note saying so instead of an answer.
What should I check when the agent doesn't answer on Telegram?
Check that the agent is running and that the sender's ID is on the right list: the direct-message list for a private chat, the group's own row for a group. In a group, the message has to mention the bot by its @username or reply to one of its messages, and the row needs the group's negative Group Chat ID. The bot also needs privacy mode off, or to be an admin of the group: if it joined the group before you turned privacy mode off in @BotFather, remove it from the group and add it again. If you made a new token with /token, paste it into Telegram Bot Token.
How do I stop the agent on Telegram?
Clear the Telegram card's fields in the agent's Channels tab and save, and the agent stops answering there; filling in the required fields again turns Telegram back on. To retire the bot itself, send /deletebot to @BotFather, which cannot be undone. If only the token leaked, send /token for a new one instead.
Access and limits
Telegram access and limits
- Revoke access
To take the agent off Telegram, clear the Telegram card's fields in the agent's Channels tab and save; filling in the required fields again turns it back on. If the token leaks, send
/tokento @BotFather for a new one and paste it into Telegram Bot Token./deletebotin @BotFather deletes the bot and frees its username, and it cannot be undone. - Limits
A Telegram message holds up to 4,096 characters, so the agent sends a longer answer as several messages. Telegram lets a bot download files of up to 20 MB and send files of up to 50 MB, and a bot can send about 20 messages a minute in one group.
With privacy mode off, the bot receives every message in the groups it is in, and the agent keeps the listed members' recent ones as context while it answers mentions only. Use each bot for one agent only: two agents or tools reading the same token get in each other's way.
Related channels
More channels for your Wiro agent
Slack
Talk to your AI agent in Slack, in direct messages and in the channels you allow, through a Slack app of your own.
Discord
Talk to your AI agent through your own Discord bot, in direct messages and in the server channels you allow.
Twilio Voice
Your AI agent answers calls to your Twilio phone numbers and sums up each call in Chat afterwards.
Put Telegram to work with Wiro
Deploy an agent and set up Telegram in its Channels tab. Every agent plan includes it: Starter $5, Pro $30 and Max $100 a month.