I have a flow that needs to take a document from one library and copy it to another. The file name needs to change as well, so I don't believe I can use the "copy file" function. Instead I use the "Get file contents" function followed by the "Create file" function as shown below:
Steps to copy file with new filename.
This works fine for most files. However, if I try it with a MS Word or Excel file, the Flow gets stuck on this step. Weirdly, the file is in fact fully copied over (with the contents and everything) but the Flow stays on this step until it times out with the error below:
The file size is very small (<50kb) so it's not due to that. It almost feels like the flow is not getting the correct response when creating the file and it keeps trying over and over again until it fails.
Thanks in advance for any help anyone can provide.
Just in case anyone runs into this issues in the future, I was able to resolve it:
1. Our administrator thinks the issue may be caused by having the SharePoint linked to a private Teams Channel.
2. I did not use the method I originally outlined (Get File Contents > Create File). Instead I renamed the file first, then used the "Move file" command.
3. Renaming the file is not currently a function provided in Flow, hence why I tried the Get File Contents > Create File thing at first. But you can rename a file if you use the Send an HTTP Request command
Thanks for your reply. I just tried it again with a blank document and the same thing happened. A screenshot is below; it's still hasn't finished running but it'll take another 15 minutes or so to time-out.
Below are links to the text in "File content" for each step. It seems like a lot of data for a blank document.
Get file content - File contents
Create file - File contents
You may want to try to view the File Content that is being passed from the previous step. I did not see this in the original post, but there could possibly be something in the content itself that is blocking the creation of the file.
You could also try your same method with a Word document that has no contents and see if that is accepted.
WarrenBelz
146,594
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional