Telegram bot to delete messages posted in a chat that contain specific words

Effortlessly manage and delete unwanted messages containing specific words in your Telegram chat.

  • Instantly when the trigger is activated
  • Instantly when receiving a text message (telegrambot → webhook)
  • Delete a message (telegrambot → delete_message)

Managing a busy Telegram group can quickly turn into a nightmare if unwanted messages containing specific trigger words keep flooding your chat. Manually monitoring for and deleting these problem messages is repetitive, time-consuming, and nearly impossible if your group is active 24/7. Without a solution, you not only waste hours on tedious moderation, but risk your group’s reputation and user experience as harmful or off-topic content persists and distracts members.

This Botize formula seamlessly steps in as your vigilant, round-the-clock moderator. Whenever any message is posted in your chosen Telegram group, it instantly checks for words you define—like 'green,' 'red,' or 'blue'—and, at your command, automatically deletes any offending messages right as they appear. No more late-night panic or sifting through endless chat logs: your group stays clean, focused, and professional, and you win back valuable time for what matters most.

Ready to make Telegram moderation automatic and stress-free? Follow Botize’s step-by-step guide to activate this formula or jump straight to the ready-made version—customize trigger words and chat filters, and take back control without breaking a sweat. Say goodbye to moderation headaches and hello to a smarter, safer, and more welcoming Telegram community!

Automate this task with 3 simple prompts

Copy and paste the following prompts into Botize's AI task editor

  1. 2

    Select the AI editing tool.

    AI Prompt Tool
  2. 3

    Begin by creating a trigger that activates the automation whenever someone sends a message in a Telegram group chat where the bot is present.

    Copy and paste this prompt into the AI editing tool.

    Set up the automation to trigger instantly whenever a new message is posted in a Telegram group chat. ⤵

    AI Prompt Tool

    Click the 'Apply this task' button to confirm.

  3. 4

    Add a step to receive the details of any new text message in the chat, so we can review its contents and who sent it.

    Copy and paste this prompt into the AI editing tool.

    Capture all the details about the incoming text message in the Telegram group chat—make sure to get the message text, sender information, chat ID, and message ID. ⤵

    AI Prompt Tool

    Click the 'Apply this task' button to confirm.

  4. 5

    Finally, create a step that checks if the message contains any of the words 'green', 'red', or 'blue', and deletes the message if it does.

    Copy and paste this prompt into the AI editing tool.

    Add a conditional step: if the text of the message contains the words 'green', 'red', or 'blue', then automatically delete that message from the chat using its message ID. ⤵

    AI Prompt Tool

    Click the 'Apply this task' button to confirm.

  5. 6

    Your automation is ready to use. Click the 'Save changes' button.

    Save changes

Keep Your Telegram Chat Clean with Ease!

Imagine a bot that kicks into action every time there's a message in your Telegram chat. If it catches words like 'green', 'red', or 'blue', bam! The message is gone. Simple yet effective, right?

Manual Botize
Monitor chat constantly for inappropriate messages 45 minutes/day 0 Minutes
Manually delete inappropriate messages 30 minutes/day 0 Minutes
Total 75 minutes/day 0 Minutes

Yes, you're in the right place if chat moderation is your goal.


Example 1: Parental Guidance

Ensure your kids' chat groups remain clean and free from inappropriate language.

Hands-free Moderation

Let the bot do the job of deleting inappropriate messages for you.

Chat Harmony

Maintain a peaceful and focused chat environment.

Instant Action

Messages are deleted as soon as they appear.


Example 2: Business Group

Maintain professionalism in your business chat by removing any off-topic comments.

🤖

⌾︎ You're a chat admin tired of manually deleting messages.

⌾︎ You want a cleaner, more organized chat group.

đź™…

âś• You don't mind handling everything manually.

âś• Your chat doesn't deal with unwanted content.


âś“ Change the trigger words as needed for your chat.

âś“ Decide which chat the bot should be active in.

âś“ Adjust the action to be deletion or notification.




This automation is triggered every time a user posts a message in the Telegram chat where your bot is. If the message contains any of the example words (reg, green, blue), the bot will delete it

Related automations