The moment it happens
Welcome new members and remove abuse
New members get a welcome, and abusive messages are deleted with a note to you.
- Runs
- The moment it happens
- Apps
- Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- bot is group admin with delete rights; privacy mode off
Send this to your assistant
Create a ClickRuntime automation: welcome new members of my Telegram group by name, delete abusive messages, and tell me each time one is removed.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The admin of a growing Telegram group spends evenings deleting abusive messages and greeting new people by hand. New members arrive to silence and do not know the rules, so the first thing they post often breaks them. Meanwhile an insulting message stays up for hours because the admin is asleep, and members who were targeted leave the group quietly.
When someone joins, ClickRuntime sends your welcome message with the rules. For each ordinary message, it asks ClickRuntime's built-in AI whether it is toxic. If it is, the bot deletes it with deleteMessage and tells an admin what was removed and why, so people can review the decision. The group stays civil even when you are offline.
It suits community admins who want a welcoming, safe space without moderating around the clock.
What you get out of it
New members start with the rules
A friendly welcome that explains what is expected prevents many problems before they begin. People who know the rules in their first minute are far less likely to break them. A clear first message also sets the tone for how members treat one another from the start.
Harmful messages come down fast
Deleting abusive content within seconds limits the damage. Members who were targeted see it vanish before most people read it, which keeps them in the community. Fast removal matters most for harassment, where a single hour of exposure can drive someone out.
Admins sleep better
Moderation continues overnight and across time zones. You no longer need to check the group before bed or first thing in the morning to deal with a problem. Evenings and weekends belong to you again, with the bot covering the hours you are away.
Decisions stay transparent
Every removal is reported to an admin with the original text. If the AI deletes something that was fine, you can see it and restore the conversation with an apology. Reviewing a short report beats guessing what happened, and it keeps the moderation fair.
Healthy groups grow
People stay in groups where they feel safe and welcome. Consistent moderation is one of the most effective ways to keep members active and to attract new ones by word of mouth. Over time, a reputation for fair, calm moderation is what makes people recommend your group.
How it works
What happens, step by step
When someone joins your Telegram group, the bot posts a welcome message pointing them to the rules.
When someone posts, AI checks the message for abuse or spam.
Abusive messages are deleted, and the group admin gets a note saying what was removed and who posted it.
Before it runs live
- Connect Telegram
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Telegram steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, http, credentials, ai
ADMIN_CHAT = "YOUR_CHAT_ID"
def tg(method, **params):
r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
r.raise_for_status()
return r.json()["result"]
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
chat = msg.get("chat", {}).get("id")
for m in msg.get("new_chat_members", []):
tg("sendMessage", chat_id=chat, text=f"Welcome, {m['first_name']}! Say hi and read the pinned rules.")
text = msg.get("text")
if not text:
return {"checked": False}
verdict = ai.generate(f"Is this message abusive? Answer yes or no.\n{text[:1000]}", max_output_tokens=5).text
if verdict.strip().lower().startswith("yes"):
tg("deleteMessage", chat_id=chat, message_id=msg["message_id"])
tg("sendMessage", chat_id=ADMIN_CHAT, text=f"Removed from {msg['chat'].get('title')}: {msg['from']['first_name']}: {text[:300]}")
return {"removed": True}
return {"removed": False}FAQ
Common questions
Does the bot need admin rights in the group?
How accurate is the toxicity check?
Can it warn people before deleting?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Have your Telegram bot answer messages
Anyone who messages your bot gets a helpful reply straight away, and the bot remembers the last few messages.
See how it worksTurn voice notes into text with a reply
Send your bot a voice note and get the transcript back with a short answer.
See how it worksSummarise any link with a bot command
Send /summary with a link and get a five-line summary of the page.
See how it worksKeep exploring
Set up “Welcome new members and remove abuse” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.