How To

How to Connect an AI Chatbot to Telegram for Customer Support

Telegram is the only major messaging channel you can automate the same afternoon you decide to, with no app review and no business verification. This guide covers BotFather, webhooks, rate limits, privacy mode, and the design changes async messaging forces.

Stan

Stan

@stan

How to Connect an AI Chatbot to Telegram for Customer Support

Every messaging channel has an onboarding cost, and they are not remotely equal. Facebook Messenger and Instagram require a Meta app, a permissions review, and a screencast of your working flow. WhatsApp requires all of that plus enrolment as a Meta technology provider. Telegram requires a conversation with a bot called BotFather and about four minutes.

That asymmetry is why Telegram is usually the right first channel to automate, even for businesses whose customers are mostly elsewhere. It is the cheapest possible test of whether your knowledge base actually holds up outside the website widget, and it exposes every design assumption that web chat lets you get away with.

This guide covers the whole thing: what to create, how the plumbing works, the limits that will bite you, and the specific ways a Telegram bot has to behave differently from a chat widget.

The Audience Is Not Small

Telegram passed one billion monthly active users in March 2025, a figure the company announced itself.

Telegram Monthly Active Users, 2014 to 2025

Users in millions at each announced milestone. Half a billion of the total arrived after April 2020.

Source: Backlinko, Telegram user statistics, compiled from Telegram's own milestone announcements. The one billion figure was announced in March 2025.

The shape of that curve matters more than the endpoint. Half the total arrived after April 2020, and roughly 500 million people use it daily, which is a high daily-to-monthly ratio for a messaging platform. Asia is the largest market and India leads on downloads, so for businesses serving South and Southeast Asia, the Middle East, Eastern Europe, or crypto and developer communities anywhere, Telegram is frequently a primary channel rather than an afterthought.

It is also worth being honest about where it is not. In North America and Western Europe, Telegram is a secondary channel for most consumer businesses, and if that is your entire market, Messenger or WhatsApp will produce more volume. The argument for starting here is the near-zero setup cost, not the reach.

What You Are Actually Building

A Telegram bot is a webhook endpoint with a token. That is the whole model, and understanding it prevents most of the confusion.

  • The bot is an account on Telegram, created and owned through BotFather, with a username ending in bot.
  • The token is the credential. Anyone holding it can send messages as your bot, which makes it a secret with the same handling requirements as an API key.
  • Updates arrive at your endpoint, either pushed to a webhook you register or pulled by polling. Webhooks are the correct choice for anything production.
  • Your service replies by calling the Bot API. There is no persistent connection to maintain.

That is a materially simpler integration than the Meta channels, which layer OAuth, page selection, permission scopes, and a review process on top of the same basic idea.

Setting It Up

Step 1. Create the bot. Open Telegram, search for @BotFather, and send /newbot. You will be asked for a display name, which customers see, and a username, which must be unique and end in bot. Pick both carefully; the username cannot be changed later without creating a new bot.

Step 2. Save the token. BotFather returns a token that looks like a long numeric prefix, a colon, then a random string. Treat it as a password. Do not paste it into a shared document, and rotate it with /revoke if it ever leaks.

Step 3. Configure the bot's presentation. Still in BotFather, and worth doing before anyone talks to it:

  • /setdescription sets the text shown on the empty chat screen before the first message. This is your one chance to tell people what the bot does.
  • /setabouttext sets the short profile blurb.
  • /setuserpic sets the avatar.
  • /setcommands registers the slash commands that appear in the menu. Even for an AI bot that accepts free text, registering /start, /help, and /human gives people a visible escape route.

Step 4. Connect it to your chatbot platform. In Paperchat this lives under the chatbot's Channels section: choose Telegram, paste the token, and connect. The platform validates the token against Telegram's getMe endpoint, registers the webhook for you, and stores the token encrypted rather than in plaintext. Once connected, the bot's username is displayed and the channel is live.

Step 5. Send it a message. Open the bot in Telegram and ask it something your knowledge base covers. The first real test is not whether it replies, it is whether it replies with the same answer the website widget would give.

If you are wiring it up yourself rather than through a platform, the equivalent of step 4 is calling setWebhook with an HTTPS URL you control and a secret token, then handling POST requests at that URL.

The Architecture Decision That Matters

There is one design choice with real consequences: what your endpoint does when an update arrives.

The wrong pattern is to receive the webhook, run the retrieval and generation inline, and reply within the same request. It works in testing and fails in production, because generation takes seconds and your endpoint is holding a connection open the whole time. Under any concurrency, requests queue and time out.

The right pattern is to acknowledge immediately and process asynchronously:

  1. Webhook receives the update.
  2. Validate that it really came from Telegram, using the secret token you registered.
  3. Normalise the payload into your internal message shape.
  4. Push a job onto a queue and return 200 OK.
  5. A worker loads the conversation, runs the chat chain, and calls the Bot API to send the reply.

This costs a little more infrastructure and removes an entire category of failure. It also happens to be mandatory on the Meta channels, which require an acknowledgement within five seconds, so building it this way from the start means the next channel is a sender module rather than a rewrite.

The Limits You Will Hit

Telegram's rate limits are not published as a formal contract, but the observed behaviour is well documented and consistent.

LimitApproximate valueWhat happens when you exceed it
Messages per second, all chatsAbout 30HTTP 429 with a retry_after value
Messages per second, one userAbout 1Throttling on that chat
Messages per minute, one groupAbout 20Throttling on that group
Burst toleranceUnder 20 in a few secondsThrottling can begin below the headline limit
Inbound updatesNot countedReceiving does not consume the sending budget

Two practical notes. Enforcement has tightened at least twice since early 2025, so bots built against 2024 behaviour now see intermittent Too Many Requests responses; build a retry that honours retry_after rather than a fixed backoff. And if you ever need genuine broadcast volume, Telegram offers a paid path of up to 1,000 messages per second via the allow_paid_broadcast parameter, billed in Telegram Stars, which is configured through BotFather. For customer support traffic, the standard limits are ample.

Privacy Mode, and Why Your Bot Ignores Groups

A specific behaviour surprises almost everyone the first time. By default, a bot added to a group only receives messages that are commands, replies to the bot, or mentions of it. This is privacy mode, and it exists so that adding a bot to a group does not hand its operator the entire conversation.

If your use case is a support group where the bot should answer anything, disable privacy mode via BotFather's /setprivacy. Think about it before you do. Disabling it means your service receives every message in every group the bot is in, which is a meaningful data protection decision, not a configuration detail. For most support deployments, one-to-one chats are the right scope and privacy mode should stay on.

Async Messaging Changes the Design

A web chat widget is a session. Someone opens it, has a conversation, closes the tab, and the context is gone. Telegram is not a session, and several assumptions break.

The conversation never ends. A customer can reply to your bot three weeks later, in the same thread, with "so did that get fixed?". Your conversation model needs to handle a thread that persists indefinitely, and your context window strategy needs a policy for what counts as the current conversation. A reasonable default is to treat a gap of more than a few hours as a new conversation while keeping the thread visible.

Identity is different, and thinner than you expect. You get a Telegram user ID and usually a first name and username. You do not get an email address unless you ask for it. If your support process needs to look up an account, the bot has to collect that in conversation, and the identifier it collects should be verified rather than trusted.

People type in fragments. Web chat users write one considered message. Messaging users send three lines in a row and expect them read together. Debouncing inbound messages by a second or two before processing produces noticeably better answers than treating each fragment as a separate question.

Formatting is limited and worth using. Telegram supports a subset of Markdown and HTML. Bold, italics, inline code, and links work. Tables do not. If your knowledge base answers lean on tables, they will arrive as unreadable text, which is an argument for keeping answers short and linking out.

Long answers should become short answers plus a link. There is no scrollback pane and no side panel. Four paragraphs in a messaging app is a wall.

Handover Works Differently Too

Escalation on a website means an agent joins a live session while the customer waits. On Telegram, the customer is not waiting, they are on a train. That changes the design in a helpful direction.

  • The handover can be asynchronous. "I have passed this to the team, they will reply here" is a complete and acceptable outcome, because the thread persists and the reply will arrive as a notification.
  • Register an explicit /human command. It is discoverable in the command menu and unambiguous, which is better than hoping your intent detection catches every phrasing of "let me talk to a person".
  • The reply comes back into the same thread. Whatever inbox your agents work in has to be able to send back through the channel, or the handover is a dead end. This is the practical reason channel conversations should land in the same inbox as everything else rather than in a separate Telegram tool.

The general escalation rule design carries over unchanged. What changes is that the cost of a slow response is lower, and the cost of a lost thread is higher.

Where Telegram Sits Among the Channels

ChannelSetup effortApp reviewBusiness verificationMessage window rules
TelegramMinutes, a token from BotFatherNoneNoneNone. You can reply any time
Facebook MessengerMeta app, OAuth, page connectionYes, pages_messagingBusiness account needed24 hour standard messaging window
Instagram DMsSame Meta app, Business or Creator accountYes, messaging permissionBusiness account needed24 hour window, tight API rate limits
WhatsApp BusinessMeta Business Platform, provider or BSP pathYes, plus template approvalYes, and often a display name review24 hour window, templates outside it

The absence of a messaging window is Telegram's other quiet advantage. On the Meta channels you generally cannot message a customer outside 24 hours of their last message without an approved template. On Telegram you can reply whenever you have something useful to say, which makes async support genuinely async.

Disclosure and Data

Two things belong in the setup rather than in a later review.

Say it is a bot. The account is visibly a bot on Telegram, but the first message should still say what it is and what it can do. In the EU this is now a legal obligation under Article 50 of the AI Act, which became enforceable on 2 August 2026 and requires systems interacting with people to disclose that they are machines. The instruction layer that governs your bot's behaviour is where that rule belongs, so it applies on every channel rather than being reimplemented per integration.

Know what you are storing. Message content, Telegram user IDs, and usernames are personal data. Decide the retention period, keep the bot token encrypted at rest, and make sure your privacy notice covers the channel. If you disable privacy mode in groups, that decision needs to be reflected there too.

Where the Platform Fits

The reason to do this through a chatbot platform rather than as a side project is that the bot is the easy part. The awkward parts are keeping one knowledge base behind every channel, keeping Telegram threads in the same inbox as website conversations so a customer is not two records, handling the queueing so a slow generation does not time out a webhook, and storing tokens properly. Paperchat treats Telegram as a channel attached to an existing chatbot rather than a separate product, so the conversations land in the same inbox, the same escalation rules apply, and the answers come from the same corpus the website widget uses. That last point is the one that matters: a customer who gets different answers on two channels has found a bug, not a feature.

The Bottom Line

Telegram is the lowest-friction way to find out whether your chatbot is genuinely ready for messaging. There is no review queue and no business verification, so the only thing standing between you and a live channel is a token.

Create the bot with BotFather, set the description and commands before anyone talks to it, and connect it to a platform that stores the token encrypted and registers the webhook for you. Acknowledge webhooks immediately and process on a queue. Respect the roughly 30 messages per second ceiling and honour retry_after. Leave privacy mode on unless you have thought hard about groups.

Then adjust the design for async: shorter answers, debounced inbound fragments, threads that persist for weeks, an explicit /human command, and replies that come back into the same conversation. Get that right on Telegram and the broader omnichannel build becomes a series of sender modules rather than a series of rewrites.