I want to create a user group that is everyone except those with, say, @domain.com. Is this possible today in Discourse?
AI-generated summary
The discussion revolves around the ability to create a user group in Discourse that excludes users with a specific email domain, such as @domain.com. Jordan Violet proposes this as a useful feature, especially for dynamic groups based on data explorer queries. Jay Pfaffman suggests it would require a custom plugin or automation tool like Zapier, which can update groups via Discourse webhooks. Hello-Smile6 clarifies that email addresses are sent via webhooks, enabling badge-based automation, though not directly through the core platform. Maiki questions the use case, prompting Jordan Violet to explain it’s for excluding users who haven’t introduced themselves in the introductions category. ZeroDean supports this, noting it helps manage user engagement by automatically adding those who have introduced themselves to a group.
I’m fairly certain that you would need a custom plugin.
I think it would be pretty easy, an hour or two, depending on the details like how easily it can be configured and if there are specs.
Thinking more…not only would this be a great feature, but also the ability to create a dynamic user group based on a data explorer query.
Or be able to use badge sql to award a badge that would add someone to a group. That would be pretty easy too.
I believe email addresses are sent in webhook payloads when a user account is created, so could this also be implemented using webhooks and the API (e.g. for sites hosted by CDCK that can’t use badge SQL)?
Yes, I confirme they are. ![]()
So you could use some automation tool to update groups like Trigger a Zapier task with Discourse Webhooks. That could be a lot of requests for Zapier to handle, so it could get expensive.
What do you do with everyone sans a domain/group? Knowing how you’d use that group will flesh out this feature. ![]()
If you are going to get webhooks involved, I would add everyone to the target group, create a second programmatic group with domain.com auto-added, and then only fire off webhooks only on user events from the second group, which removes those accounts from both groups.
I… spend a lot time budgeting webhooks. ![]()
My immediate use case was creating a user group of all users minus employees.
I require people to introduce themselves in an introductions category. Every time they do, I add them to a group indicating they have done it.
I would like to be able to contact people who have NOT introduced themselves, and remind them to do so (it’s a requirement).
Thus, the inverse of the “already have” group… the “have nots”.