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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Condition (Apply to each)

(0) ShareShare
ReportReport
Posted on by 49

Hi Experts,

 

I was trying to make a flow that will post in teams with the current condition I chose. My issue is that if the condition is met it will skip posting in the yes part. I tried setting a variable and adding it in the Yes/No condition but never worked.
Does anyone have an idea on how can I post still in teams even the condition is met and then the flow stops posting after?

I need to post the completed info before stopping the flow. Please see below screenshot. ThanksCapture.JPG

I have the same question (0)
  • Mark_Castro Profile Picture
    49 on at
    Re: Condition (Apply to each)

    Capture.JPG

  • Blurryface Profile Picture
    149 on at
    Re: Condition (Apply to each)

    Hi @Mark_Castro - move your Teams connector out of the apply to each 2 and then delete the apply to each 2 as you are already in a loop. So your flow should have just the Teams connector in the “No” side only. Can you rerun and share flow run error if the issue persists? Thanks LT

  • Mark_Castro Profile Picture
    49 on at
    Re: Condition (Apply to each)

    @Blurryface Thanks for your input. 

     

    I run the flow with the adjustment you advise, Yes it is running smoothly but it is still not posting the 100% completion. I want the flow to post in teams if the condition met YES, it should only post one time and not in a loop. Any advise you can give me? Thanks!Capture.JPG 

  • eyau Profile Picture
    107 on at
    Re: Condition (Apply to each)

    Hi Mark,

     

    The best way to do this would to use 2 conditions with an integer variable to check if there are any yes answers. Initialize a variable equal to 0 and in the 'yes' actions of your original condition, use the increment variable by 1. This means that you can run a 2nd condition to check if the variable is greater than 0 and if 'yes' run a single message and terminate the flow after. If 'no', you can run the original condition again to post multiple messages since by then the flow knows there are no 'yes' answers.

  • Mark_Castro Profile Picture
    49 on at
    Re: Condition (Apply to each)

    Hi @eyau,

     

    The issue is that terminate connector is not allowed inside apply to each condition.

    Capture.JPG

  • eyau Profile Picture
    107 on at
    Re: Condition (Apply to each)

    Hi Mark,

     

    Separate the conditions into separate cases. Here are screenshots of a flow I built that shows what it should look like. The first condition should not post the message in chat, but only check for 'yes' answers.

    CheckingVar2.JPG

    The second condition (which is not an apply to each) checks if the variable is greater than 0. If yes you can post a message and then terminate.

     

    CheckingVar1.JPG

    If no, you can run the same apply-to-each-condition as the 1st condition to post the messages in teams. And because you already checked for yes answers, there is no way that this final condition will run if have a yes answer. If it was yes, then it would've already terminated.

     

    CheckingVar3.JPG

    Lastly, to get that information from the 'yes' condition, you should initialize a string variable and use the 'append to string variable' action to gather the necessary information. This will run alongside your 'increment variable' action. I forgot about this in my initial response, but that should cover everything.

     

    Hope this helps!

  • Mark_Castro Profile Picture
    49 on at
    Re: Condition (Apply to each)

    Thank you I will try this in the morning

  • Mark_Castro Profile Picture
    49 on at
    Re: Condition (Apply to each)

    This is what I did to turn it off. 🙂

     

    Capture.JPG

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard