Skip to main content

Notifications

Community site session details

Community site session details

Session Id : e0G5iuZDuUZEJTi7kmXroY
Power Automate - Building Flows
Answered

Power automate run on created or modified running multiple times

Like (0) ShareShare
ReportReport
Posted on 15 Sep 2023 20:32:52 by 73

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? 

  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 16 Sep 2023 at 16:08:27
    Re: Power automate run on created or modified running multiple times

    @wskinnermctc 

     

    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.

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on 15 Sep 2023 at 22:24:02
    Re: Power automate run on created or modified running multiple times

    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 🙃

  • Verified answer
    takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 15 Sep 2023 at 21:39:43
    Re: Power automate run on created or modified running multiple times

    @wskinnermctc 

    Remember that “When an Excel row is created, modified, or deleted workaround” template flow?

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/When-an-Excel-row-is-created-modified-or-deleted-workaround/td-p/2264670

     

    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.

    ExampleCancelRun.png

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on 15 Sep 2023 at 21:14:14
    Re: Power automate run on created or modified running multiple times

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 39

#2
Churchy Profile Picture

Churchy 20

#3
Chriddle Profile Picture

Chriddle 19 Super User 2025 Season 1

Overall leaderboard
Loading started