Showing results for 
Search instead for 
Did you mean: 
Kudo Commander
Kudo Commander

How to stop infinite loop when workflow modifies list that workflow is set to run on

I have a SharePoint library, we'll call it Library "Test".   I have a custom approval (NOT using the approval actions in FLOW) process I built using standard SharePoint and Office 365 Connectors.  The FLOW has some delays in it as well.  


The FLOW triggers on "When a file is created or modified (Properties only).  The problem is that the workflow may run for a few days, waiting for a status change.  If Joe User comes along and makes a change to the file or to any of it's properties...that kicks off the FLOW again.  I don't want that (in SharePoint Designer, you could only have one instance of one workflow running on an item or on a document and it's properties at a time.  If somebody modified the list or library item while a SPD workflow another instance of the workflow running - quick note for Microsoft...I've been noticing that FLOW offers some GREAT functionality, but it misses huge too often when it comes to SharePoint which I would presume is the primary platform for FLOWs.  If that presumption is correct, I'm hoping to see the FLOW team do some focused analysis on what is left to cover 

to make sure FLOW is solid when it comes to SharePoint and does everything that Designer did - I digress, but only because I have a certain level of passion around workflows) to happen.  This ends up creating an infinite loop, because actions inside the workflow that write back to the underlying library (changing column values) start up a new instance of the workflow.


Is there a workaround to stop this infinite loop? 


I don't think there the event I'm correct in my would be great (super useful) to have the choice to be able to configure a global setting for the workflow...something like this:


Check this box to only allow one instance of this workflow to run at a time (if this workflow is running and is triggered again, the subsequent workflow will be terminated). 


Check this box to allow multiple instances of this workflow to run at the same time (if this workflow is running and is triggered to run again, the trigger will be successful and a 2nd instance of this workflow will begin.  There is no limit to the number of workflow instances that can run simultaneously).  


Thank you for your hard work FLOW team. You have a useful, feature rich product.  Hoping to see it become a little tighter within SharePoint and with global settings.  




Community Support
Community Support

Hi WillyD44,


Have you tried the trigger “When a file is created(properties only)”? Will it meet your needs? Using this trigger, your flow will be only triggered when a file is created but not updated.

When using the trigger “When a file is created or modified(Properties)”, to stop the flow to be triggered when the file or any other properties are modified, you may add a Condition to check if the Created time is equal to Modified time.

If they are equal, it means that the file is newly created, if they are not equal, it means that there are some modifications on the file.

After the Condition, you could add other action under If yes/If no branch according to your needs.

Please take the following screenshot for a reference:



Please have a try with it and feel free reply if you need more help.


Best regards,
Mabel Mao

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

Thank you for your help, but my issue is a little different.  Well after the file is created and person A modifies the file properites, then 4 minutes later person B modifies the properties...I want the workflow to NOT run because there is already an instance of it running.  


Ideally this would be a global setting as there could be times where I would want multiple instances of the same FLOW running concurrently.  But in my use case above, I do not. 






Hi WillyD44,


Thanks for clarification.


My understanding is that you just want the flow triggers for one modification but not every time a modification happens.

I am afraid that it might be not possible, the trigger “When a file is created or modified” will trigger the flow whenever a new file is created or a modification happens.

You may consider submitting your request at Flow Ideas Forum, hope PGs will take it into consideration in future releases:


Best regards,
Mabel Mao

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

Hi WillyD44,


i've hit the same roadblock. I am reverting back to SP designer and WF2013. I was not able to find a workaround.


There are a ton of scenarios when the item is modified and it is absurd that the whole flow runs tom-to-bottom.


We need single-instance workflows badly. If anyone has managed to find a solution please post it here. 

My workaround was to:

  • create 7 FLOWS (absurd and I won't use it in production).  Each workflow handles the actions I want to happen that are associated with a certain column (Document Status) status.  The reason for 7 FLOWs is that I can associate actions to each document status.  By isolating actions to certain document statuses, I can also terminate workflows that don't apply. 
  • create a copy of all key fields to compare to the original so I know if a change has happened (i.e. Field 1 and CopyField1.  By default both fields have the same value.  If a user modifies my library and changes Field will no longer equal CopyField1. At this point I know a change has occured to the Document Status field as opposed to the user adding a period in a multi-line of text field. 
  • begin each FLOW with 2 conditions (see screenshot after reading the below) 
    • Condition 1:  Does DocumentStatus field equal a certain value.  If no, that means that actions associated with the current field value do not pertain to the actions in this particular workflow.  So..I terminate the process.
    • Condition 2: I look to see if the Document Status field has changed.  If the key field has not changed, I terminate the workflow.  If the key field I am evaluating has changed (DocumentStatus does not equal CopyDocumentStatus) then I allow the workflow to continue because I KNOW that at least one of the changes in my item was a change to Document Status and I now want to run XYZ actions.  



I'm not using this solution in production, because it is too hard to maintain.  7 workiflows with lots of logic...if something breaks or needs to be added, I'd be in trouble.  


Yes, I hope they add a feature to allow concurrent instances of the same workflow or not allow it as a toggle swithch for each workflow. 


Good luck. 


Hi All,


I also need single workflow instant run at a time. In my case I am triggering work flow on item update. Also in the workflow i am updating same list to maintain workflow status, custom log and other fields as per my need but my workflow gets in infinite loop when I am updating current list item in the workflow. 


Earlier we are using SharePoint designer/ Nintex workflow and it works fine for us.


Can you provide a simple action like set field value which will update the list item but not trigger workflow update event?


This is my POC to convert SharePoint designer/Nintex workfow to Microsoft flow. We need to convert thousants of workflow in future if POC gets success.


Appriciate your help to provide workaround for this senario.

Responsive Resident
Responsive Resident

here are multiple ways to stop the infinite loop in Power Automate, Kindly read the below articles for a better idea,

Power Apps Form and Flag Column: 

CSOM Update: 

Multiple Lines of Text as Flag Column: 


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,492)