Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Post an card to a Teams and wait for a response - can other actions run in parallel until Action.Submit?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to make a delayed action Flow to combine into current design with using Post an adaptive card to a Teams channel and wait for a response.

 

So, theoretically, when this this action is performed, Flow posts adaptive card to Teams channel and sets itself to "Running" state until action is complete.  Let's say it has button in the card with Action.Submit:

 

{
"type": "Action.Submit",
"title": "Press the Button"
}

 

And if I create Condition after card action, with:  @body('MyCard')['submitActionID'] is equal to "Press the Button", once button is pressed, Flow goes on with further steps.

 

Is it possible to make a parallel branch with Delay actions and keep posting replies to the card message until button is pressed?

So far all my attempts to make paralleling branching logic fail because until action.submit is 'pressed', nothing keep happening.

 

The goal is to have Flow posting replies under original card message using Post reply to a message V2 every 15 minutes, unless "Press the Button" is pressed, then just stop and terminate

 
  • vbbvbb Profile Picture
    Microsoft Employee on at
    Re: Post an card to a Teams and wait for a response - can other actions run in parallel until Action.Submit?

    So, to recap:

     

    1. Initialise Variable (string), let's call it "ActionComplete" 

    2. After Condition which is set to SubmitActionID = Press The Button:

    3. Set Variable "ActionComplete" , value ="Done"

    4. Parallel branch , Do Until - > condition "ActionComplete" = Done.

     

    Testing this now.

     

    UPD: Yeah, I can confirm that conceptually this does work. I set delay to 10 seconds, so replies were flying in until Submit.Action was triggered and action of Set Variable was taken to consideration. Now need to make some refinements and think about next challenge - i need replies to have different text after each next 15 minute iteration 🙂 

  • vbbvbb Profile Picture
    Microsoft Employee on at
    Re: Post an card to a Teams and wait for a response - can other actions run in parallel until Action.Submit?

    Thanks, will try that now - you used simple string value in variable?

     

    I actually do have a workaround for message ID and someone recently on this forum posted this too - https://knowhere365.space/power-automate-reply-to-an-adaptive-card-post-in-microsoft-teams/.

     

    In my case, I have messageID as variable by using Http request to Azure AD with Graph query for last 50 Teams messages and then filtering content for 1 unique identifier and then Parsing JSON to get "ID" and then Set as Variable (bit much, but it works 🙂

     

     

     

  • Verified answer
    JohnAageAnderse Profile Picture
    1,986 on at
    Re: Post an card to a Teams and wait for a response - can other actions run in parallel until Action.Submit?

    Hello @vbvbvb 

    I made a simple test - by using a variable, you can pass information between branches - so when the adaptive card is submitted, a variable is set to for example "Done" and in the other branch, the Do until loop runs till the same variable is equal to "Done".

    But you are right, identifying the post that the adaptive card is in to get the message id may be hard.

    Anyway, interesting problem, hope you find a solution 🙂

    Kind regards, John

  • vbbvbb Profile Picture
    Microsoft Employee on at
    Re: Post an card to a Teams and wait for a response - can other actions run in parallel until Action.Submit?

    Hi @JohnAageAnderse , I thought about that in such way:

    Capture.PNG

    But then parallel branch has no reference to MessageID of Adaptive card , nor SubmitActionID . Maybe as you said, best way if to make parallel branch to look for specific reply which is posted when "Press the Button" is submitted - there can be some filtering applies from Get messages Teams action - but then it would super complicated logic to say the least 🙂

    Also i am still not sure how to make paralleled branch to stop posting replies when Submit.action is done.

  • JohnAageAnderse Profile Picture
    1,986 on at
    Re: Post an card to a Teams and wait for a response - can other actions run in parallel until Action.Submit?

    Hello @vbvbvb 

    Not sure this is possible, but could you not make the parellel branching before posting the adaptive card?

     

    The first branch will post the adaptive card to the Teams and wait ...

    The second branch will delay 15 min, then loop using a Do until in which it will get messages from the Teams, check among those that the adaptive card post is still active, then post a reply, and delay 15 min.

     

    Completely not sure about the above 🙂

    Kind regards, John

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