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 / Condition expression t...
Power Automate
Suggested Answer

Condition expression that checks the outcome of each approval

(1) ShareShare
ReportReport
Posted on by 8
I have an approval flow that requires a minimum number of approvals.
 
I have a condition that checks the outcome of each approval if it = "Endorse". The condition is met when I have 1 approver, but when I add a 2nd approver the condition is not met. I've asked CoPilot and it's given me these 2 expressions and neither of them work. Any ideas how to resolve this?
 
{ "and": [ { "equals": [ "@items('Apply_to_each')?['response']", "Endorse" ] } ] }
 
{ "equals": [ "@items('Apply_to_each')?['approverResponse']", "Endorse" ] }
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at
     
    Can you share a screenshot of the flow once? 
     
    If the approval is set in a way that all recipients must "Endorse" and you send it to multiple people but the requirement is that even if one of them Endorses, you want to continue with the flow, you can set up the condition to check "Outcome" contains "Endorse" and it will go ahead. 
     
    However, if the requirement is to check if even one has not endorsed, you can setup the condition as "Outcome" contains "Not Endorsed (or whatever second option you have)" and continue with the flow logic. 
     
    In case where you send an approval to 3 people and you want to check if 2 have approved and then want to continue with the flow, you can setup array variables one for Endorsed and one for Not Endorsed. You can collect the responses using the apply to each loop by checking the condition for the response and then check the length of the array to proceed with the flow logic. 
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • LW-10070350-0 Profile Picture
    8 on at
    Thank you, your 3rd paragraph explains what I'm trying to do.
     
    In case where you send an approval to 3 people and you want to check if 2 have approved and then want to continue with the flow, you can setup array variables one for Endorsed and one for Not Endorsed. You can collect the responses using the apply to each loop by checking the condition for the response and then check the length of the array to proceed with the flow logic. 
     
    Screenshot of the approval and the condition that fails when I have 2 approvers, but they are both responding "Endorse"
     
    I've had a go with an array before and failed so would really appreciate your help!
     
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,874 Super User 2025 Season 2 on at
    Hi,
     

    Initialize a counter variable

    Before your Apply to each, add:

    • Action: Initialize variable

      • Name: EndorseCount

      • Type: Integer

      • Value: 0


      •  

    This will track how many endorses you get.

     Loop over all responses

    Inside your Apply to each, add a Condition:

    • Condition:

      equals(items('Apply_to_each')?['response'], 'Endorse')

      (or whatever field your approval response uses—sometimes it’s called outcome or approverResponse)

    Tip:

    To be sure of the field name, add a Compose action inside your loop:

    items('Apply_to_each')
     

    and run a test—this will show you the exact property names.

    Increment your counter when the condition is true

    Inside the If yes branch of the condition:

    • Add Action: Increment variable

      • Name: EndorseCount

      • Value: 1

    If no branch: leave empty.

     This way, the variable adds +1 each time you get an endorsement.

     After the loop, check if you have enough approvals

    After the Apply to each, add a final Condition:

    • Condition:

      greaterOrEquals(variables('EndorseCount'), 2)

      (Replace 2 with your minimum required number.)

    If Yes: continue the flow.

    If No: take rejection or escalation action.

     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at
     
    Remove all the text in your condition and it should look like: 
     
     
    In the condition action, for the left box, just place the cursor and from dynamic content search for Approver Response and you should be able to select the key. 
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • LW-10070350-0 Profile Picture
    8 on at
    Thank you for the helpful posts.  I've updated Condition 3 to use the dynamic field "body/outcome" and when I have one response of "Endorsed" the Condition = True, however when I add another approver and we both respond "Endorsed" the Condition is not met.   I think I need to capture each Endorsement as it comes through so Condition 3 is met each time, but not sure how to do that.
     
     
     
  • LW-10070350-0 Profile Picture
    8 on at

    I realised I was missing the Apply to each, I've added that in and tested again with 2 people and it's still failing and not meeting Condition 3.
     
     
    This is the input for Apply to each, which is checking each approverResponse, so I'm not sure why Condition 3 is not being met.
     

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard