Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How To filter people in flow from people field of sharepoint

(0) ShareShare
ReportReport
Posted on by 43

Hi all,

 

I am creating flow fetching details of different sites owned by different owners and admins. I want to emails to different owners and admins at differnt times . how can I filter the users based on the no of ownership and send email to that particular no of owned site . To give more insite tomy requirement ., My one scenario would like , if there is 0 site aadmin and 1 owner then i want to send emails to 1 owners of respective sites . same is the case with other scenarios.

 

Any leads would be appreciated

@yashag2255 @RezaDorrani 

  • KanwalKaurSaini Profile Picture
    43 on at
    Re: How To filter people in flow from people field of sharepoint

    Hi ,

     

    In my Use case I have one master list having details of different sites with their primary and secondary admins and owners. They can be admin of either one site or owners of multiple sites .Either of the case it could be . I need to send 1 email only to owners (if there is no site admin for that sites ) & admins (if there is atleast one admin and 1 owner) to provide details of other admins and owners as part of our SHarePoint governance . How could this be achieved without sending multiple emails to users . How could I get unigue list of users in this case.

  • v-albai-msft Profile Picture
    on at
    Re: How To filter people in flow from people field of sharepoint

    Hi @KanwalKaurSaini 

    What do you mean about site admin? Do you mean the users who have SharePoint admin role configured in Microsoft 365?

    From your information, I think you want to send email to all site owners in a specified site. If yes, you can use “Send an HTTP request to SharePoint” action to get a list of site owners and then you can send emails to them.

    Since you want to send emails at different times, I create a Scheduled flow for a test.

    1. add a “Send an HTTP request to SharePoint” action, select “Get” of Method, and set Uri to below(testpowerapp is my site name):

    _api/Web/SiteGroups/GetByName('yoursitename Owners')/users

    valbaimsft_0-1626341142430.png

     

    2. Add a Array Variable called users, using this expression:

    body('Send_an_HTTP_request_to_SharePoint')['d']['results']

    valbaimsft_1-1626341142432.png

     

    3. Addanother  two variables:

    valbaimsft_2-1626341142434.png

     

    4. Append each email into the user variable:

    concat(variables('users')[variables('i')]['Email'],';') 

    valbaimsft_3-1626341142437.png

     

    Here is the full flow:

    valbaimsft_4-1626341142440.png

     

    In the last of the flow, send email directly using the user variable(I add a compose action to check the result):

    valbaimsft_5-1626341142443.png

     

    valbaimsft_6-1626341142444.png

    Reference:

    https://www.portiva.nl/portiblog/2018/06/05/microsoft-flow-perform-actions-on-users-in-a-sharepoint-group-using-the-api

    Best regards,

    Allen

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492