0

I have a normal scenario of getting the members of a Group >> and set a "start and wait for approval" to wait for all responses >> but since the Assigned To is a list >> so Power Automate placed the "start and wait for approval" inside an "Apply to each", as follow:

enter image description here

Here is how the approval is defined:

enter image description here

and the following 2 actions:

enter image description here

Now I am confused on when the logic will leave the "Start and wait for an approval" and when it will leave the parent ApplyForEach? I mean in my case the 2 actions (Get item + condition) will get executed on each response or when all the approvals are done (we get all the responses)?

Second question, why out-side the ForEach I can not get the outcome of the approval? I can only get it inside the ApplyforEach?

3
  • 1
    Do you want separate approval for each user in a group? If not, you can capture all the email addresses in a variable and send single approval request to all group members and then you can perform last to actions after approval action. Feb 16, 2022 at 4:58
  • 1
    @GaneshSanap yes your appraoch worked for me thanks
    – John John
    Feb 16, 2022 at 11:36
  • Great, glad it worked for you. Feb 16, 2022 at 12:26

1 Answer 1

1

Response from "List group members" action is of type "Array". So, when you try to set "Assigned to" of approval action from this array response, Power Automate automatically place the approval action inside an "Apply to each" action.

To avoid this behavior and send a single approval to all list members, you have to follow the below approach:

  1. Create a variable to store the email addresses of group members:

enter image description here

  1. Add apply to each loop and append group member "Mail" address to variable in format (with semicolon): {group member Mail};

enter image description here

  1. Use this variable in "Assigned to" of approval action:

enter image description here

  1. After the approval action, you can perform last to actions (Get item and condition).

You can find similar flow in this article: How to send approval requests to groups in Microsoft Flow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.