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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Preventing an endless ...
Power Automate
Answered

Preventing an endless loop

(1) ShareShare
ReportReport
Posted on by 96

I have a flow that is triggered when a list item is modified.  In that flow, I update a few fields.  How do I prevent those updates from triggering the same flow from running again on the same list item?

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at

    Refer some techniques given below...

     

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

     

    Mark this as an answer if it helps you to solve your issue

  • Jordon14 Profile Picture
    21 on at

    Hi,

    I would suggest:

    • Creating a 'Choice' type column with a 'No' and a 'Yes' option and call the column 'ModifiedByFlow'.
    • Set the default option of this column to 'No'.
    • After the trigger 'When an item is created or modified' add a condition.
    • The condition should use the newly created column 'ModifiedByFlow' to be equal to 'No.'
    • If this condition is true, update the 'ModifiedByFlow' value to 'Yes' using the 'Update item' action.
    • If this condition is false, select the Termination control and just simply leave the default status of 'Failed'.

    This will cause Power Automate to run two flows if the condition is true instead of an infinite loop.  The first flow will be successful (since the default value is 'No') and the second flow will be a failure (since the new value will be 'Yes' when it tries to use the infinite loop).

     

    Please mark as solution if this has solved your problem.  Thanks!

     

  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @Ellsworth03054  were the suggestions above able to help you with your issue? Please take a try and feel free to let us know if you have any questions

     

    Besides, here is a great article that provides a way to deal with this kind of problem, please check it and see if it helps:

    stopping-infinite-loops-when-updating-sharepoint-list-items

     

    Best Regards,

  • CU24012305-0 Profile Picture
    96 on at

    Trigger Conditions were my solution here.  Thank you everyone.

  • y2kardell Profile Picture
    147 on at

    I am working on this form and am having an issue. The way it is supposed to work is, when the user submits a shipping request with name, address, personal or business, shipping method, etc, the 1st approver edits the 1st sharepoint form and inputs the tracking number and cost. Then all the information including the tracking number and cost is created and updated into the second form for the 2nd approver to update with the actual cost before sending an email to the shipper with notification via email of how much will be deducted from their payroll. 

    All of that works fine - the problem I am having is the 1st approver is getting 2 approvals for request when all they should receive is just one notification and I cant seem to figure out why? Is there a partial loop issue that is causing this? If so what is the best way to handle it to where the shipper submits their request, it goes to the first approver who edits the forma and updates it with the tracking number and estimated cost, goes to the second approver to updated the second form (after it has been updated with tracking number and actual cost and then alerting the shipper with how much will be deducted from their payroll?

    Here is a screenshot of my flow using power automate:

    Ship Ticket Request Form.png

     

  • hemrhk Profile Picture
    361 on at
  • GHMesina Profile Picture
    4 on at

    I created a flow for a shared inbox  that I set to only send the Auto-reply email once (If , RE: or FW: or Automatic reply: are present do not sent a reply). However, the auto reply email keeps sending email over and over and over to the initiator every 5 minutes. How do I set up the flow to only send one repose for the subject no matter the initiator?

  • aadhawan Profile Picture
    111 on at

    Stop the flow once might work with this condition, but what if we need to update the same row again. 
    The user is updating the same list item where the hidden column is Yes already, it will not trigger again. 

    Any solution for that?

    Thanks 

  • rzaneti Profile Picture
    4,262 Super User 2025 Season 2 on at

    Hi,

     

    Just saw this post. Recently I got the same error (infinite loop when updating the same record that triggered the flow) and solved it by tracking the SharePoint Item 'version', as it is one of the metadata captured by the 'When an item is added or modified' trigger.

     

    The solution is basically to create an additional column in the SP List to track the last version updated by Power Automate (in my case, I keep this column hidden), and add a conditional in the automated flow to identify if the current update is equivalent to the "Power Automate Version" column value+1. If yes, the flow is terminated and the loop stopped. 

     

    I wrote this blog post about describing the strategy: http://digitalmill.net/2023/06/27/bypassing-the-sharepoint-lists-infinite-loop-in-power-automate/ 

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard