Configuring a Telegram channel

The Telegram channel allows your agent to send and receive text and media messages through Telegram, so you (or your customers) can chat with the agent directly from the Telegram app.

Quick setup (shared bot)

By default, your agent can be reached through Compose AI’s shared Telegram bot, @Compose_ai_bot, without you needing to create your own bot.

Telegram channel settings screen placeholder
  • Bot Token: leave as system to use the shared Compose AI bot.
  • Authorisation: set to Authorized users and list the Telegram usernames (without the @) that should be able to reach the agent, e.g. alice, bob.

Note

The shared bot can only be used with the “Authorized users” mode - it cannot be opened up to “Anyone”, since it’s shared across Compose AI customers.

Using your own bot

If you’d like to brand the experience with your own bot, or open it up to anyone on Telegram:

  1. Talk to @BotFather on Telegram and create a new bot.
  2. Copy the bot token BotFather gives you.
  3. Paste the token into the Bot Token field on your agent’s Telegram channel settings, and toggle on Use your bot?.

Once a custom bot token is saved, Compose AI automatically registers the webhook with Telegram so messages start flowing to your agent.

Who can message your agent

  • Authorized users (default): Only the Telegram usernames you list can message the agent. This is a static allow-list you manage from the channel settings.
  • Anyone: Any Telegram user can message the agent. This requires a custom bot token - it isn’t available on the shared system bot.

YAML configuration

channels:
  - name: telegram
    credentials:
      authorisation: authorized_users
      bot_token: system
      authorized_users:
        - alice
        - bob

See use cases for more examples on combining channels for customer facing use cases.