Introduction
This is my second article regarding sending mail to SharePoint group members, in this article I have omitted the use of foreach and parse JSON action and implemented using select and join actions. If you need to refer to the previous one you can check it out here.
Let's start.
Step 1
Go to https://flow.microsoft.com/.
Click on Scheduled cloud flow.
Step 2
Step 3
Step 4
Expand "Send an Http request to Sharepoint" connector box and provide,
- Site Address
- Method as "Get"
- in Uri coulmn fill as _api/web/sitegroups/getbyname('MYGroup')/users
- in Headers key :header,value:application/json; odata=verbose
Step 5
Click on next, find and select the “Select” action.
Step 6
In the select action:
Paste the expression in From value box (in dynamic expresion ) --> outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']?['results']
Paste the expression in Map value box (in dynamic expresion ) --> item()?['Email']
Step 7
Click on next, find and select the “Join” action.
Step 8
In the select action.
From value box -- > select outputs from join
Join with value box -- > ;
Step 9
Click on Next Step and find and select the “Send an Email V2” action.
Step 10
Set the email address from the output of Join action and set the subject and email formatting as per your needs.
Step 11
Total steps.
Step 12
Click on Save Flow.
Step 13
To test the flow, Manually trigger for time being(because it's a scheduled flow).
Step 14
Expected output.
Conclusion
In this article, we learned how to send emails to Sharepoint group members using power automate. I hope this helps someone and happy coding:)