How to get groups of SharePoint through Power automate and send an email to the particular group
Create a SharePoint group in the SharePoint list settings
I have created a group named ‘MembersGroup’ and added two persons to the group
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-group-1-1024x341.png)
To get the groups, create a Power Automate flow – I have created with an action [when an item is created] and the task is to send an email to the persons in the MembersGroup, So after initial action I used send an email (V2)
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-Flow-1-1024x401.png)
get group using an action called ‘Send an HTTP request’ , provide the site link , Using the Get method and the Uri to be used to get the groups is
_api/web/sitegroups(19)/users
(19) – it defines the ID of the group from the SharePoint MembersGroup /users -we are fetching from the SharePoint
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-group-2-1024x576.png)
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-flow-3-1024x532.png)
next step to take an action select to get the users from the array of the outputs ‘send an HTTP request’
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-flow-5-1024x516.png)
so we get the body from the action ‘send an HTTP request’
but we require the array results from the body , so we create an expression in form of select action Outputs of body & array, thus we get the array of the body
outputs('Sharepoint_get_Group_Members')?['body']?['d']?['results']
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-flow-7-1024x532.png)
to get the required Emails from the group array , we use item expression to Map filed
item()?['Email']
thus we get the users emails into the action using the above expression ( In further any user may be added to the ‘MemberGroup’ shall be automatically fetches into the Power automate without any implements)
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-flow-8-1024x516.png)
Now we get the Emails in the above action select, but we need to separate the emails with semicolon ‘ ; ‘ as which the emails could not able to send in the power automate if it not separated by the semicolon ‘ ; ‘
So we take the action compose and use an expression join
join(body('Select_get_emails'),';')
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-flow-9-1024x529.png)
as we take join expression, it asks for the collection and a array
the collection would be the outputs of the select action and the array would be the semicolon ‘ ; ‘
![](http://rishandigital.com/wp-content/uploads/2022/11/SP-flow-11-1024x562.png)
and thus we get the emails of the users in the MemberGroups and also separated by the semicolon’;’
The final Output is the email sent to the Group of people/users which exists in the ‘MemberGroup’, So Initially I have added ManuL & LTuck to the group, by default testdigital would exist as the creator of the group .
![](http://rishandigital.com/wp-content/uploads/2022/11/Mail-1024x452.png)