Telegram support bot: how it works and how to set it up
By Roman Zakharenko · Facts checked
A Telegram support bot is a program connected to the Telegram Bot API. You register it with @BotFather, receive a token, and your code gets customer messages through a webhook or long polling. Telegram bots can't start conversations, so every support flow begins when a customer opens your bot and taps Start.
At a glance
- You create a bot and get its authentication token by messaging @BotFather.
- Updates arrive through getUpdates or a webhook; the two methods are mutually exclusive.
- Telegram keeps undelivered updates for no longer than 24 hours.
- Bots can't message users first; the user must message the bot or add it to a group.
- Webhooks only work on ports 443, 80, 88 and 8443.
How a Telegram support bot works
You create a bot by messaging @BotFather in Telegram, which registers it and gives you an authentication token. Your code uses that token to call the Bot API over HTTPS. The token only authenticates your code; it doesn't give the bot permission to message anyone.
Bots can't start conversations. A user has to message the bot first or add it to a group. Every bot has a link in the form t.me/ followed by the bot's username that opens a chat with it, and the first time someone opens that chat they see a Start button that sends the /start command. Save the user's chat ID at that moment: you need it to send any later message, such as a ticket update.
- The customer taps your t.me link on your website or in an email and presses Start.
- The bot greets them and shows a short menu of common topics.
- Simple questions get an answer straight away; anything else is collected (order number, description, screenshots).
- The bot creates a ticket in your helpdesk and tells the customer what happens next.
- When an agent replies in the helpdesk, the reply is sent back to the same Telegram chat.
Webhooks vs long polling
The Bot API offers two mutually exclusive ways to receive updates: the getUpdates method (long polling) and webhooks. While a webhook is set, getUpdates won't work. Either way, Telegram keeps updates you haven't received for no longer than 24 hours, so a bot that is offline for a day loses messages.
| getUpdates (long polling) | Webhook (setWebhook) | |
|---|---|---|
| How it works | Your server asks Telegram for new updates | Telegram sends each update to your HTTPS URL |
| Hosting | Any server that can make outbound requests | A public HTTPS endpoint on port 443, 80, 88 or 8443 |
| Checking the sender | Not needed, your server makes the requests | Set a secret_token; Telegram returns it in the X-Telegram-Bot-Api-Secret-Token header |
To switch from a webhook back to polling, remove the webhook with deleteWebhook or by calling setWebhook with an empty URL. Both methods accept drop_pending_updates if you want to discard the queued backlog when you change your setup.
Buttons and menus for support flows
Support bots work better with buttons than with free text. Custom reply keyboards replace the user's keyboard with preset answers, and pressing one sends that text into the chat. Inline keyboards attach buttons to a specific message and don't post anything to the chat when pressed. An inline button can open a URL or send callback data of 1–64 bytes to your bot.
Two details catch new bots out. After a user presses a callback button, Telegram clients show a progress indicator until your bot calls answerCallbackQuery, so answer every callback, even with no text. And for multi-step menus, edit the existing message with new buttons instead of sending a new message each time; editing works for messages that have inline keyboards.
Groups, privacy mode and sending limits
Bots added to groups run in privacy mode by default. In that mode a bot receives commands addressed to it, replies to its own messages, messages sent via the bot and service messages, but not ordinary group chatter. Bots that are group admins receive all messages, and you can turn privacy mode off with /setprivacy in @BotFather, though Telegram recommends that only when absolutely necessary. Messages in private chats with the bot always reach it.
| Where | Guidance |
|---|---|
| A single chat | Avoid more than one message per second; short bursts may pass before 429 errors start |
| A group | No more than 20 messages per minute |
| Bulk notifications | About 30 messages per second across users, unless you enable paid broadcasts |
Telegram's FAQ gives these as approximate figures, so build in retries for 429 errors rather than relying on exact numbers. For a support bot they mostly matter when you notify many customers at once, for example about an outage. With long polling, also pass the offset parameter to getUpdates: updates up to that ID are marked as confirmed and won't be returned again.
Helpdesk handoff and Telegram Business
For bot-to-human handoff, the usual pattern is for the bot to open a ticket and relay agent replies back to the chat. Zendesk supports Telegram as a Sunshine Conversations channel in the Agent Workspace, which requires Suite Professional or above. Messages become tickets, and an agent's reply in Zendesk appears in the customer's messaging app.
Telegram Business is a separate option for small teams that answer customers from their own Telegram account. The account owner can connect one business bot at a time, choose which chats it can access, and let it process incoming messages and, where permitted, reply on the owner's behalf.
How TascaLab can help
TascaLab builds Telegram support bots that connect to the tools you already use, such as Zendesk, Freshdesk, Jira, Slack or internal systems, through APIs, webhooks, and Make or n8n. A Starter Chat Bot ($400) covers one or two channels with FAQs and basic info collection, which suits Telegram plus a website widget. Every project includes 30 days of post-launch support and basic documentation, and most setups take 1–3 weeks. You can start with a free 30-minute Health Check call.
Frequently asked questions
Can a Telegram bot message customers first?
No. A user has to message the bot or add it to a group before the bot can write to them. Save the chat ID on first contact so you can send updates later.
Should I use webhooks or getUpdates?
Either works, but not at the same time. Webhooks push each update to your HTTPS endpoint, while long polling only needs outbound requests and is simpler during development.
Why doesn't my bot see messages in a group?
Bots run in privacy mode by default and only see messages meant for them. Make the bot a group admin, or disable privacy mode with /setprivacy in @BotFather and re-add the bot to the group.
Does Zendesk support Telegram?
Yes, as a Sunshine Conversations channel in the Agent Workspace, which Zendesk lists as requiring Suite Professional or above. Messages arrive as tickets and agent replies go back to Telegram.
Want this set up for your team?
Book a free Health Check: a 30-minute call and a written report with 2–3 concrete recommendations, a fixed price and estimated running costs. No pitch.
Sources
- Telegram — Bots: An introduction for developers
- Telegram — Telegram Bot API
- Telegram — From BotFather to 'Hello World'
- Telegram — Marvin's Marvellous Guide to All Things Webhook
- Telegram — Telegram Bot Features
- Telegram — Bots FAQ
- Telegram — Connected business bots
- Zendesk Help Center — Adding Sunshine Conversations channels to the Zendesk Agent Workspace