Task
I came across this issue when changing from SharePoint Designer to O365 Flow (Power Automate). In SP Designer to email a SP group its easy, just select the group and it emails them. With Flow you don’t have that option, so you have to do a HTTP Get from SharePoint. This also does not require any premium actions.
Solution
Here is the overall outlook of the Flow:
- Initialize a string variable, this will contain all of the users emails within the provided SharePoint group.
- Add a Send an HTTP request to SharePoint
- Site Address: You should be able to select it from the pull down
- Method: GET
- Uri: /_api/Web/SiteGroups/GetById(2165)/users?$select=Email
- The Id number you can get by going to the group itself within SharePoint, it will be in the URL: /_layouts/15/people.aspx?MembershipGroupId=2165
- Add a Parse JSON action
- For the Content select Body from the Send an HTTP request from SharePoint
- Next for the Schema click Generate from sample then paste the below into the result and click Done
-
{ "d": { "results": [ { "Email": "MyEmail@gmail.com" } ] } }
-
- it will then automatically populate the Schema as shown below
- Lastly add the Append to string variable
- Name: Select the initial string variable from the beginning
- Value: Set the value to the Parse JSON – Email and it is IMPORTANT to add a semicolon after the Email
- NOTE: it will then automatically be wrapped by an Apply to each
Semicolon Added!
Done!