Telegram
Connect a Telegram bot to your Xagent account so you can start and continue tasks directly from Telegram. The integration is user-owned: Xagent starts or reloads the bot automatically when the channel is saved and active.
What It Supports
- Text conversations
- Continuing an existing conversation in the same chat
- Starting a fresh conversation with
/new - Stopping or pausing the current run with
/stopor/pause - Uploading documents, images, audio, or video into the task workspace
Quick Setup
1. Create a bot in BotFather
In Telegram, chat with @BotFather, run /newbot, follow the prompts, and save the bot token:
123456789:ABCdefGHIjklmNOPqrsTUVwxyz2. Add the channel in Xagent
Open the Channels page and add a new Telegram Bot channel. The fields are:
| Field | Required | Description |
|---|---|---|
| Bot token | Yes | The token from BotFather. |
| Allowed users | No | Comma-separated Telegram user IDs. If empty, any user who can reach the bot is allowed. |
| Active | — | Whether this bot should be running. |
3. Save and activate
Saving an active channel starts the bot. Message the bot in Telegram to create a task; it runs in your Xagent workspace and streams the result back to the chat.
Restrict access
Leaving Allowed users empty lets anyone who finds the bot use it — and run tasks in your workspace. Set the allowed Telegram user IDs for anything beyond personal testing.
Troubleshooting
| Problem | What to do |
|---|---|
| The channel is named Telegram Bot rather than your bot's own name | This is the sign the token did not work. Xagent looks the bot's name up from Telegram when you save the channel, and falls back to the generic Telegram Bot if that lookup fails — so the channel is created either way and the bot then never replies. Re-copy the token from BotFather and update the channel. |
| The bot does not reply to messages | Check the channel is active on the Channels page — a saved channel is not running until it is activated. If it is active and the name looks right, confirm you are messaging from a Telegram account listed under Allowed users, since anyone not listed is ignored when that list is set. |
| Saving fails with Bot token already exists | That bot is already connected to another channel in Xagent. A token can only be used once — either reuse the existing channel, or create a second bot in BotFather for this one. |
| Saving fails with Channel name already exists | Channel names must be unique. Choose a different name. |