Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to avoid infinite trigger loop in Power Automate

Posted on October 11, 2020January 6, 2022 by Tom

“I’d like it to update a SharePoint item in Power Automate but I am getting a warning “Actions in this flow may result in an infinite trigger loop”.”

“This exact workflow design had no issues running in SharePoint Designer. Now all of a sudden, the same steps/logic in Power Automate result in this inadvertent looping.”

“Actions in this flow may result in an infinite trigger loop. Please ensure you add appropriate conditional checks to prevent this flow from triggering itself.”


In the past you maybe used 2010 or 2013 workflows (or Nintex workflow, which is using the 2013 workflow engine), and it was not possible to start multiple instances of a single flow on a single SharePoint item. But now, with the standalone Power Automate flows, such situations happen. Especially when you’re using trigger on ‘When an item is created or modified’ and you do an ‘update’ inside the flow. The Power Automate flow will end in an infinite trigger loop because of that update. What “conditional checks” should you add to avoid it?

Power Automate infinite trigger loop

Trigger condition

The best and most efficient way is to add a trigger condition inside the trigger settings. The trigger condition blocks the flow from starting if the condition is not ‘true’. You can not only avoid the infinite trigger loop with all the updates, but also save flow runs. No more empty flow runs.

The limitation is that you can’t use any ‘dynamic content’ and you need to define the condition in the old, type-it-all way (using column internal names).

Update: you can use the ‘Filter array’ action to create the trigger condition for you.

Power Automate trigger condition
Power Automate trigger condition

Trigger condition on ‘Modified By’ column

My favourite is to disable the flow run if the last update was done by a specific account (using its email address). It could be a service account, your account or somebody else’s account, whose connection the flow is using. If the item was updated by this account = it was done by the flow = don’t start it again. If it was modified by another account, start the flow.

@not(equals(triggerOutputs()?['body/Editor/Email'],'SPconnectionaccount@company.com'))

The limitation is that the account won’t be able to start the flow, ever. If you’re also user of the flow and you don’t have any other account, you can’t use this condition.

Trigger condition + version history check

One more approach I thought of (much) later, using trigger condition in combination with version history. I consider it the second best solution after having a separate account.

Trigger condition on two (or more) columns

If you can’t use the trigger condition based on the ‘Modified By’ column, maybe there’s a different column you could use. Some column updated by users. You can create a copy of that column, let’s call them ‘Column’ and ‘Column_copy’. Each update in the flow will update the ‘Column_copy’ = ‘Column’ to keep them synchronized. That means, the only situation when the columns will have different values is when it was updated by a user = run the flow.

@not(equals(triggerOutputs()?['body/Column'],triggerOutputs()?['body/Column_copy']))

With a coding knowledge you can build really complex conditions, using data from existing columns or fixed values. While you can add multiple trigger conditions, the operator is always AND. For OR operator you’ll need to put all the conditions into a single line. In the example below you can see the 2 conditions above combined with OR operator.

@or(equals(triggerOutputs()?['body/Editor/Email'],'SPconnectionaccount@company.com'),not(equals(triggerOutputs()?['body/Column'],triggerOutputs()?['body/Column_copy'])))

Update: you don’t need to stop with checking one column, you can check multiple columns and trigger the flow only if one of them is updated.

Condition action

Another option is to add a condition before each update. Check, if the flow should do an update, or if a previous instance of the flow already did it. For example, you need to update item status to ‘In approval’. You should add a condition before the update and do it only if current status is not ‘In approval’.

Power Automate condition

This approach is similar to the trigger conditions, with a few differences. Using the ‘Condition’ action:

  1. The flow will trigger on each update, that’s a lot of useless flow runs.
  2. On the other side, you can use data from other sources. Using the trigger condition you can compare only data from the trigger itself.
  3. You can use complex conditions without the coding knowledge.

Summary

I find the possibility of updating loops one of the most annoying things when using Power Automate. It’s easy to solve if you’ve got a separate account just for Power Automate or if you’re developing solutions for somebody else.

But if the flow is for your personal use, the workarounds get more complex. You need to manage ALL update actions in the flow, either by building complex trigger conditions or by additional ‘Condition’ actions. I still consider the trigger conditions a better solution, but I can understand it you decide to go with the ‘Conditions’ for its simplicity.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

16 thoughts on “How to avoid infinite trigger loop in Power Automate”

  1. SHAHINI A D says:
    May 21, 2021 at 3:22 pm

    I have tried this option but it still triggers the flow

    Reply
    1. Masud Ahmed says:
      January 29, 2022 at 4:42 am

      You have to change connection from update item control and send mail control. Set trigger mail address as connection .

      Reply
  2. Person of Interest says:
    June 10, 2021 at 1:25 am

    Which solution did you try?

    Reply
  3. Kris says:
    June 30, 2021 at 1:39 pm

    i tried
    @not(equals(triggerOutputs()?[‘body/Editor/Email’],’SPconnectionaccount@company.com’))
    with my account email of course instead SPconnectionaccount@company.com‘
    and it triggers, what am i doing wrong?

    Reply
    1. Tom says:
      July 5, 2021 at 8:13 pm

      Hello Kris,
      you can try to create the trigger condition from scratch with the ‘Filter array’ action, maybe it’ll help.

      Reply
  4. Bernhard Wyss says:
    July 16, 2021 at 3:12 pm

    Hi Tom
    I have the same issue as Kris and even used the Filter array to generate the expression. The strange thing is that I have older items in the list, for which the flow is not running. As soon as I update an item from the list for the first time, it is included in the loop.
    Thanks,
    Benno

    Reply
    1. Tom says:
      July 19, 2021 at 2:07 pm

      Hello Benno,
      I just tried it on my environment an it works as expected. Try to debug your flow by adding 2x ‘Compose’ action after the trigger, store the ‘Modified By Email’ in one of them and the email address in the other. That way you can check if the values are really equal in the flow run history, and adjust the trigger condition if needed.

      Reply
  5. SAN says:
    August 16, 2021 at 3:24 am

    Thank you so much , your trick about debugging worked for me. Really appreciate Tom.

    Reply
  6. Jan says:
    August 18, 2021 at 9:45 am

    Stupid that this option is hidden in a background menu.
    When you use a condition statement which does the same as the statement it will give these warnings all the time

    Reply
  7. Moataz says:
    October 4, 2021 at 3:06 pm

    Hello Tom,

    Thank you for your explanation. But what’s the point if the flow won’t re-trigger for a file change or modified, for example, if this person remodifies the document (after getting the approver’s comment, for example) I won’t be informed about his next changes?
    Is there any best way to do this?

    Thank you and appreciated,

    Reply
  8. kpkp says:
    September 14, 2022 at 7:36 pm

    The name of the account that last modified the list item is not in the body, so the trigger condition is not working. Is there something I am missing?

    Reply
    1. Tom says:
      September 18, 2022 at 7:18 pm

      Hello kpkp,
      try using the ‘Filter array’ action to build the trigger condition, that should make it reliable: https://tomriha.com/a-simple-way-to-create-a-trigger-condition-in-power-automate/

      Reply
  9. Harshad Sarode says:
    August 4, 2023 at 7:22 am

    Hello I have a flow which runs in

    1. When an item is created or modified
    2. Update item:- in this i’ve used expression “add(triggerBody()?[‘ID’],1000)” to add ID’s
    3. Get items:- in this i’m filtering entries based on ID
    4. Condition:- in this i’ve used expression “length(outputs(‘Get_items’)?[‘body/value’])” and then update item, create item

    Basically the flow updates the item with ID’s and then copy’s the entry and pastes it into another list (which acts as a database to feed into power bi)

    The flows in infinite loop an when there are more than 20 entries inthe list the performance slows down is there a way to stop this

    Reply
    1. Tom says:
      September 7, 2023 at 12:07 pm

      Hello Harshad,
      you have 2 updates in the flow, that’s 2 situations you must take care of to avoid the infinite trigger, that’s all I can tell you based on the description.

      Reply
  10. Steve says:
    October 5, 2023 at 4:35 pm

    Hi Tom,

    I too am getting an infinite loop when setting an item to a choice column value to “On Journey”, and it’s puzzling, because another time I’ve used this trigger condition method, it doesn’t keep looping. The trigger I’m using is “when an item is created or modified”.

    @equals(triggerOutputs()?[‘body/field_54/Value’], ‘On Journey’)

    Reply
    1. Tom says:
      November 19, 2023 at 1:29 pm

      Hello Steve,
      if it’s just this trigger condition then it’ll trigger the flow with every following update as long as the choice value is “on Journey”, maybe you need more than 1 condition.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes