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 Platform Community / Forums / Power Automate / Trigger Condition Not ...
Power Automate
Unanswered

Trigger Condition Not Working

(1) ShareShare
ReportReport
Posted on by 25
Hi All,
I've got a relatively simple flow that is automatically triggered when a SharePoint list item is modified - I've got a trigger condition set to say "if the "Commentary0" field is blank, do not trigger flow" but this doesn't appear to be working - the flow runs no matter what and get's stuck in an endless loop.
 
The flow does the following:
 
1.  When Item/ File is modified
2.  Get Item
3.  Send an email containing the value from the "Commentary0" field
4.  Update item to move the contents of "Commentary0" into "HistoricalComments" field and clear out the "Commentary0" field.
END
 
As you can see - without the trigger condition this would run in an endless loop due to step 4 being another 'update item' action... but this is exactly what's happening.  The rest of the flow is working - any comments that are in the "Commentary0" field are being cleared out but then the flow runs over and over again...  
 
The Trigger condition I've used on the first action is:  @not(empty(triggerBody()?['Commentary0'])) (screenshot below) - can anyone advise what I'm doing wrong?
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,908 Super User 2025 Season 2 on at
    Trigger Condition Not Working
    I don't see any issues with your trigger condition. I would suggest adding a Compose action to your flow. In the compose action pass through your expression so you can check if it returns true, and also pass through the value so you can see if it really is not empty.
  • Suggested answer
    trice602 Profile Picture
    15,329 Super User 2025 Season 2 on at
    Trigger Condition Not Working
    Hi,
     
    I believe the root cause here is in step #4.  You are updating the column that is triggering the flow in step #1.  You can try and add a 2 minute delay between #3 and #4 but my preferred option would be to write all the comments of an item to the comments itself, not a column directly.
     
    Then when new comments are added you can send the email. 
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     


     
  • David_MA Profile Picture
    12,908 Super User 2025 Season 2 on at
    Trigger Condition Not Working
    Based on the title of your post, I thought your trigger was not even working. If it is, then the issue is likely you've created an endless loop as trice602 identified. One thing you could do to prevent this in addition to what trice602 mentioned is to add a second trigger condition. Would the account used to create the flow ever be the one that updates the items to cause the current trigger to run? If not, the second trigger could be where the modified by e-mail is not equal to flow owner e-mail. For example, @not(equals(triggerOutputs()?['body/Editor/EMail'], 'flow.owner@domain.com')),
  • JonMoore86 Profile Picture
    25 on at
    Trigger Condition Not Working
    Thank you all for your very kind (and quick!) responses!
     
    My confusion here is that I thought if the trigger condition was not met then none of the other steps would be attempted - hence me being confused about how I end up in an endless loop.  I can put in another condition to check the value of the comments field and then perform the email & item update; i'll report back with my progress tomorrow!
     
    Thank you all again.
  • JonMoore86 Profile Picture
    25 on at
    Trigger Condition Not Working
    Hi all - I've had another bash, but getting the same result :(
     
    I've added the below condition to say if the "Commentary0" field is empty then do nothing but if it is false (i.e. it has a value) then send me an email with said comment and then modify the item to move the comment into the "Commentary" field, leaving the "Commentary0" field blank.
     
    Now I do understand that, in the below scenario, the flow will run twice - the first time it should find the comment, complete the flow and in doing so, initiate a second run but this time the condition should be found True which should stop any further runs.  This is not happening, however... it goes into an infinite loop sending me constant empty emails as if it believes the comments field is not empty but there are no values.  Am I just using the wrong method of checking the field is empty/ populated?
     
    The syntax for the condition is below:
    empty(outputs('Get_item')?['body/Commentary0'])
     
     
  • Verified answer
    JonMoore86 Profile Picture
    25 on at
    Trigger Condition Not Working
    After much swearing, I've figured out why this was not working... and yes, I'm the reason!
     
    Despite the field showing as empty, the actual raw output of the text field is not blank.  There is always 'some' text in the field:
     
     <div class="ExternalClass1B5CD90236E041CD92576C1548281818"><p><br></p></div>
     
    When there is some text in the field it looks something like this:
     
    <div class="ExternalClassD8A6678EA93A430BAFCA784EBCF059DD"><div style="font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);">Jon testing new customer comments field - test of updated workflow</div></div>
     
     
    A very quick and dirty trigger condition for the above is to say if the length of text within the field in question is less than 100 characters then do nothing, else do what I want it to do. 
     
    God that was frustrating!  Thank you all so much for helping 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

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard