What you'll need
Create the bot with BotFather
Open Telegram and search for @BotFather. Open the verified BotFather chat — the one with the checkmark — and send /newbot.
BotFather first asks for a display name, such as “Acme Support”. This is what customers see at the top of the chat, and you can change it later. Then it asks for a username. The username must be unique, lowercase, and end in “bot”, for example acme_support_bot or duty_acme_bot.
When both are accepted, BotFather replies with an HTTP API token that looks like 1234567890:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw. Copy it immediately. Anyone with this token can control the bot, so treat it like a password and do not post it in groups, tickets, screenshots, or frontend code.
Connect the token in DutyPilot
In DutyPilot, open Integrations → Telegram. Paste the full BotFather token into the Bot Token field and click Connect Telegram. DutyPilot checks the token with Telegram, reads the bot ID, display name, and username, encrypts the token before storing it, and links the bot to your current workspace.
One Telegram bot belongs to one workspace. If the same bot is already connected elsewhere, DutyPilot refuses the second connection instead of splitting customer conversations across workspaces.
On success the card flips to Connected. DutyPilot also registers its own Telegram webhook for that bot and creates a fresh secret used to verify every incoming Telegram update. You do not configure polling, servers, certificates, domains, or webhook secrets yourself.
Start the bot and send the first test
Open your bot directly with its public link: https://t.me/acme_support_bot. Press Start, then send a normal text question that your business can answer, for example “What are your support hours?”
DutyPilot creates a Telegram contact from the sender's chat ID and name, opens a new Telegram conversation, answers with the AI assistant, and sends the reply back through the same bot. The full exchange also appears in DutyPilot's unified inbox.
If nobody pressed Start, that is fine too: the first message a customer sends to the bot is what creates their contact and conversation. DutyPilot currently automates incoming text messages, so use text for setup and acceptance testing.
Customize the Telegram profile and menu
Telegram customers judge a bot by its profile before they press Start. Go back to @BotFather, open /mybots, choose your bot, then choose Edit Bot. Change the display name, About text, profile description, and profile picture there. These are Telegram-native settings; DutyPilot does not override them.
Use About for one short trust line, for example “Official Acme support bot — instant answers, human help when needed.” Use Description for what the bot can and cannot do, such as supported topics, languages, hours, and how to reach a human.
Add a command menu with Edit Commands so mobile users see helpful shortcuts. A good starter set is start, help, pricing, hours, and human. Keep command names lowercase and short. Customers can still type free text — Telegram sends commands to DutyPilot as ordinary text, so a command should match questions your knowledge base already answers.
After changing the name, username, picture, or commands, open the bot profile to confirm what customers see, then return to DutyPilot and click Test connection. That refreshes the stored bot name and username and re-registers the webhook.
Train the DutyPilot brain behind the bot
The same AI answers every channel, so train it once and Telegram improves automatically. Upload product docs, pricing pages, policies, FAQs, and troubleshooting guides in Files. DutyPilot chunks and indexes them, retrieves the relevant passages for each Telegram question, and answers from verified content with citations.
Open Agent Settings and write Bot Instructions for tone and rules, for example which topics to escalate, how long replies should be, and how to sign off. These instructions sit alongside knowledge-base search, human escalation, and conversation resolution, so tuning Telegram does not break the other channels.
Set the first impression in Customization → Greeting Message. DutyPilot saves that greeting as the first assistant message when a new Telegram conversation is created, so write it as an invitation: what the bot covers, what to ask first, and when a human steps in.
Set the escalation message too. When the AI decides a Telegram chat needs a person, the customer immediately sees that handoff message in Telegram while your team picks the conversation up in DutyPilot.
Run Telegram from the unified inbox
Every Telegram chat appears in Conversations with a TG badge and the sender's Telegram username or first name. Open it to see the full thread, citations, status, and conversation history.
While a conversation is unresolved, the AI answers automatically. When the AI escalates, or when you reply yourself, DutyPilot sends your message back through Telegram. Long AI answers are trimmed to Telegram's 4,096-character message limit so delivery does not fail silently.
If a conversation is resolved, new customer messages are still saved to the thread, but automatic replies stay paused until the conversation is reopened. This prevents the bot from jumping back into a case your team has closed.
Keep the token, webhook, and health green
The Telegram card shows the bot username, bot ID, last activity, and any webhook error. Click Test connection whenever something looks stale. Besides checking the token, this refreshes the stored bot identity and re-registers the Telegram webhook with a new secret.
The per-bot webhook URL is shown on the card for reference, for example .../telegram/webhook/1234567890. DutyPilot registers it automatically, so do not set the webhook manually and do not point another service or polling script at the same bot token — Telegram delivers each update to only one webhook.
If a token leaks, rotate it in @BotFather under /mybots → your bot → API Token → Revoke current token, then paste the new token into DutyPilot with Connect Telegram. Reconnecting replaces the encrypted token, bot identity, webhook secret, and registration in one step.
To retire Telegram support, click Disconnect. DutyPilot removes the Telegram webhook and deletes the workspace integration so Telegram stops delivering updates.
Fix the common Telegram failures
“Invalid bot token” means Telegram rejected the pasted value. Copy the token again from BotFather without extra spaces or line breaks, make sure it belongs to the intended bot, and reconnect. If the token was revoked or regenerated in BotFather, the old value can never work again.
A webhook error on the Telegram card means the token was valid but Telegram could not register delivery. Click Test connection and read the new message. If your public DutyPilot URL recently changed, testing is usually enough because it pushes the corrected webhook URL.
If customers press Start and nothing appears in DutyPilot, check that the message went to the connected bot username, that the token on the card belongs to that same bot, and that no other app, script, or getUpdates poller is consuming the bot's updates. Only one webhook wins.
If one customer gets no reply, open their thread and check its status. A resolved conversation stores new messages but does not auto-answer; reopen or reply manually. Check whether they blocked the bot, and remember that photos, files, and voice notes are outside the current text-message automation path.
Next up
Connect WhatsApp via the Cloud API
Stuck on a step? Contact support — we usually reply within a day.