Skip to main content
Solved

Compound action recipient list - Architecting a solution to add all users or a group of users

  • January 28, 2026
  • 4 replies
  • 24 views

I am creating a plugin that sends a Slack message to a user when triggered by a webhook from a third party system when the system is experiencing service outages. The plugin is configured with a webhook trigger and uses a compound action in its body. The compound action has a user_email input argument to find the recipient to send the Slack message to, along with a message template that parses some of the information from the webhook’s payload. In my testing, I am sending a mock webhook payload via curl command and providing an email address of a user to send the Slack message to, but the actual payload from the third party system does not include email addresses/user information. Instead of sending the Slack message to just a single user, I’d like to send it to either all Slack users (which Moveworks has ingested), or a group of users, for example that are identified through an email distribution list that use the third party system.

Is there a way to accomplish this so the plugin can send messages to all users, or a group of users, without inputting individual email addresses within the compound action? Since the plugin is using a webhook trigger, the plugin’s audience settings are not able to be configured like we see with a conversational trigger. If the plugin had the capability to configure audience settings I believe I could have the message sent to all users or a group of users.

Here is a snippet of the compound action code I am currently using to send the Slack message to the targeted user.

steps:
- action:
action_name: mw.get_user_by_email
output_key: target_user
input_args:
user_email: data.user_email
- notify:
output_key: notification_output
recipient_id: data.target_user.user.id
message:
RENDER():
...

Thank you!

Best answer by rgeroulo

@jgallo yes, Google Groups can be used as well!

Here is the Google Workspace API documentation on how to get group membership:

Note: To retrieve Google Group members via an API, you must use the Admin SDK Directory API's members.list method. This requires a Google Workspace account and certain privileges.


Below are the prerequisites that I would call out, as gaining access to the Google API will be the biggest lift as the Moveworks pieces are fairly straightforward:

  1. Google Workspace Account
  2. API Enabled: The Admin SDK Directory API must be enabled in your Google Cloud project
  3. Authorization: You need one of the required OAuth scopes, such as https://www.googleapis.com/auth/admin.directory.group.member.readonly or https://www.googleapis.com/auth/admin.directory.group.member. 

Once the access is granted, you will be able to read group membership via API and include that in your Compound Action to get all group users!

Best,

Ryan

4 replies

rgeroulo
Forum|alt.badge.img
  • Employee
  • January 28, 2026

Hi ​@jgallo!

By design, System Triggered use cases do not have the Launch Configuration option since the logic in the Compound Action is determining who to send messages to.

I would advise against sending messages to all users, as that should leverage the Employee Communications tool. This tool is designed to send out mass communications via the bot.

For the distribution list approach, this is definitely possible. The logic would be the following:

  1. Webhook is triggered
  2. API call to Azure to get members of a DL
  3. Loop through DL emails
  4. Send messages

In this flow, you would need to know what DL to use. Either a DL provided in the webhook payload or a hardcoded DL in the Compound Action. Is it possible to send a DL or at least a signal as to what kind of DL to call in the payload? You can either use the direct DL given or query Azure to find the right DL.

Best,

Ryan


  • Author
  • New Participant
  • January 29, 2026

Thanks ​@rgeroulo for the quick response and all the details!

With this plugin, ideally the agent wouldn’t send a message to all users, but would send a message to a group of users who are using the third party system where the webhook notifications are being generated from.

I think your approach with an API call to get the members of a pre-determined DL (which would contain the users using the third party service) and looping through it could work for this. Are there any examples or documentation of this being done? Also could this be done with Google Groups rather than Azure?


rgeroulo
Forum|alt.badge.img
  • Employee
  • Answer
  • January 29, 2026

@jgallo yes, Google Groups can be used as well!

Here is the Google Workspace API documentation on how to get group membership:

Note: To retrieve Google Group members via an API, you must use the Admin SDK Directory API's members.list method. This requires a Google Workspace account and certain privileges.


Below are the prerequisites that I would call out, as gaining access to the Google API will be the biggest lift as the Moveworks pieces are fairly straightforward:

  1. Google Workspace Account
  2. API Enabled: The Admin SDK Directory API must be enabled in your Google Cloud project
  3. Authorization: You need one of the required OAuth scopes, such as https://www.googleapis.com/auth/admin.directory.group.member.readonly or https://www.googleapis.com/auth/admin.directory.group.member. 

Once the access is granted, you will be able to read group membership via API and include that in your Compound Action to get all group users!

Best,

Ryan


  • Author
  • New Participant
  • January 30, 2026

Thanks Ryan, I appreciate all of the information!