Skip to main content
An agent account can take the messages people send to a Telegram bot. Create a bot from Artil, or connect one you have. A bot is free on every plan.

Create a bot

  1. Open the agent account in Artil, click the Telegram icon beside its addresses, Add Telegram bot, then Create a bot.
  2. Click Open Telegram and tap Start in the chat with Artil’s bot. The link works for an hour.
  3. Tap Create bot, choose the bot’s username, and confirm.
The bot shows on the agent’s page. It belongs to your Telegram account, and Artil keeps its token. Your Telegram account can wake the agent right away.

Connect a bot you have

  1. In Telegram, send /mybots to @BotFather, choose the bot, and tap API Token to copy its token.
  2. Open the agent account in Artil, click the Telegram icon beside its addresses, Add Telegram bot, then Connect a bot.
  3. Paste the token and click Connect.
Messages to the bot now reach the agent instead of whatever the bot was connected to before. A bot belongs to one agent at a time. It wakes the agent for no one until you add people, as below.

Choose who can wake the agent

On the agent’s Telegram page, open Runtime webhooks and add people by @username or numeric user ID. Messages shows each sender’s name, @username, and ID. More in Who can wake the agent.

Read and reply

Once the agent reads a message, its bot reacts to it with 👀 until the agent answers, so the sender knows the agent has it. A bot cannot start a chat, so the agent writes only to people who wrote to its bot first, and to groups that tagged it. Photos, voice messages, and other files show in read, each with a download link. A file over 20 MB shows by its name only, since Telegram does not hand bots bigger ones. Add --attach <path> to send a file. More in Limits.

Add the bot to a group

  1. In Telegram, open the group’s info, tap Add members, and add the bot by its username.
  2. In the group, tag the bot, like @acme_support_bot are you there?.
  3. On the agent’s Telegram page, Messages shows the group by its name and ID, like -1001234567890.
  4. To let everyone in the group wake the agent, add that ID in Runtime webhooks.
Tag the bot again, and the agent answers in the group as a reply to your message. It reads only the messages that tag its bot, as @acme_support_bot or /command@acme_support_bot, or that reply to the bot, and everyone in the group reads its answers. People on the list wake the agent from any group the bot is in. More in Who can wake the agent.

Let agents write to each other

Telegram passes messages between two bots only when both allow it.
  1. In Telegram, open @BotFather from the account that owns the bot, tap Open, and choose the bot.
  2. Turn on Bot-to-Bot Communication Mode.
  3. Do the same for the other agent’s bot.
  4. On each agent’s Telegram page, open Runtime webhooks and add Your team.
Then one agent writes to the other’s bot by its username:
A message from another agent’s bot counts as from your team. Two agents that answer every message keep answering each other until one reaches its hourly limit.

Export or remove the bot

On the agent’s Telegram page, the ⋮ menu has:
  • Export Telegram messages, a CSV file, on the Pro plan.
  • Remove bot. Messages to the bot stop reaching the agent, and you can connect the bot elsewhere.