> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpressbot.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Groups

> Add your bot to Telegram groups, decide when it replies, welcome new members, and moderate with rules for spam, links, and flooding.

## What is this?

Your bot can be added to **Telegram groups and supergroups**. Each group shows up in the **Groups** page and in your Inbox as one conversation, and you decide how the bot behaves there — when it replies, who it welcomes, and what it removes.

Open it from **Telegram → Groups** in the sidebar.

\[SCREENSHOT: telegram-groups-list — The Groups page with the Total groups, Bot is admin, Bot is member, and Left / removed tiles above the group table]

<Info>
  Group members are **never added as contacts**. The group itself is one entry in your Inbox, and each message shows who sent it.
</Info>

## What can I do here?

* See every group your bot has been added to, and its status
* Choose whether the bot replies to every message or only when addressed
* Send a welcome message to new members
* Set moderation rules that delete spam, links, and flooding
* Warn, mute, or ban members automatically, or by hand from the Inbox
* Send a campaign to groups

## How to use it

### Add your bot to a group

1. In Telegram, open the group and add your bot as a member (its **@username**).
2. The group appears on the **Groups** page.

Two settings in Telegram decide what the bot can do:

* **Privacy mode.** By default a bot only sees commands, @mentions of it, and replies to it. To let it see every message, turn privacy off in **@BotFather** with `/setprivacy`, or make the bot an **admin** of the group.
* **Admin rights.** To delete messages, mute, ban, or pin, the bot must be a group **admin** with the matching right. The group's settings show whether it can **Delete messages**, **Restrict members**, and **Pin messages**.

### Read the Groups page

The tiles show **Total groups**, **Bot is admin**, **Bot is member**, and **Left / removed**. The table shows each group's name, type (**Group** or **Supergroup**), status, member count, what the bot replies to, how many rules it has, and when it was last synced.

| Status                 | Meaning                     |
| ---------------------- | --------------------------- |
| **Member**             | The bot is in the group     |
| **Admin**              | The bot is an admin         |
| **Restricted**         | The bot has limited rights  |
| **Left** / **Removed** | The bot left or was removed |

From a row's actions menu you can open **Group settings**, **Sync from Telegram** (refresh the group's details), or **Leave group**.

### Group settings

Click a group to open its settings.

**Bot replies to**

* **Commands, @mentions and replies only** *(default)* — automations and the AI agent only react when the bot is addressed
* **Every message** — they react to all messages

Messages removed by a moderation rule never trigger anything.

**Welcome new members**

Send a message when someone joins. Use `{{name}}` for the new member(s) and `{{group}}` for the group's name, for example `Welcome {{name}} to {{group}}!`

**Moderation rules**

Click **Add rule**. Rules run from top to bottom on every member's message. Each one has:

| Setting          | Options                                                                                                                                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Rule name**    | A label for you                                                                                                                                                                          |
| **Type**         | **Contains words** (comma-separated, for example `free crypto, casino, airdrop`), **Contains a link**, **Telegram invite link**, or **Flooding** (more than *N* messages in *S* seconds) |
| **Action**       | **Delete**, **Delete + warn**, **Delete + mute** (for a set number of minutes), or **Delete + ban**                                                                                      |
| **Rule enabled** | Switch a rule off without deleting it                                                                                                                                                    |

Every action deletes the offending message first.

**Warnings**

Choose **After N warnings →** **mute** or **ban**. When a member reaches the limit they're muted (for the minutes you set) or banned, and their warning count resets. Use **Reset** next to a member to clear their warnings.

**Never moderate group admins** is on by default, so admins are exempt.

Click **Save settings** to apply. You need permission to edit Telegram settings.

\[SCREENSHOT: telegram-group-settings — The group settings dialog with reply mode, welcome message, moderation rules, and warnings]

### Moderate from the Inbox

Group messages in the Inbox show the sender's name above each message. If you have permission, a small menu next to it lets you **Delete message**, **Warn member**, **Mute 1 hour**, or **Ban member**. See [Telegram in the Inbox](/workspace/telegram/inbox).

Every moderation action — from a rule, an automation, or a person — is added to the group's conversation as a **Moderation** entry, so there's a record.

### Automate a group

* The **Someone joins the group** trigger runs when a new member joins.
* The **Group Action** step can delete, warn, mute, unmute, ban, unban, pin, or reset warnings from a flow.

See [Telegram Triggers](/workspace/automation/triggers/telegram-triggers) and [Telegram Steps](/workspace/automation/steps/telegram-steps).

## Limits of Telegram

* A bot **can't list all members** of a group — only admins and the total count.
* A bot **can't read messages from before it joined**.
* Muting and banning need the matching admin right.
* If a group becomes a supergroup, Telegram changes its ID. The group, its conversation, and its settings follow automatically.

## Troubleshooting / Technical Notes

* **The group isn't listed.** Add the bot to the group, then send a message there. Also check **Groups** is enabled in [Bot settings](/workspace/telegram/bot-settings#groups).
* **The bot doesn't see messages.** Privacy mode is on. Turn it off in @BotFather with `/setprivacy`, or make the bot an admin.
* **Moderation isn't working.** The bot isn't an admin, or lacks the right to delete or restrict. A hint about the missing right is written to the group's conversation, and the flow continues.
* **A rule didn't fire on an admin.** Admins are exempt by default — turn off **Never moderate group admins** to include them.
* **"You don't have permission to view Telegram groups."** Ask an admin for the Telegram view permission.
* **The bot was removed from a group.** It shows as **Left** or **Removed**, and campaigns count it as **Blocked**.

## Related docs

* [Telegram Overview](/workspace/telegram/overview)
* [Bot Settings](/workspace/telegram/bot-settings)
* [Campaigns](/workspace/telegram/campaigns)
* [Telegram in the Inbox](/workspace/telegram/inbox)
