# Discourse Dynamic Groups

**URL:** https://meta.discourse.org/t/discourse-dynamic-groups/365342
**Category:** Plugin
**Created:** [May 8, 2025, 4:18pm UTC](https://meta.discourse.org/t/discourse-dynamic-groups/365342 "2025-05-08T16:18:18Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [May 8, 2025, 4:18pm UTC](https://meta.discourse.org/t/discourse-dynamic-groups/365342/1 "2025-05-08T16:18:18Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Automatically manage group membership |
| 🛠 | **Repository Link** | [https://github.com/communiteq/discourse-dynamic-groups](https://github.com/communiteq/discourse-dynamic-groups) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

### Features

Discourse communities often need to automate group memberships based on conditions like badge ownership or existing group memberships.

Common use cases include:

- Users not in the ‘subscribers’ group

- Users not banned from posting in #Marketplace

- Users at TL0 or TL1, but not TL2

- Users who have completed the new user tutorial or have been members for over a year

- Users belonging to client\_1, client\_2, or client\_3 and are not an intern

Previously, solving this required custom scripts that periodically synchronized groups. The Dynamic Groups plugin eliminates that need.

This plugin introduces a boolean expression field to group settings, allowing administrators to define rules that dynamically determine group membership.

### Examples:

- users who are not in the ‘subscribers’ group  
`trust_level_0 AND NOT subscribers`

- users who are not banned from posting in #Marketplace  
`trust_level_2 AND NOT banned_users`

- users who are on TL0 or TL1 but not on TL2  
`trust_level_0 AND NOT trust_level_2`

- users who completed the new user tutorial or are member for over a year  
`badge:certified OR badge:anniversary`

- users who belong to client 1, 2 or 3 and are not an intern  
`(client_1 OR client_2 OR client_3) AND NOT interns`

### Configuration

Once the plugin is installed and enabled, a new tab will appear in the group admin interface:

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/9/2/092cc8d128be1565a4a2b85d46959524f8fae66b.png)

When you enter or update the boolean expression, the system will take a few moments to populate the group with matching users. From that point on, group membership will be automatically updated as user status changes.

**Important:**  
When a rule is defined, the group is marked as **automatic** , disabling manual member changes. To revert the group to manual management, simply clear the expression field. The existing members will remain, and you’ll regain manual control.

---

_[View the full topic](https://meta.discourse.org/t/discourse-dynamic-groups/365342)._
