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 / Allow only 1 instance ...
Power Automate
Unanswered

Allow only 1 instance of a flow to run at the same time

(0) ShareShare
ReportReport
Posted on by 12

Hello all, I would like to know if there is a way to avoid the same flow to run while there is another instance of this same flow already running.

This is because I've noticed that when 2 or more instances of the same flow are running at the same time, the data manipulation that it's performing turns into a "complete mess". This does not happen if I wait for the running flow to complete before starting a new one. 

However, this limitation is very bad because I want to be able to share the flow w/ other people and they will eventually start it at the same time and the final result would be incorrect.

 

Basically, my flow (manually triggered) extracts some data from SQL DB (Azure), then I use an Excel template file (stored in my OneDrive for Business) w/ a table in order to be populated w/ the data from SQL. For this step, I have to first list all the rows in the table and then I loop through it and delete them all before I add the new rows that are coming from SQL.

After that, I inserted a 1-minute delay before getting the file contents /metadata and then send the excel file by email.

 

See the setup of my flow attached. 

 

I appreciate some help - as I said, what I want is to avoid this flow to be initiated at the same time because if it happens, my excel template file turns into a mess (conflicting/incorrect information is sent by email probably because one instance of the flow is inserting rows at the same time or removing rows at the same time of the other and vice versa)Setup of my flowSetup of my flow

 

 

 

Thanks, Daniel

 

 

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

    Is anyone able to help? No replies until now....  Smiley Frustrated

  • v-xida-msft Profile Picture
    on at

    Hi @DanielAmico,

     

    Microsoft Flow is multi-threaded, there is no way to detect if some other instances are running at the same time in Microsoft Flow currently.

     

    I afraid that there is no way to achieve your needs in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

     

    Best regards,

    Kris

  • Germinal Profile Picture
    7 on at

    Has this been solved?

    I've got the exact same issue.

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    The main situation is unchanged, the same flow can be running at the same time if triggered. Two basic workarounds: 

     

    1. Modify the trigger so that it won't be triggered multiple times in the same timeframe. For example. if the flow is on a schedule to run once every 15 minutes, then it won't run twice at the same time. 

     

    2. Have something like a sharepoint list that tracks if the workflow is running. The first step of the workflow would be to retrieve a given list item and check the status field, for example. If the status empty, then set it to "running", and then proceed. If another flow instance runs at this point, it will see a status of "running" and will then simply exit. Of course, this isn't foolproof, as if the flows run at exactly the same time, they could wind up both reading the status of empty and proceed, though since this update process would happen quickly, the chances of a collision would be greatly reduced. 

  • gulima Profile Picture
    2 on at

    Same problem here... is there a idea link to vote?

  • Verified answer
    Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @DanielAmico

    On your trigger,
    Click the 3 dots,
    Now click settings.
    Enable concurrency, and set it’s value to 1.

    ** Update - I have written a Blog on this concept **

    Power Automate – Limit Runs to Trigger One at a Time – Flow Alt Delete – Josh Cook [Microsoft MVP]

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

  • Community Power Platform Member Profile Picture
    on at

    @Jcook  thanks for this tip as it resolved an issue we were having.

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Awesome @Anonymous glad it had helped you!

     

    @DanielAmico Could you please let us know if this has solved your issue. This would be even more helpful in letting others find this answer. Thanks

    @v-xida-msft

     

     

     

     

  • Nithin_Vanam Profile Picture
    95 on at

    I almost went ahead to implement some sort of locking mechanism to control the flow runs but your suggestion saved me a lot of time and effort. Thank you @Jcook .

  • mboonie Profile Picture
    164 on at

    Hi. Can you help clarify something?

     

    Does Concurrency=1 mean one instance at a time per item, or 1 instance at a time over the whole tenant?

     

    My flow is triggered when a file is added or modified (including properties) in a SharePoint library. I can't figure out (for libraries, anyway) how to leverage Trigger Conditions that rely on a particular value (the column "RunWorkflow"=True is what I usually use) because someone inevitably has the file open and I'm unable to turn that condition OFF, so any subsequent changes to the file re-trigger it.

     

    I just want to prevent the workflow from running AGAIN (in parallel) on the SAME ITEM.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard