Skip to main content

Telegram

Telegram is the channel most Mesa deployments start with. A bot you create with Telegram's BotFather is connected to Mesa, and from then on people talk to it in Telegram.

Connecting a bot is an admin console task, not something you do from the web app.

1. Create the bot in Telegram

  1. Open Telegram and message @BotFather.
  2. Send /newbot.
  3. Give it a name — this is what people see.
  4. Give it a username ending in bot.
  5. Copy the token BotFather gives you. It is a credential; treat it like a password.

2. Connect it to Mesa

In the admin console:

  1. Open Bots and select the tenant the bot belongs to.
  2. Create a bot, or select an existing one.
  3. Add a Telegram integration and paste the token.
  4. Save.

Mesa registers the webhook with Telegram for you. There is no URL to copy anywhere — registration happens when the integration is created or changed, and is retried with backoff if Telegram rate limits it.

For reference, the address Telegram is pointed at looks like:

https://<your-mesa-host>/webhooks/telegram/<botId>

Telegram requires HTTPS, so a bot cannot be connected to a plain-HTTP development machine without a tunnel.

3. Authorize the chats it may speak in

A newly connected bot answers nobody. Chats have to be authorized first, and a bot has to be assigned to them — until both are true, messages are received and silently ignored.

In the admin console, open Channels and add the chat, scoped to the tenant. Authorization groups let you manage several chats together and assign the same set of bots to all of them.

Authorizing a group covers all of its members; a 1:1 chat with the bot is authorized per person, and being in an authorized group does not carry over to messaging the bot privately. The chat ID of a DM is the person's own user ID. See Private chats.

Finding a chat ID

Send any message to the bot first. Even though it will not reply, the message is received, and the chat appears in the admin console's Interactions view with its ID.

What works, and what does not

Telegram is the most complete channel. Worth knowing before you promise a colleague something:

  • Attachments are not read. A photo, PDF, voice note or video reaches the bot as a placeholder such as [Photo], or as its caption if you wrote one. Nothing is transcribed or analysed. See Conversations.
  • Reactions are tracked separately from message text, deliberately — so an emoji cannot be used to fake a message.
  • Commands work as described in Conversations. In a group, addressing a command to another bot (/ping@otherbot) is ignored, as it should be.

When the bot says nothing

Silence is the designed response to an authorization failure, so it is also the most common symptom. Work through Troubleshooting — it separates "not authorized", "not assigned to this chat" and "actually broken", which look identical from inside Telegram.