Corpis
Загрузка

How to connect a Telegram bot to your agent

Updated: 2026-07-24

To connect a Telegram bot, get a token from @BotFather, open the "Telegram" tab in the agent settings and paste it — the platform brings the bot online for you. After that the bot answers in Telegram exactly like your agent does in chat, and its profile, commands, menu and buttons are configured right here, without BotFather.

Step by step

  1. Create and save the agent. Set a name, personality, rules and greeting — or describe the bot in words and the AI assistant fills the form. Save the agent so the "Telegram" section appears in the settings.

  2. Get a token from @BotFather. In Telegram open @BotFather, send /newbot, set the name and @username. Copy the issued token like 1234567890:AA…

  3. Paste the token on the "Telegram" tab. In the agent settings open the "Telegram" section, paste the token and press "Connect" — a t.me link and a "Connected" status appear.

  4. Set up the bot. Fill in the profile, commands, menu button and quick-reply buttons. Any block can be assembled by AI by describing the bot in words.

  5. Test in DMs and a group. Message the bot in a DM — it answers with the agent personality. In a group, add the bot and mention it: there it replies to a mention.

What you need before connecting

You can connect a Telegram bot only to an agent that already exists and has been saved — on the creation screen the "Telegram" tab is not there yet. First give the agent a name, personality, rules and greeting (or describe them in words to the AI assistant) and save it — then the "Telegram" section appears in the agent settings.

There is no separate "training" for the bot: in Telegram it answers with the same personality and from the same knowledge base as the agent does in the on-platform chat. Telegram is just one more surface of the same agent.

Get a token from @BotFather

In Telegram open @BotFather, send the /newbot command and set the name and @username of your future bot. In reply you get a token like 1234567890:AA… — this is the access key to your bot, keep it secret and do not share it.

Paste the token on the "Telegram" tab

In the agent settings open the "Telegram" section, paste the token into the field and press "Connect". The platform validates the token, brings the bot online and shows a t.me link to it and a "Connected" status badge. The token is no longer shown back — it is stored on the server. If you no longer need the bot, the same screen has a "Disconnect" button.

What you can set on the platform

Once connected, the bot is managed entirely from here — you never open @BotFather again. Each block is saved separately and pushed to Telegram right away:

How the bot works in DMs and groups

In direct messages the bot answers every message. In a group it replies by default only to a mention (@bot), a reply to its message or a command — so it does not flood the chat. The command menu adapts to the place: in DMs the full list, in groups without /start.

The request-contact and request-location buttons are shown by Telegram only in DMs. Once you add the bot to a group, you can enable games and moderation — these are separate sections of the agent settings.

FAQ

Do I need to open @BotFather to configure the bot?

Only once — to create the bot and get the token. Everything after that (name, description, commands, menu, buttons) is configured on the "Telegram" tab in Corpis and pushed to Telegram automatically.

Do I have to create an agent before connecting Telegram?

Yes. The bot is a surface of an already existing agent, so the "Telegram" tab appears only for a saved agent. It is not there yet on the creation screen.

Does the bot reply in groups?

Yes, but by default only to a mention (@bot), a reply to its message or a command — so it does not spam the chat. In DMs it answers every message.

Related articles

Connect a Telegram bot