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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adaptive cards - how t...
Power Automate
Suggested Answer

Adaptive cards - how to send to multiple users with wait for response from just one user

(0) ShareShare
ReportReport
Posted on by 4
Please help. In my flow I am able to send an adaptive card to multiple users utilising 'Apply to each' loop with an array variable (varFAATeam). 
 
In the apply to each loop > Settings, I have turned on Concurrency Control, and set parallelism to 2
While the adaptive card is sent to both users at the same time, the task does not complete and move to the next action (send email) in the flow until both users respond to their card.
What I would like to achieve is something like 'start and wait for an approval' task on a 'first to respond' basis. How can I achieve this?
BTW - I have used 'Post adaptive card and wait for a response' action in the above flow. 
 
Categories:
I have the same question (0)
  • Suggested answer
    Tomac Profile Picture
    4,061 Moderator on at
    There are a couple of issues with this flow that you haven't encountered yet, namely that you won't have access to content created inside the Apply To Each loop in your Send An Email action that's outside of the loop. You'll need to store the content that you want to use in a variable in order to have access to it outside of the loop. This is because Power Automate won't know which iteration of the loop to reference.
     
    Not knowing the full goal of your flow or the full set of actions being taken, I can't speak much to the issue at hand. You can use parallel paths to run multiple Wait For A Response actions and continue the flow after the first completes, but that won't work with a loop. Are you always going to have a fixed number of users that you're sending the Adaptive Card to? If so, don't use a loop, use parallel paths.
     
    Concurrency Control won't continue the flow when the first iteration of the loop completes, the whole thing still has to finish.
     
    If you need to be able to send to a variety of users that can change in number, then I would recommend using an Approval task set to First To Respond:
  • satishlal Profile Picture
    4 on at
    Thank you for your response Tomac. Please let me explain better.
    I am using adaptive card because I need to collect specific data in custom fields. I have used expression "id": "<data item name>" in the JSON to define each data item. Then I collect the data in a Compose action as a check and use an 'Update item' action to pass the data into corresponding fields in the SharePoint list item. This is without the loop using the varFAAmembers.
    Now I need to send this one adaptive card to two users and then complete the adaptive card after any one user responds.
    BTW - I am not aware if I can add custom fields on an Approval task and get the responder to enter data in these fields and respond with one of the response options. Any help with will also be appreciated.
  • Suggested answer
    Tomac Profile Picture
    4,061 Moderator on at
    Got it. You can accomplish this by combining a few techniques. Here's a sample flow, after the screenshots I'll explain:
     
     
    At the top we're making 3 boolean variables to track outcomes. We set each to an expression of FALSE (important to use FALSE as an expression and not text, same with TRUE later)
     
    Next we're launching 3 parallel branches
    1.  Post and Adaptive Card and wait for a response 1, splitting into two branches:
      1. If it completes normally, set boolResponded to TRUE
      2. Use the Configure Run After setting on this branches action to run only after the adaptive card times out, and set boolCard1Timeout to TRUE
    2.  Post and Adaptive Card and wait for a response 2, splitting into two branches:
      1. If it completes normally, set boolResponded to TRUE
      2. Use the Configure Run After setting on this branches action to run only after the adaptive card times out, and set boolCard2Timeout to TRUE
    3. Do...Until loop with the following snippet: @or(equals(variables('boolResponded'), true),and(equals(variables('boolCard1Timeout'), true),equals(variables('Card2Timeout'), true)))
      1. This runs a delay action that every 5 minutes checks if either person has responded or both cards have timed out
    4. Scope statements with notes of what they should contain
    You'll need to set the adaptive card actions to time out after your allowable response period. I set mine to "P2H" to time out after 2 hours.
     
    The terminate action will cancel the flow after the first person responds without waiting for the second person to respond or timeout.
     
    When using the outputs of your adaptive cards, you'll need to use the coalesce(Output1,Output2) function to automatically disregard the non-responsive card and use the one with content.
     
    That got rather complicated but will accomplish your goal. If this comment helped, please mark it as the answer.
     
    EDIT: after closing my sample flow without saving I realized I posted the example with an error. The Condition at the bottom will need to be duplicated into the Do...Until column above the Terminate action to with your actions to be used if at least one person responded. Otherwise you'll be trying to run the "Somebody Responded" actions whether you got a response or both cards timed out. Sorry for that missed bit, but I'm sure you can figure this note out.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard