web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to filter whether...
Power Automate
Unanswered

Need to filter whether form responders are members of a Team already and if not add them

(0) ShareShare
ReportReport
Posted on by

I have a flow that starts with a form where responder identify training sessions they wish to attend, then automatically adds responders to a Team, and then sends them an email confirmation with further information. But if someone who is already a member of that Team submits the form then the flow breaks. 

 

Is there a way to filter whether they are members of the Team first, then if not add them and send the email? And if they are already members, then they just get sent the email?

 

Any help would be greatly appreciated! 

Thanks.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @sp86,

     

    You could use a Graph API call to list the members of a group. In that same call you can filter for the correct group. After that you can filter the members and check if the responder is already listed as member.

     

    Below is an example

     

    Uri for the graph call. Make sure you change the question to your specific training session question.

    https://graph.microsoft.com/v1.0/groups/?$filter=displayname eq '@{outputs('Get_response_details')?['body/r3bb27b19ab6b4849b0955f236014b841']}'&$expand=members

     

    Expression for the From field of the Filter Array action 

    outputs('Send_an_HTTP_request')?['body']['value'][0]['members']

     

    Check in the condition if the user is not listed as member

    length(body('Filter_Array'))

     

    If that is the case use the below for the add a member to the team action

    outputs('Send_an_HTTP_request')?['body']['value'][0]['id']

     

    checkmembership.png

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard