Build a Telegram Group Moderator With OpenClaw
Set up an AI-powered Telegram group moderator that answers FAQs, welcomes new members, filters spam, and keeps conversations on-topic — running 24/7 on OpenClaw.
Managing a Telegram group manually doesn't scale. Once you pass 100 members, you're spending hours answering the same questions, removing spam, and welcoming new people. At 1,000+ members, it's a full-time job.
An OpenClaw agent can moderate your group 24/7 — answering FAQs, welcoming newcomers, filtering spam, and keeping conversations on-topic. Here's how to set it up.
What a moderator agent actually does
Let's be realistic about what AI moderation can and can't do:
Works great
- Answering repeated questions — "When is the next event?" "How do I join?" "What are the rules?"
- Welcoming new members with a personalized message and group rules
- Providing information on demand — pricing, links, schedules, documentation
- Summarizing long conversations when asked
- Translating messages in multilingual groups
Requires human backup
- Banning users — the agent can flag, but a human should pull the trigger
- Resolving conflicts between members
- Making judgment calls on borderline content
- Handling sensitive situations — complaints, personal issues
The agent shouldn't do
- Delete messages autonomously (too risky for false positives)
- Make policy decisions about what's allowed
- Impersonate the group admin
Setting up the moderator
Step 1: Create the bot
Message @BotFather on Telegram:
/newbot
Name: [Your Group] Assistant
Username: yourgroup_assistant_bot
Save the bot token. You'll need it in Step 3.
Step 2: Configure the SOUL.md
The personality file is everything for a moderator. Be specific about the group's purpose and rules:
# SOUL.md — Telegram Group Moderator
You are the assistant for [Group Name], a Telegram group about [topic].
## Your role
- Answer questions from group members
- Welcome new members
- Share relevant links and resources
- Keep conversations helpful and on-topic
- You are NOT an admin. You cannot ban, mute, or delete messages.
## Group rules
1. Be respectful — no personal attacks
2. Stay on topic — [define topic]
3. No spam or self-promotion without permission
4. English only (or specify languages)
5. No NSFW content
## FAQ
Q: How do I join [program/event]?
A: Visit [link] and sign up. Registration closes [date].
Q: What's the schedule for [event]?
A: [Detailed schedule]
Q: Who are the admins?
A: @admin1, @admin2, @admin3
Q: Where can I find [resource]?
A: Check our pinned message or visit [link]
## Behavior guidelines
- Be helpful but concise — this is a group chat, not a 1-on-1
- Don't respond to every message — only when directly asked or @mentioned
- If someone breaks rules, politely remind them of the rule. Don't lecture.
- If someone is clearly trolling, say "I'll let the admins handle this" and stop engaging
- Never make up information. Say "I'm not sure, let me tag an admin: @admin1"
Step 3: Configure group permissions
Add your bot to the Telegram group, then configure it properly:
- Add the bot as a group member
- Make it an admin (needed to read all messages)
- Disable "Privacy Mode" via BotFather:
/setprivacy→ Disabled - Set group permissions — the bot needs to read messages and send messages
Without privacy mode disabled, the bot only sees messages that directly @mention it or reply to it.
Step 4: Deploy on OpenClaw
For self-hosting, you'll need to configure the OpenClaw Docker container with the Telegram bot token and set the bot to respond in group chats:
# docker-compose.yml additions
environment:
TELEGRAM_BOT_TOKEN: "your-bot-token"
TELEGRAM_GROUP_MODE: "true"
TRIGGER_MODE: "mention_or_reply"
The TRIGGER_MODE setting is important for groups:
| Mode | Behavior | Best for |
|---|---|---|
all | Responds to every message | Small groups (<20 people) |
mention_or_reply | Only responds when @mentioned or replied to | Medium groups |
mention_only | Only responds when @mentioned | Large groups (500+) |
For most groups, mention_or_reply is the sweet spot — the bot is helpful without being annoying.
Step 5: Add context with skills
OpenClaw skills make your moderator smarter. Add skills for:
- Web scraping — pull live info from your website
- Calendar integration — check event schedules in real-time
- Database queries — look up member info, order status, etc.
# Example: web scraping skill for event info
skills:
- name: "check_events"
description: "Check upcoming events from the website"
url: "https://yoursite.com/api/events"
method: "GET"
Group moderation patterns
The welcome message
When a new member joins, your agent can send a personalized welcome:
Welcome to [Group Name], @newmember! 👋
We're a community of [description]. Here are a few things to get started:
- 📌 Check the pinned message for rules and resources
- ❓ Ask me anything by replying to this message or @mentioning me
- 📅 Next event: [event name] on [date]
Glad to have you here!
The FAQ deflector
When someone asks a common question in the group, the agent answers immediately — before other members have to repeat themselves for the 100th time.
This alone saves hours per week in active groups.
The conversation summarizer
In fast-moving groups, new members often ask "what did I miss?" Your agent can summarize the last few hours of conversation when asked:
@bot what happened today?
Here's a summary of today's discussion:
- @alice shared a tutorial on [topic] — got 15 reactions
- There was a debate about [subject] — consensus was [outcome]
- @bob announced [event] on March 15
- 3 new members joined and introduced themselves
Scaling to multiple groups
If you manage several Telegram groups (common for communities, courses, or multi-chapter organizations), you can run one OpenClaw instance per group or use a multi-agent setup.
| Setup | Cost (self-hosted) | Cost (ClawPort) |
|---|---|---|
| 1 group | $5-15/mo server + time | $10/mo |
| 3 groups | $15-30/mo + 3x maintenance | $27/mo |
| 10 groups | $50-100/mo + significant ops | $90/mo |
The self-hosted approach requires managing Docker containers, SSL certificates, updates, and monitoring for each instance. When something breaks at 2am, it's your problem.
The realistic approach
Start small:
- Week 1: Deploy the bot with just FAQ responses and welcome messages
- Week 2: Review conversation logs, add missing FAQ entries
- Week 3: Add skills for dynamic information (events, schedules)
- Week 4: Fine-tune the personality based on how members interact with it
Most groups see the bot handling 60-70% of repetitive questions within the first month. That's hours of moderator time saved every week.
Getting started
Self-hosting a Telegram group moderator means running Docker, managing a VPS, configuring SSL, and handling Telegram's webhook setup. Expect 2-3 hours of initial setup and ongoing maintenance.
ClawPort handles the infrastructure — deploy your group moderator in 30 minutes, connect Telegram, and you're live. The 7-day free trial lets you test it with your actual group before committing to $10/month.
Your community deserves a moderator that never sleeps.
Ready to deploy your AI agent?
Get started with ClawPort in 60 seconds. No credit card required.
Get Started FreeRelated Articles
How to Deploy an OpenClaw Bot on Telegram (The Complete Guide)
A 14-step walkthrough to deploy your own OpenClaw AI agent on Telegram — from BotFather to Docker to SSL to monitoring. Every command, every config file, every gotcha.
Add an AI Chatbot to Your Shopify Store (Without Apps)
How to connect an OpenClaw agent to your Shopify store for product recommendations, order tracking, and FAQ automation — without paying $50/month for a chatbot app.
How to Migrate From ChatGPT Assistants API to OpenClaw
Why developers are moving away from the OpenAI Assistants API, a full feature comparison, and step-by-step migration guide — including conversation history, file search, and function calling.
Build an AI Appointment Booking Agent (Google Calendar + OpenClaw)
How to build an AI agent that checks availability, books appointments, and sends confirmations using Google Calendar — ideal for service businesses, coaches, and consultants.