cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
darrenfloyd
Level: Powered On

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
Super User
Super User

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
Super User
Super User

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.
darrenfloyd
Level: Powered On

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? 

Super User
Super User

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.
darrenfloyd
Level: Powered On

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

Super User
Super User

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

Community Support Team
Community Support Team

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

Hi @darrenfloyd ,

 

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.

darrenfloyd
Level: Powered On

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

Thanks @Pstork1 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 78 members 3,623 guests
Please welcome our newest community members: