cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

An action to move a file if a trigger fails

Hi

 

I've got a failr simple Flow which moves a file from one SharePoint folder to another when a file is uploaded. Only problem is once every weekend the Flow fails due to connection issues and the files just hang about in the original folders. When subsequent files are added the Flow works and the files are moved over but the files passed over by the connection issue are left.

 

Is there a 'failsafe' action I can add which would check if there are any files in the folder and move them over?

 

Thanks  

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: An action to move a file if a trigger fails

You can do either.  If you want to adapt the one you have you can delete the existing trigger and add a recurrence trigger instead.  Then add a get items action and a Loop action.  Then you can drag your exiting actions inside the loop and adjust any dynamic variables you need to fix.  I would make a copy of the existing Flow and work on the copy rather than the original.



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

View solution in original post

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

Re: An action to move a file if a trigger fails

If you know there is going to be a connection issue during specific times you might want to try changing the Flow over to use a recurrence trigger instead of a file created trigger.  Basically take the logic you have now and put it inside a loop, except for the trigger.  In front of the loop have the Flow triggered on a timed basis by a recurrence trigger.  AFter the trigger have it get all the files in the target folder.  Then execute your loop to process each file.

 

With that logic if an individual Flow run fails to finish copying the file it will be copied the next time the Flow runs.



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

Re: An action to move a file if a trigger fails

Thanks @Pstork1 that's a neat soloution but the connection issue does happen at random times. Is there a single action which will check if there are any files in the folder and move them over on the trigger action? 

Highlighted
Dual Super User III
Dual Super User III

Re: An action to move a file if a trigger fails

No, there is no single action to do that.  There is a single action taht you can use to get a list of the files in the folder, but moving the files would require the same logic you currently have built into your Flow.  As I said, you would need to wrap that logic in a Loop to apply it to a list of files instead of an individual file.



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

Re: An action to move a file if a trigger fails

Understood. So would I need to recreated the Flows as 'Scheduled -from blank' flows or could I add a Scheduled Service to the exsisting Flows to loop?

 

Thanks @Pstork1

Highlighted
Dual Super User III
Dual Super User III

Re: An action to move a file if a trigger fails

You can do either.  If you want to adapt the one you have you can delete the existing trigger and add a recurrence trigger instead.  Then add a get items action and a Loop action.  Then you can drag your exiting actions inside the loop and adjust any dynamic variables you need to fix.  I would make a copy of the existing Flow and work on the copy rather than the original.



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

View solution in original post

Highlighted
Community Support
Community Support

Re: An action to move a file if a trigger fails

Hi @Anonymous ,

 

Have you your problem been solved? If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify! If no, please share more details about your issue now so we would better understand your issue and provide a proper workaround for you.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Anonymous
Not applicable

Re: An action to move a file if a trigger fails

Thanks @Pstork1 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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.

Users online (5,692)