Skip to content

Telegram

The Telegram channel allows your assistant to communicate via a Telegram bot. When configured:

  • Incoming Telegram messages create new conversations or continue existing chats
  • The assistant processes the message and sends a reply back via Telegram
  • Conversations are threaded by chat — messages from the same user continue in the same conversation
  • Photo attachments are supported (both inbound and outbound)

Configuration

FieldDescription
Bot TokenYour Telegram bot token from @BotFather
Webhook Secret (optional)A secret string for verifying webhook requests
External URL Override (optional)If your publicly accessible domain differs from the configured PUBLIC_URL, enter it here. This URL is used when registering the Telegram webhook.

Setting Up a Telegram Bot

  1. Message @BotFather on Telegram and send /newbot
  2. Follow the prompts to choose a name and username for your bot
  3. Copy the Bot Token that BotFather provides
  4. In TeamWeb AI, go to your assistant’s Channels tab, click Telegram, and enter the Bot Token
  5. Optionally set a Webhook Secret (any random string for request verification)
  6. If your external domain differs from the PUBLIC_URL configured in your environment, enter it in the External URL Override field (e.g. https://external.example.com)
  7. Click Save Configuration
  8. Click the Register Webhook button to automatically register the webhook with Telegram
Each assistant registers its own unique webhook URL with Telegram (e.g. https://yourdomain.com/webhooks/channels/telegram/5/inbound). This means each Telegram bot is tied to exactly one assistant, and inbound messages are routed to the correct assistant automatically.
Telegram users must have their Telegram Chat ID set on their user profile in TeamWeb AI. Users can find their Chat ID by messaging @userinfobot on Telegram. An admin then enters this value in the user’s profile under Users in the sidebar.