Solved

Assign multiple groups to send an email action

  • 8 February 2023
  • 5 replies
  • 73 views

Badge +4

We want assign multiple SharePoint Security groups to the “Recipient email addresses” field in the “Send an email”-Action.

As of the related help-page, the variable types can be Text or Collection:

Send an email (nintex.com)

Recipient email addresses Email addresses for recipients of the email message that the action sends. Use commas or semicolons to separate multiple email addresses. Do not select a null variable.

Text, Collection

 

Does that mean, that we have to retrieve all users from all groups and put the email-addresses in a collection, which can then be assigned?

That would be a hack of work. In one business case, we have 7 groups and in one of the branches another 5 groups. This is a library with guidelines and if specific users are approving a guideline, an info mail will be send around the globe to the related groups (depending on language and scope).

 

Am I missing something, or is this a unwanted limitation?

With kind regards, Ronny

icon

Best answer by Garrett 28 February 2023, 21:12

View original

5 replies

Badge +4

Nobody from Nintex???

Userlevel 5
Badge +13

Hi @RonLevy 

As each group should have its own email alias e.g. hr@domain.com, you can just use that.

You don’t need to extract the users from the group.

 

Direct method

To Field: hr@domain.com; accounts@domain.com; it@domain.com;

Variable method

Note - Using %var% to signify a variable - Nintex O365 way.
%group_email% = “hr@domain.com; accounts@domain.com; it@domain.com;”

To Field: %group_email%

Badge +4

@Garrett : Hi Garret, this is about SharePoint Security groups, not Office Groups :)

 

Userlevel 5
Badge +13

Hi @RonLevy 

Sorry bro, my bad!

 

  1. You are probably right with your approach - extract users from group. Unpleasant business
    Create a workflow (run periodically) to extract the users email and build a string. Preferable save the string for re-use - SPO multiline column.
    The NWC “Get members of a SharePoint group” action only list groups from the primary site and not document folders or lists. 
    PowerShell “Get-PnPGroupMember” cmdlet can also get the job done.
    Uncertain about Power Automate
    SharePoint REST API (see item 3)
  2. Another way is the WET (Write Everything Twice) method when your AD/Office Groups mimics the SP Security Group. Another unpleasant business. 
  3. Use the SharePoint REST API - If you are using SPO, then
    _api/web/SiteGroups/
    _api/web/SiteGroups/GetById(“ID”)/Users
    The SharePoint REST API returns result as XML. so query the XML

 

Badge +4

Hi @Garrett,

 

OK, I see. I will follow: Create a workflow (run periodically) to extract the users email and build a string. Preferable save the string for re-use.

 

I will have a custom list with group names and related e-mail addresses, which will be updated through the mentioned workflow, running on a daily basis.

 

Too sad, we cannot assign multiple groups to the “Recipient email addresses” field in the “Send an email”-Action.

 

But thanks, anyway

Reply