cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Power Automate :: Triggers not fire when a SharePoint file is moved

Hello 

Everyone here says that it isn't possible trigger a flow in Power Automate when a file is moved from a SharePoint Online folder to another one in the same document library using the "When a file is created (properties only)" or "When a file is created or modified (properties only)" triggers.

 

Triggers with the issue

Triggers bugged.png

 

 

 

During my tests I've discovered that when I move a file from Folder A to Folder B the flow trigger fires! The problem is that it's "ignored".

 

EXAMPLE

Trigger.png

 

 

Test.pdf in the root folder before the movement of the file

Doc libr.png

 

 

Drag&Drop to move the file into Test folder

Drag.png

After that the flow "starts": it's visible in the run history of the flow using the view "Check (no new data)".

 

Skipped list.png

 

 

 

The flow "Skipped"skipped.png

 

 

It's weird and it doesn't make sense.

It's considered as "no new data", but I've moved the file from a folder to another one so its path changed and "Path" is a property, right?

 

Can't you just fire the trigger without making it skip?

If no, why? I'd like to know the "Logic reason".

 

Can you help me with this issue?

7 REPLIES 7
Highlighted
Dual Super User III
Dual Super User III

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

If I'm reading this right then I think what you are trying to do is have a second embedded trigger fire in the flow after the file is moved to be able to access the file in the new location.  If so, that won't work because you normally can't use two triggers in the same flow.  Triggers are specifically designed to be the first thing in a flow.  There are a few rare cases where you can use them later, but 99% of the time if you try to use a trigger later in the flow it won't work.  In this case it also isn't necessary.  You know the name of the file and where you moved it to.  You can easily retrieve the file from its new location, after a small delay, based on the new path.

 

Or am I missing the point and the trigger you are talking about not firing is in a completely separate flow? 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate I
Advocate I

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

Thanks for your reply @Pstork1!

 

No, I've only one flow and in my case I need the "When a file is created or modified (properties only)" trigger.

In the first post I simply wrote that I encountered the problem in both triggers.

 

This is my case:

If a user moves a file from the root folder to a subfolder (Example: Moving "Test.pdf" from {Root} to {Root}/Test) my flow will have to start.

Today the flow with "When a file is created or modified (properties only)" trigger just skip.

I'm not looking for scheduled flow solutions to check file's movements.

 

I hope I have explained the problem better.

Highlighted
Dual Super User III
Dual Super User III

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

Ok, I understand the problem.  The issue in this case is that the file is being moved within that particular document library.  So it isn't being created, nor is it really being modified.  The only thing that is being modified is the path.  That isn't one of the properties that this trigger uses to determine modification.  The only trigger that might work in this scenario is the When a file is created in a folder.  But for that one you are going to have to specify the folder and I suspect you want this to fire wherever the file is moved. So that trigger probably isn't practical.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate I
Advocate I

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

Exactly, I need to monitor an entire Document Library! Due to this I can't use the two triggers that listen to a specific folder...


However I repeat that within the document's movement fires the trigger. Unfortunately that fire is skipped!

I wonder why...

I'd like to ask directly to the technical staff of Power Automate if it's possible to develop a new trigger or to modify the two mentioned above by adding a new parameter to them (The new parameter could ask to me "Listen to files movements".

 

@Pstork1 I really don't understand: don't you think that the document's field "LeafPath", which changes when a user moves the file, is a sharepoint document property like "ID", "Title", and so on?

Highlighted
Dual Super User III
Dual Super User III

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

I'm not on the Power Automate development team so I can't provide any guidance there.  Yes, the file path is a property, but its a system property that you can't change.  Unlike a property like title, etc. So its not in the same class as other properties.  Is the file being moved shortly after being uploaded or modified?  That might also account for why the trigger is skipped.  There is a throttle that only fires the trigger once within a period of time.  It does that to keep changes being made by a flow from firing the trigger again when a modification is made by the flow and creating an endless loop.  Its a relatively short timespan, but might account for your experience.

 

Can you post a screenshot or explain what you mean when you say the trigger fired, but was skipped?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Advocate I
Advocate I

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

I completely agree with your opinion about the System Field, but logically it's a Field like others...

With your suggestion I tried to move a file uploaded yesterday it returned the same result "Trigger skipped".

 

HOW TO SEE SKIPPED FLOWS

Under you find how to see the flow skipped:

1. Go on Flow Details and click on "All runs":

1.png

 

2. Change the view, in the corner Top-Right, with "Checks (no new data)". 

 

2.png

 

3. Click on your skipped flow, you can understand what's the right flow using the (runtime "ago"). 

3.png

 

4. This is the "skipped" flow:

4.png

 

REPRODUCE THE CASE

To generate a skipped flow with a file movement you have to:

  1. Configure a flow with the trigger "When a file is created or modified (properties only)" that listen to a Document Library.
  2. Go on the Document Library's root, create a subfolder
  3. Go on the Document Library's root, upload/create file
  4. Check the runs on your flow and seve the number of "Succeed runs" and "Checks (no new data)"
  5. Wait 5 minutes, check again the two views of the runs (to see the evident skipped flow) 
  6. Move (with drag/drop or with the sharepoint function "Move") the file to the subfolder
  7. Check again on the runs... If you've done all in this order (without other actions) you'll find

2 x SUCCEED FLOWS (1 subfolder created + 1 file uploaded/created)

1 x SKIPPED FLOW (1 file moved) => THIS IS THE WEIRD FLOW

 

Feel free to ask me back if something isn't clear or if you can't reproduce my issue.

Thanks a lot for your help!

Highlighted
Dual Super User III
Dual Super User III

Re: Power Automate :: Triggers not fire when a SharePoint file is moved

OK, you taught me something new.  I'd never seen the trigger skipped list before.  But I still think the issue is that when moving a file within a document library you aren't changing anything but the file path and that isn't being considered a change by the trigger.  You may not agree with Microsoft deciding that the file path doesn't constitute a change, but that appears to be the issue and I don't see that changing.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (5,677)