cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bolin-stratus
Level: Powered On

Flow Copies SharePoint File But it Still Running

I have a Flow that copies a SharePoint file from one library to another within the same site. It successfully runs but when viewing the Flow results, it will often show as still running. Since the copy action does not modify the file at all, I don't see how it could create an endless loop but I have heard of that occurring. Any recommendations are appreciated. 

FLOW copy SP file.PNG

 

 

 

20 REPLIES 20
cdblind
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Hi 

did you find a solution to this I am having the same issue. The Flow was working without issue for several weeks then all of a sudden the flow never finishes. When I checked the history there were 15+ flows still running some of them have been running for 3 or 4 days. No files had been copied. My issue differs in that my trigger event is a Time Trigger, not a Change Trigger.

tyson_ETC
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

I am having the exact same issue.

 

It does the same thing when you use Move File as well.

 

If your getting desperate I have found that the Copy File (depreciated) flow block still works.

Anonymous
Not applicable

Re: Flow Copies SharePoint File But it Still Running

I'm Experiencing the same issue in my Flows. The File gets Copied in my case with all the desired Metadata and Content (I can edit the copied file). BUT the Flow doesn't continue and stays "Hanging" on that Step.
I Double Checked all Library Settings, they are 1-to-1 the Same so there shouldn't be an issue there.

 

I Presume the Issue comes from Flow and would like to have this solved as quickly as possible. Is there an Option to escalate it to the Team?

bolin-stratus
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

It sounds like a bug to me, especially since a copy file operation should not satisfy the "modify properties" part of the trigger and therefore, in theory, eliminates the endless loop scenario. 

 

I also notice that you can run the same Flow multiple times and the time to copy will be different for files of similar sizes.

frederikbisback
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Dear,

You need to use Apply to each output of previous step. So foreach changed or update file in sharepoint the Copy will be execute. Because when using the "equal to" - condition, flow will not stop and get into an endless loop. First you need to select your output item and then use the action "File To Copy"

Picture01.png

Thanks for the feedback. 

 

Regards, 

 

Frederik

Anonymous
Not applicable

Re: Flow Copies SharePoint File But it Still Running

I am facing the same problem in the flow history, the history remains on running, despite the fact that both the move and copy actions seem successful. Looking into the flow, the condition action remains on Running. 

bolin-stratus
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running


@frederikbisback wrote:

Dear,

You need to use Apply to each output of previous step. So foreach changed or update file in sharepoint the Copy will be execute. Because when using the "equal to" - condition, flow will not stop and get into an endless loop. First you need to select your output item and then use the action "File To Copy"

Picture01.png

Thanks for the feedback. 

 

Regards, 

 

Frederik

 

Thanks for the response. I am relatively new to Flow so I have a disconnect with your recommendation.FLOW apply to each.PNG Unfortunately, this is what I interpreted your recommendation as and I am at an impasse. Please clarify your solution. Thank you.  


 

frederikbisback
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Better will be to do this.
Because the flow will be triggered every time a file has been create or modified. 
So no Apply to each or Conditional action is needed.

Picture02.png

In the trigger select your sharepoint site and folder where you will monitor changed files or new files.

Then create an action that will create a file on another location on your sharepoint site. 

It this something tha can help you? 

 

Regards, 

 

Frederik 

 

 

bolin-stratus
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Frederik - It seems like we're getting away from the simplicity of the goal which is just to copy a file when a condition is met. While I appreciate both of your examples, you only provide a portion of the solution and I don't see the entire picture. Since I only need to copy a file, it seems counterintuitive to use a create file command.  Can you provide a complete picture of how you would copy a file while eliminating the endless loop scenario? Any feedback is appreciated.

frederikbisback
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Yes Sorry I have used the wrong action.

Here is the correct one.

Picture03.png

Regards, 

 

Frederik

bolin-stratus
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running


@frederikbisback wrote:

Yes Sorry I have used the wrong action.

Here is the correct one.

Picture03.pngRegards, 

 

Frederik - Unfortunately, this is how my Flow is currently configured. It works, but continues to run after successful the copy operation. 🙂


 

frederikbisback
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Can You send me a screenshot of the flow? 

I have tested it with the flow I have create and no loop. This is when I have saved changes to a file in SharePoint or added one. 

Picture03.pngPicture04.png

Regards,

 

Frederik 

frederikbisback
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Can You send me a screenshot of the flow? 

I have tested it with the flow I have create and no loop. This is when I have saved changes to a file in SharePoint or added one. 

Picture04.png

Regards,

 

Frederik 

bolin-stratus
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

The screenshot is in my original post.  Below is the list of the run history.

Flow run history still running.PNG

cdblind
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Hi Frederik

My flow already has an 'Apply to each' step. My flow was working until around 10 days ago, then it stopped copying the files. But the flow showed as still running and would not stop unless I cancelled the flow, there were like 15+ of the same flows running in the history.

 

I changed a 'Create file' flow that had I been using to a 'File copy' so that I could maintain the original file properties. 

 

This seems to be a bug that multiple tenancies are experiencing.

Community Support Team
Community Support Team

Re: Flow Copies SharePoint File But it Still Running

Hi @bolin-stratus,

 

I have made a test on my side and the issue is confirmed on my side,I would post this issue to my product team, if the issue is solved, I will reply here.

 

Best regards,

Alice

twzup
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Thank you all.  I'm having the same problem.

bolin-stratus
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running


@v-yuazh-msft wrote:

Hi @bolin-stratus,

 

I have made a test on my side and the issue is confirmed on my side,I would post this issue to my product team, if the issue is solved, I will reply here.

 

Best regards,

Alice


Thanks Alice!

adicristea
Level: Powered On

Re: Flow Copies SharePoint File But it Still Running

Same issue here, I thought I've done something wrong. I have a flow that needs to copy 4 templates from a location to another once a month, it works fine for the first one, but gets stuck there. This was working fine a month ago (although I only had one template back then).


Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 474 members 5,862 guests
Please welcome our newest community members: