Telegram
Connect a Telegram bot with credential validation and automatic webhook registration.
Connect a Telegram bot with credential validation and automatic webhook registration.
Quick setup#
If Create with QR is available on the Telegram connector, select it, scan the QR code or choose Open Telegram, and tap Create bot in the setup bot. Return to Make Agent Fast, review the bot username, and select Connect this bot. No token copying is required. Setup expires after 15 minutes; you can cancel and restart it.
If quick setup is unavailable, use Connect with a bot token below. Both methods use the same connection checks and replacement confirmation.
The creation form suggests your agent's display name and a username in the format maf_<agent>_<random>_bot. Both are editable; the random part reduces name collisions, but Telegram makes the final availability check. Existing bots are not renamed.
After creation, the setup bot sends a Connect this bot button that opens your agent's authenticated connection review. Creating the bot alone does not connect it. After confirmation succeeds, Open bot takes you to the conversation for testing. /start or /help restores an active setup or shows dashboard and guide buttons.
Create and prepare a bot manually#
Follow Telegram's official Introduction to Bots and BotFather guide:
- Open the verified @BotFather account in Telegram.
- Run
/newbot, choose a display name, and choose a unique username ending inbot. - Copy the bot token. Anyone with this token controls the bot.
- Optionally configure the photo, description, about text, and localized command help in BotFather before launch.
The token is for the Telegram Bot API; it is not a Telegram login code, API ID, or API hash.
Connect in Make Agent Fast#
Open the agent's Channels page, choose Telegram, paste Bot token, choose whether supported replies should also be spoken, and select Connect.
Make Agent Fast calls Telegram getMe to validate the token and display the bot username. It then calls setWebhook with the connector's public HTTPS URL, a secret verification token, and message, callback_query, and my_chat_member as accepted update types. Existing pending updates are not dropped.
No manual webhook step is normally required. Stop any polling service before connecting. If the bot has another webhook receiver, review and confirm its replacement; Make Agent Fast does not silently take it over. One agent can answer on up to five Telegram bots at once; each bot is its own connection. Saving a different bot adds a new connection rather than replacing the current one. A bot already attached to another agent must be disconnected there first.
Test the conversation#
- Open the bot's
t.melink from a non-owner Telegram account. - Select Start; bots cannot initiate a conversation with a user.
- Send a knowledge-based text question.
- Send a voice note if voice is enabled.
- Confirm replies arrive, Last message changes, and the thread appears in Conversations.
Private messages are public by default: visitors do not need owner approval. Group replies are off until the owner enables Reply in groups when mentioned or replied to. Telegram Privacy Mode and group permissions still apply. Test direct messages first.
Voice behavior#
Telegram supports inbound voice and outbound voice in this connector. Inbound voice is downloaded and transcribed before the agent turn. With Reply with voice enabled and a speech provider available, Make Agent Fast sends a voice/audio response in addition to text. If transcription or speech fails, ask the user to retry as text and inspect the connector error.
Rotate, disable, or remove#
If the token is exposed, generate/revoke it in BotFather immediately, update the connector with the replacement, and test again. Updating credentials for the same bot preserves its settings and paused status. Replacing it with a different bot requires confirmation and keeps the previous bot's history separate.
Disabling stops replies locally; removing archives the connection and preserves its history. Neither deletes the Telegram bot or calls deleteWebhook, which could disrupt a newer receiver. Archived connections ignore incoming messages. Quick-created bots can refresh credentials after manager lifecycle events, but a paused bot stays paused and an ownership change disables the connection for review.
Troubleshooting#
| Symptom | Fix |
|---|---|
| Token rejected on save | Copy the current BotFather token; remove whitespace and ensure it belongs to this bot |
| Messages reach an older service | Stop polling there, reconnect here, and explicitly confirm any receiver replacement |
| Direct messages work but group messages do not | Enable group replies, mention or reply to the bot, and review Telegram Privacy Mode and group permissions |
| Bot does not message a new user first | Expected Telegram behavior; ask the user to open the bot and select Start |
| Text works but voice fails | Check model/transcription/speech keys and retry with a supported Telegram voice note |
Never paste a live token into documentation, source code, analytics, or a support screenshot.