Skip to main content

Telegram Channel

Connect your Mesachat bot to Telegram for instant AI-powered conversations.

Prerequisites

Creating a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Choose a name (e.g., "My Mesachat Bot")
  4. Choose a username (must end in bot, e.g., my_mesa_bot)
  5. Copy the bot token — you'll need it next

Connecting to Mesachat

  1. Go to Bots in the Mesachat sidebar
  2. Select your bot (or create a new one)
  3. Click the Integrations tab
  4. Click Add IntegrationTelegram
  5. Paste your bot token
  6. Click Save

Mesachat will automatically register the webhook with Telegram.

Authorizing Channels

By default, your bot will only respond in authorized channels. To authorize a chat:

  1. Go to ChannelsAuthorized Channels
  2. Click Add Channel
  3. Enter the Telegram chat ID
  4. Select the tenant and authorization group
Finding your Chat ID

Send a message to your bot, then check the Interactions page in the admin panel. The chat ID will be displayed in the conversation details.

Webhook Configuration

Mesachat automatically manages Telegram webhooks. When you create or update a Telegram integration, the webhook URL is registered with Telegram's API.

Webhook URL format: https://your-domain.com/webhooks/telegram/{botId}

warning

Telegram requires HTTPS for webhooks. For local development, use ngrok to create an HTTPS tunnel.

Commands

Mesachat supports Telegram bot commands. Users can type / to see available commands:

CommandDescription
/pingCheck if the bot is responsive
/helpShow available commands
/chatStart an AI conversation
/rollRoll a random number

Commands are configured per-bot and can be customized in the admin interface.