Back to Documentation

Telegram

Complete reference for configuring, managing, and troubleshooting your Telegram channel in ReplyBase

Overview

The Telegram integration connects a Telegram bot (created via @BotFather) to a ReplyBase bot. Incoming messages from Telegram users are processed by your bot's conversation flows and AI fallback, with all conversations recorded in your dashboard.

  • Webhook-based delivery — Telegram pushes updates to ReplyBase in real time
  • Flow-first processing with AI fallback for unmatched messages
  • Full conversation, contact, and lead capture
  • Activity log with webhook event timestamps and diagnostics

How the Connection Works

When you connect a Telegram bot in ReplyBase:

  1. 1.ReplyBase validates your BotFather token against the Telegram API.
  2. 2.A channel record is created in your workspace with your encrypted token.
  3. 3.ReplyBase calls Telegram's setWebhook API to register the ReplyBase webhook URL: /api/telegram/webhook/[channelId].
  4. 4.Telegram sends all bot updates (messages, reactions, etc.) to that URL.

Managing Your Telegram Connection

Check Connection Status

Go to Integrations > Telegram. The status card shows:

  • — Connected / Disconnected status
  • — Your bot name and Telegram username
  • — Last webhook event received timestamp
  • — Last processed message timestamp

Assign a Flow

In the Telegram integration page, use the Flow Assignment panel to attach an active flow to the channel. The flow runs for every incoming message before AI fallback.

View Activity Logs

The activity log shows recent webhook events from Telegram, including message receipt timestamps, processing status, and any delivery errors.

Disconnect

Click Disconnect in the integration page to remove the channel. ReplyBase will attempt to deregister the webhook with Telegram automatically.

Flow Assignment

Telegram messages are processed in this order:

  1. 1.If the channel has an assigned flow, ReplyBase runs it.
  2. 2.If the flow produces a response, that is sent back to the user.
  3. 3.If the flow does not handle the message (or no flow is assigned), ReplyBase falls back to AI-generated responses.

Troubleshooting

Bot not responding to messages

1. Confirm the channel status shows Connected in the dashboard.
2. Check the activity log for recent webhook events — if none appear, the webhook may not be registered correctly.
3. Try disconnecting and reconnecting the channel.

Webhook registration fails on connect

Your ReplyBase app must be publicly accessible. Telegram cannot reach localhost. Use a publicly deployed instance for production.

Token changed or revoked

If you used /revoke in BotFather to regenerate the token, disconnect the channel in ReplyBase and reconnect with the new token.