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 / BUG: Infinite Loop whe...
Power Automate
Answered

BUG: Infinite Loop when updating a SharePoint list item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

When you have a trigger in Flow on a SharePoint list item/file, and the Flow then updates the same item/file, the update causes the Flow to kick off again.  We need a way for the Flow to only run once, regardless of which field was updated, without the need for any ridiculous work arounds.

Categories:
I have the same question (0)
  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    The issue that you mentioned isn't a bug and you must be using the "When an item is created or modified" trigger of sharepoint connector in your flow, the "When an item is created or modified" trigger would run whenever an item is created or an item is modified in the sharepoint list.

    If you want the flow would only run when an item is created in the list, you should add the trigger "When an item is created" of sharepoint connector in your flow.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You've made the assumption that I only want to update a list item when it is created.  The assumption is incorrect.

     

    I want to update the item when the item is EITHER created or updated, and then, subsequently, have the Flow NOT run another instance of the same Flow, which causes another instance of the same Flow to run, which causes another instance of the same Flow to run... etc.

    The infinite looping issue is a bug, because you have to apply workarounds to fix it. 

  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I understand your issue, so you want your flow would update the item when an item is created or modified.

    If you add an "Update item" action under the trigger, the flow would run into endless loop, the flow would run again since it don't know if the item is modified by manually in the sharepoint or by the flow.

     

    This is known issue and there is an alternative solution for this issue currently, that is add a Condition under the trigger to check if the item is modified by manually or by the flow.

    You could refer to steps below:

    1.Add a Yes/No type column "UpdatedByFlow" in the sharepoint list, set the default value of the column to false. whenever you add an item to the list, set the column of this item to false, and whenever you update an item in the list, set the column of this item to false.

    2. Create a flow with trigger "When an item is created or modified", add a Condition under the trigger to check if the "UpdatedByFlow" column value is equal to false, and if the column is equal to false, you could add the "Update item" action inside the If yes branch of the condition,set the "UpdatedByFlow" field to Yes, and leave the If no branch of the Condition blank.

    3.So every time when you create an item in the list, the flow would run into the if yes branch of the condition and uodate the item.

    When you update an item in the list, the flow would run to update the item and set the UpdatedByFlow column to Yes, and flow would be triggered again,but it would run into the If no branch and wouldn't update the item again.

     

    Hope it could help you.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-alzhan-msft I appreciate what you've suggested, unfortunately this is not a viable solution.

     

    With potentially hundreds of users that the solution we're trying to build is for, getting them to set the "UpdatedByFlow" field every time they make a subsequent edit on a list item is simply not a realistic expectation of them.  We want things to be simple for them, and having to burden business users with a workaround because of a Microsoft issue is simply not going to be acceptable to managers.

    So I'll re-iterate what I said before - this issue requires very clunky workarounds to mitigate it, so it is a bug - or a design defect - or whatever you want to call it, in the real business world this is a painful issue, and needs to be addressed.

  • Verified answer
    v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Hope the link below could help you:

    https://powerusers.microsoft.com/t5/General-Power-Automate/Update-Item-Infinite-Loop/m-p/252742

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 541

#2
Valantis Profile Picture

Valantis 479

#3
Vish WR Profile Picture

Vish WR 470

Last 30 days Overall leaderboard