I have created a Cloud flow that uses the standard Sharepoint action to copy an Excel file from one Sharepoint site to another.
The action executes successfully, and the file shows up in the destination Sharepoint site, but none of the traditional outputs (Path, Name, DisplayName, etc) from the action are filled with any data after the copy has been successful. This makes it impossible to determine the name of the resulting file that was copied if, say, the "Copy with New Name" option is set in the action
Is this expected behavior? Is there any know workaround? I currently have one flow that copies the file, and a second flow that watches the destination directory for any new files in order to recognize the new filename, but that seems wildly inefficient. I'd much rather be able to do everything in a single flow.
Screenshot of set up. The file info in the email sent is completely blank.Screenshot of flow set up. The file info in the email sent in the second action is completely blank, even though I chose the outputs directly from Dynamic Content.
Solved! Go to Solution.
The reason I ask is because my Status Code = 200.
From the screenshot you shared the Status Code seems to be 202.
The HyperText Transfer Protocol (HTTP) 202 Accepted response status code indicates that the request has been accepted for processing, but the processing has not been completed; in fact, processing may not have started yet.
Are you sure you are referencing the right fields in your email?
I use copy file all the time, never faced such issue.
I will try to test it with "Copy with New Name" option set and let you know how it goes.
Just tested. It works as expected.
Interesting. I get no outputs at all, even in the raw response.
Is the file getting copied in your destination folder? Or is that failing as well?
Nope, as I said in my original post, the file copies successfully, and appears in the destination folder in the appropriate Sharepoint site/group.
The second flow that is currently watching that folder for new files fires off just fine once the file has been copied.
The reason I ask is because my Status Code = 200.
From the screenshot you shared the Status Code seems to be 202.
The HyperText Transfer Protocol (HTTP) 202 Accepted response status code indicates that the request has been accepted for processing, but the processing has not been completed; in fact, processing may not have started yet.
@SudeepGhatakNZ wrote:From the screenshot you shared the Status Code seems to be 202.
Which I would only expect to see if the Copy's "Asynchronous Pattern" setting was turned on. It was turned off. But on a lark, I turned it on, and now I'm getting the outputs.
This seems backwards. But, it's working, now, thank you. I'll mark your answer as a "solution", since it led me in the right direction.