# Add script to add user to user group

**URL:** <https://meta.discourse.org/t/add-script-to-add-user-to-user-group/268478>\
**Category:** Feature\
**Tags:** automation\
**Created:** [June 15, 2023, 3:46pm UTC](https://meta.discourse.org/t/add-script-to-add-user-to-user-group/268478 "2023-06-15T15:46:09Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)\
**Post date:** [June 15, 2023, 3:46pm UTC](https://meta.discourse.org/t/add-script-to-add-user-to-user-group/268478/1 "2023-06-15T15:46:09Z")

</div>

There is currently a script in the Automation plugin to add users to a group based on a custom field. We would like a script to add users to a group, when they’re added to another group.

The scenario is this: The Discourse Experts plugin expects you to only have one user group designated for “experts”. We are running an ambassador program and have two tiers of ambassadors—both of which are “experts” in this case.

We would like to say, anyone added to “Ambassadors” or “Expert Ambassadors” also gets added to the “Experts” user group.

---

_[View the full topic](https://meta.discourse.org/t/add-script-to-add-user-to-user-group/268478)._
