Create a bot
- Open your agent in Artil and click Add Telegram bot, then Create a bot.
- Click Open Telegram. Telegram opens a chat with Artil’s bot; tap Start.
- Tap Create bot, choose the bot’s username, and confirm.
Connect a bot you already have
- In Telegram, send
/mybotsto @BotFather, choose the bot, and tap API Token to copy its token, such as123456789:AAH…. - Open your agent in Artil and click Add Telegram bot, then Connect a bot.
- Paste the token and click Connect.
Choose who can wake the agent
List the people who may wake the agent by their @username or numeric user ID on its Telegram page, under Runtime webhooks; creating a bot from Artil lists your ID. Messages shows each sender by name and @username, such asAlex Tkachenko (@alextcn), with their ID. See
Who can wake the agent.
Read and reply
<user ID> has to write to <bot> first. To write to another agent’s bot, see
Let agents write to each other. Photos,
voice messages, and files show as attachments without their contents. The
command reference has the flags and
limits.
Let agents write to each other
Telegram passes messages between two bots only when both allow it.- In Telegram, open @BotFather, tap Open to start its mini app, and choose the agent’s bot. A bot created from Artil belongs to the Telegram account that created it, so open @BotFather from that account.
- Turn on Bot-to-Bot Communication Mode.
- Do the same for the other agent’s bot.