# Use a "User Group" for notify action in automations

**URL:** <https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596>\
**Category:** Get Help\
**Tags:** automations\
**Created:** [April 11, 2025, 7:27am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596 "2025-04-11T07:27:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Ichter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/michael_ichter/32/9931_2.png) [@Michael\_Ichter](https://community.fibery.io/u/Michael_Ichter)\
**Post date:** [April 11, 2025, 7:27am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/1 "2025-04-11T07:27:26Z")

</div>

I want add a user group as the addressee for a notification via automation. These are people who just need to be “informed” of a change, so they are not related or assigned to the entity that was edited. It should be a user group since the specific user(s) can change (this user group is from our Role database), and those in the relevant roles are the ones that need to be notified.

I am struggling with creating a successful formula since the Assignees field is a collection. Is there a way to accomplish this?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 11, 2025, 7:50am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/2 "2025-04-11T07:50:24Z")

</div>

You can just reference this entity using an entity query, e.g.  
`Roles.Filter(Name = "Dev team").Members`

(assumes you want to notify the “Dev team” and assumes that the field name for the relation between Role and Users is `Members`)

---

<div class="post-metadata">

**Author:** ![Michael\_Ichter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/michael_ichter/32/9931_2.png) [@Michael\_Ichter](https://community.fibery.io/u/Michael_Ichter)\
**Post date:** [April 11, 2025, 7:55am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/3 "2025-04-11T07:55:59Z")

</div>

I tried this, but it gives me the error “Can’t access field Assignees on collection field. Use aggregation function on collections instead.”

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 11, 2025, 7:57am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/4 "2025-04-11T07:57:46Z")

</div>

Sorry, my bad. Try this:  
`Roles.Filter(Name = "Dev team").Sort().First().Assignees`

---

<div class="post-metadata">

**Author:** ![Michael\_Ichter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/michael_ichter/32/9931_2.png) [@Michael\_Ichter](https://community.fibery.io/u/Michael_Ichter)\
**Post date:** [April 11, 2025, 7:59am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/5 "2025-04-11T07:59:09Z")

</div>

It now returns with this error  
`Can't access collection field here`

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 11, 2025, 8:02am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/6 "2025-04-11T08:02:10Z")

</div>

Is the role:user relationship 1:m or m:m ?

---

<div class="post-metadata">

**Author:** ![Michael\_Ichter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/michael_ichter/32/9931_2.png) [@Michael\_Ichter](https://community.fibery.io/u/Michael_Ichter)\
**Post date:** [April 11, 2025, 8:28am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/7 "2025-04-11T08:28:15Z")

</div>

m:m. A user can have multiple roles, and a role can have multiple users.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 11, 2025, 8:57am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/8 "2025-04-11T08:57:21Z")

</div>

OK, I think we need to solve this from a different direction.  
I suggest creating a formula in the User database that concatenates the Role names, e.g. `Roles.Join(Name,"")`  
Then in the automation, you can do this:  
`Users.Filter(Find(RoleNames,"Dev Team")>0)`

This will work provided there is no risk of overlap in role naming. In other words, if you have Roles called ‘Engineer’ and ‘Dev Engineer’ then it won’t work when looking for only Engineer (it will find assignees from both roles).

If you want to be more careful to avoid this risk, you can use delimiters, e.g.  
the formula could be  
`Roles.Join("<"+ Name + ">","")`  
and in the automation:  
`Users.Filter(Find(RoleNames,"<Dev Team>")>0)`

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 29, 2025, 11:27am UTC](https://community.fibery.io/t/use-a-user-group-for-notify-action-in-automations/8596/9 "2025-04-29T11:27:39Z")

</div>


