I was running a training class yesterday and tthe class hit this issue. Here is how to repro:
Firstly, I used the SharePoint copy file action with the following config:
Trigger: "When a file is created or modified (properties only)"
Source doclib: "/Sarahs QAP docs"
Destination doclib: "/QAP Docs Published"
The copy action currently looks as follows: As you can see I pull the file name from the trigger and note that I have removed the leading slash from the destination File Path. Also note that right now I have hard-coded the destination file name to test.docx.
So now I ensure that in the destination library that test.docx does not exist.
As you can see the library is emtpy. So I edit the properties of a document in the source library to trigger the flow, and it works ok...
Now watch what happens when I do it again..... I edit the properties on the same soiurce file to trigger a second flow run...
The error can be seen in the message above, but it is subtle... Of course, we know the document does exist because the first iteration placed it there. Taking a closer look, I see the web service call causing the fault...
I paste this web service call into a browser and confirm the same error that the file in the above path does not exist.
But take a look at the URL in the message above... see the extra slash? I confirmed this by decoding the URL. You can see an extra encoded slash still there...
If I remove this slash and hit the URL manually I get a positve result... eg:
Essentially until this issue is fixed, the copy file action for SharePoint is broken...
Worked on a similar MS Flow.
Work perfectly except if target has a document with the same name. i.e. if document already exists at target.
MS flow has an Overwrite Flag - presumably to allow for replacing existing documents (at the target).
This however doesn't work. MS Flow fails consistently whenever document exists at the target.
I confirm that this is not fixed yet.
This is very annoying, since the only other reliable way is to use Get File Contents followed by Create File.
But this means 2xFileSize data transfers each time. Combined with 50MB limit, this is not a solution!
First let's confirm the file path (Web Address) of the document library using the library settings.
As you can see, it is possible to have a different Quick Launch link and Library name than the actual Library path (Web Address). I've seen site owners have similar issues and it's usually the incorrect document library path, file name or syntax. The file name is required with this action; having the path alone will also return a similar failure summary.
Looking at your flow, I see that in the Source File Path of the Sharepoint Copy file action you are adding '.docx' after the 'Name' dynamic content. Remove the 'docx' and 'Name dynamic content. If you want to include the file extension, use the 'File name with extension' dynamic content. i.e /Sarahs QAP docs/'File name with extension'
Secondly, the Destination Soure path should have similar dynamic content as the source file path. Try using /QAP Docs Published/'File name with extension'
This is assuming both paths are the same as the Web Address listed in the document library settings. An example of an presumed path is below:
Here's a successful overview of my example Publication Process flow:
Details on changed action properties to make a successful flow:
Hope this helps.
Using "When file is created or modified in a folder" event trigger after duplicating the file solved the problem
Features releasing from October 2020 through March 2021
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!