How to Build an AI Telegram Bot to Manage Your Group (Announce, Pin, Moderate) Quickchat AI released a guide on building an AI Telegram bot that manages groups by posting announcements, pinning messages, and moderating members through AI Actions, which are custom HTTP requests to the Telegram Bot API. The bot uses a server-side gate to restrict destructive actions to admins, ensuring security beyond prompt rules. Introduction A Quickchat AI Agent on Telegram already answers questions in your group here is how to set that up https://quickchat.ai/post/how-to-build-an-ai-chat-bot-on-telegram if you have not yet . This guide shows you how to build an AI Telegram bot that manages your group : on top of answering questions, it can look up chat info, post and pin announcements, and moderate members by muting or banning them, all in plain language. An admin types “ban the user I just replied to” and the Agent makes the call. You do this with AI Actions : custom HTTP requests your Agent can make during a conversation. Telegram does not have a one-click integration like Google Sheets https://quickchat.ai/post/connect-ai-agent-to-google-sheets or HubSpot, so you add these actions by hand , the same way you would when moderating a Discord server with AI Actions https://quickchat.ai/post/ai-discord-moderation-bot . Each action is one Telegram Bot API method. By the end you will have a working community management toolkit that the whole group can talk to going-further-a-bot-the-whole-group-can-talk-to , with the destructive actions locked to admins by a server-side gate not just a prompt rule , and you will have tested each action yourself . You need three things: - a Quickchat AI Agent sign up here and use for https://app.quickchat.ai/register free - a Telegram bot created in two minutes with @BotFather - a Telegram group where your bot is an admin This is a long, exact walkthrough. The canonical reference for AI Actions lives in the docs at docs.quickchat.ai/ai-agent/actions . For the Telegram channel setup itself, see the Telegram integration docs . The full list of methods this post calls is in the Telegram Bot API reference . What you will build Six AI Actions , each one a Telegram Bot API method. Two are read-only and safe for anyone; four change the group and are locked to admins we set that up in Step 7 step-7-lock-the-admin-actions-to-admins : | Action | Bot API method | Who can run it | When the Agent calls it | |---|---|---|---| | Get chat info | getChat | Anyone | A user asks about the group title, description, type | | Count members | getChatMemberCount | Anyone | A user asks how many members the group has | | Post announcement | sendMessage | Admins only | An admin asks to announce or post something | | Pin a message | pinChatMessage | Admins only | An admin replies to a message and asks to pin it | | Mute a member | restrictChatMember | Admins only | An admin replies to a user and asks to mute them | | Ban a member | banChatMember | Admins only | An admin replies to a user and asks to ban them | “Admins only” here is not a polite request to the model. It is a deterministic gate that Quickchat AI checks on its own side before the action runs, using a Telegram-verified flag. We explain it in “Make admin actions admin-only and mean it ” make-admin-actions-admin-only-and-mean-it and wire it up in Step 7 step-7-lock-the-admin-actions-to-admins . The screenshots below come from a test bot in a test group. Every conversation and every Bot API call shown here was produced by a real Agent running the real reply pipeline. Use your own bot and group when you follow along. How Telegram AI Actions work The whole feature rests on one idea: an AI Action is a described HTTP request, and a Telegram Bot API call is one such request. The model decides when to call it and fills in the judgment values; Quickchat AI injects the identifiers and the bot token and sends the request. The split that makes these actions reliable: the model never types an id or a token, so it cannot target the wrong chat or person. It only supplies the judgment values the conversation provides. Three facts make the rest of the post easy to follow. Every Bot API call has the same shape. Telegram methods are called as https://api.telegram.org/bot