I have a power automate flow that runs when items are created or changed in a sharepoint document library. There is a trigger condition so it won't get stuck in a loop. This is an approval flow and there is about a minute lag time before the flow runs. If I make 2 changes within this time I end up with 2 approval flows running before the field from the trigger condition is updated to stop new flows from running. Is there a way ensure that it only runs once?
I mean I started a few years ago by writing some hack-ish expressions to try capitalizing the 1st letter of names & ensuring lowercase on all other letters before I watched a lot more Jon Levesque, Reza Dorrani, & Paul Murana videos and developed more of my own templates for practice.
See! @iwannabfishn told you some wizard would come along lol! It's like I manifested him!
@takolota I really did think up this same solution about delays, and started typing about it, but I stopped. I was thinking that it was possible for the second flow to get through.
But I didn't consider modified datetime, I was thinking to recheck whatever that condition that is stopping the trigger. Like I thought some property "InProcess" or something was getting populated by the first flow to be the trigger condition for anything behind. I didn't trust it getting populated in time.
(Also I don't know why I envisioned all of this was dealing with a MS Word document approval. Type of file was never mentioned.)
That's why you're the wizard! I'll go back to answering questions about datetime format where I belong 🙃
Remember that “When an Excel row is created, modified, or deleted workaround” template flow?
I think the 1st segment of the flow does just what is asked here. The flow includes a Delay as the 1st action which has the flow wait a set number of minutes, then it uses a Get file properties on the trigger file’s Id, then it has a condition check if the modified date from the updated pull is greater than the modified date of the initial trigger instance. If yes, then it uses the Terminate action to cancel the flow run as the next one is the most recent edit that should run with the rest of the flow.
Should work as intended here as long as you don’t mind a few minutes delay between the last edit & the rest of the flow / approval runs.
Does this happen often?
I don't have a solution, but it seems like it would be better to come up with a different process.
Like I'm thinking about people who set up flows that trigger on an email inbox when mail is received. It might take a few minutes for the flow to trigger after the email arrives. However, they need the flow to trigger immediately or it will be a problem with the overall process.
The only solution is to change the process of how they plan to do work. The plan should not require immediate email notice to function properly since that is not a capability they have.
You want this flow to trigger on some kind of specific file change using the broad trigger of whenever a file is changed. However, you're going to continue changing the file. You do have some kind of method for blocking future flows, but it doesn't happen fast enough.
You are limited by the speed of when a flow can trigger. That is not going to change.
The process you want to implement needs to change due to system limitations.
Like instead of using the active file to trigger the flow, could you use like a drop folder or something that uses a second copy file? So maybe when you drop a file in the folder it triggers an approval flow. Either the flow runs off that document or whatever. Or you could maybe hyperlink the approval back to the active document?
I really don't know how to change it, but I think a change to the process would be better.
Bc I can't think of a way to prevent Action2 from happening when it is conditional on a result from Action1; when Action1 has not even been initiated.
Who knows, maybe some power automate wizard will come step on me with some fancy tricks and solution.
stampcoin
39
Churchy
20
Chriddle
19
Super User 2025 Season 1