Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. When someone joins your Telegram group, the bot posts a welcome message pointing them to the rules.

  2. When someone posts, AI checks the message for abuse or spam.

  3. 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

RunsThe moment it happens
Welcome new members and remove abusejust nowSucceeded
Telegram · Group adminWelcome, Maya! Say hi and read the pinned rules.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
group_moderation_and_welcome.pyexample
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?
Yes. To delete other people's messages, the bot must be an administrator with the delete messages permission. To see all messages it also needs privacy mode off in BotFather or admin status. Without those rights, deletion fails and only the welcome message works.
How accurate is the toxicity check?
It catches clear insults and abuse well but can misjudge sarcasm, banter or quotes. Because deletions are reported to an admin, mistakes are visible. You can raise or lower strictness through the instructions. Reviewing the reports for a week helps you tune it.
Can it warn people before deleting?
Yes. Instead of deleting at once, the bot can reply with a warning for a first offense and delete from the second. Describe the escalation you want and approve it before it goes live. Tell your assistant how many warnings you want to allow.
What permissions does it need?
bot is group admin with delete rights; privacy mode off. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.