cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Community Champion
Community Champion

When a file is created - how long until it wears off?

I have been having a problem.  It has taken forever to sort it out.  I was finding extra Flow actions taking place "after the fact".  It turns out, when I turn on a flow that has a Sharepoint "When a file is created" trigger, if I have copied a file to a location earlier, it uses that as a trigger, even though the drop into the library occurred prior to my turning on the flow.  How long do I need to wait to turn on a flow, after a library document has been created, so the flow does NOT trigger when I turn it on?

5 REPLIES 5
Dev_Nikhil
Advocate III
Advocate III

Hi @martinav,

 

can you provide more specific Information about the process so we can provide you any solution.

 

See below scenario if it matches your Process.

 

Scenario:

Step 1: When an Item is Created (Trigger) 

Step 2: Further actions of the microsoft flow.

Note: if you talking about this than the Problem is 

1. turn off the Flow.

2. Than we create some files or Items in the List/Library.

3. Once you start the Flow it'll start the Process of all created files simontaniously.

 

Hope you'll find your solution.

 

Thanks 

Dev_Nikhil

martinav
Community Champion
Community Champion

Hello @Dev_Nikhil, and thank you for your reply.

 

This is the scenario.

 

I have two flows.  Each one knows how to handle a different type of file.  This is part of a data migration.

 

Flow 1:  Triggers "when a file is created"

Flow 2: Triggers "when a file is created"

 

Step 1:  Flow 1 - ON, Flow 2 - OFF

Step 2:  Drop files of type 1 into gallary. - wait for flows to complete.

Step 3:  Flow 1 - OFF, Flow 2 - ON

 

With no further action, Flow 2 executes on the same files dropped in Step 2.  How long do I need to wait to turn on Flow 2, so it does not trigger?

 

Or, are you telling me that the flow "remembers" what is new, and when I turn the flow on, it processes everything anyway?

Hi @martinav

 

As per my Observation when we Start any Flow or when we first time Save the Flow it'll automatically runs if it finds the trigger correctly.

 

flow in backgrounds always checks for the process or the Trigger progress. As per the plans microsoft flow's check runs conduct continuesly.

 

Thanks 

Dev_Nikhil

martinav
Community Champion
Community Champion

@Dev_Nikhil

 

It has been my assumption, that the flow will execute if "on" when the trigger occurrs.  It appears that even when "off", when turning on a different flow AFTER a trigger has occurred, it will trigger.  So, perhaps the deeper question is...  Does the flow trigger occur from time/date stamps, compared to its "on" date time.  Or, does the flow trigger only if it is "on" when a trigger occurs.

 

With my observation, the trigger occuring PRIOR to turning "on" a flow, will execute even if it was "off" when the trigger actually occurred.  I was assuming there was a timeframe after the trigger that I needed to wait to turn the flow "on".

 

What is strange, I have been testing these flows now for over a week.  I have dropped several thousand files into the library in my tests.  Yes, this is a very elaborate migration, pulling data in from several sources.  I would have noticed if this was happening with that many files.  I just started noticing the extra flow runs happening starting yesterday. 

martinav
Community Champion
Community Champion

@Dev_Nikhil,

 

It appears my worst fears are true.  I waited almost an hour.  I turned one of my flows "on", and it triggered on files added while it was "off".  This is a tremendous problem for me.  This has the possibility of destroying data totally inadvertenlty.  I have to completely think through my entire migration scheme, after thinking I was finised after over a WEEK of work!

 

Is there a setting somewhere to have the flow ONLY trigger when they occur, when the flow is "ON"?  This is the only thing that will save about 60 hours of effort!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,635)