"Copy or move can't rename or replace an existing item at the specified destination location."
I just built a Flow to copy files from one SharePoint library to another. Problem is that, with the first library I tried to copy, the flow ran perfectly, but with the second one it just throws me the following error:
"status":400,"message":"Copy or move can't rename or replace an existing item at the specified destination location. Please manually rename or delete the existing item before you try again.
Also, I'm not trying to replace or rename any files in the target library, they are all new files.
I assume it's a permission issue, but both libraries are inside the same organization and have the same permission policies. I just can't figure out what's the problem here.
Below, some prints of my flow. A quick overview: the flow is triggered from a power app where the user should include the link of the source library and the destination library. Based on the source library, the flow first gets the Table with the name "Documentos", which is the one I'm trying to copy, and then it runs the get files. Once it's done, it checks the files to see whether they are in the root folder of the library or not, if they are, then they are copied to the destination library (this last condition is to avoid the duplication of files which are inside folders).
EDIT: I've changed the parameter "If another file is already there" of the "Copy file" action to "Fail this action" and it is working fine now. However, I still want to keep this parameter as "Replace" for the cases in which a folder in the destination library needs to update its nested items and folders according to the source library. I guess it is definitely a permission issue, just can't figure out what policies I need to change in the destination library to make it work.