
Send Telegram bot replies back to the right topic
Keep chat_id and message_thread_id together when replying to Telegram topics. Use reply_parameters separately, and pause delivery when the original destination becomes unavailable.
Articles about AI Agents, model APIs, developer-tool integration, and Nbility workflows.
#Telegram

Keep chat_id and message_thread_id together when replying to Telegram topics. Use reply_parameters separately, and pause delivery when the original destination becomes unavailable.

Use getFile to resolve a Telegram file_id, download and validate the bytes in your application, then pass supported content to the model without exposing the bot-token download URL.

sendMessageDraft is a temporary preview in a private chat. Persist the answer with sendMessage and handle cancellation, late model deltas, and uncertain delivery separately.

Telegram MessageEntity offsets and lengths use UTF-16 code units. Build correct bold and link ranges around emoji, and keep entities separate from MarkdownV2 parsing.

Handle Telegram's message is too long error with conservative text limits, grapheme-safe splitting, and a receipt for every part of the answer.

Use Telegram update IDs and delivery rules to separate event acceptance, model generation, and sending, including restart and uncertain-send cases.

Part 3 of the AI Agent Getting Started series: create a Telegram bot with BotFather, configure Hermes Gateway, set allowlists and group triggers, then control your server-side Agent from your phone.