web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copying file from one ...
Power Automate
Suggested Answer

Copying file from one library to another but checking if that file first exists in the new library

(1) ShareShare
ReportReport
Posted on by 4
 

Hello,

So i'm trying to create a flow that will copy a file from document library to another. The Flow will copy that file over into that new document library as either Word, or PDF format depending on how the user chooses. They make the choice by clicking a checkbox in the Sharepoint column and the flow will run upon them checking the file back in. The Flow also brings in all the data from the columns across the library. We have a unique ID column in place so that all files are unique and therefor the new library can't have the file in both a PDF and Word document at the same time. Thing is, i would like it so that if someone chooses to run the flow and generate the file in the new library, that it would replace the previous file whether it be a PDF file replacing the Word, or the Word replacing the PDF. To do this, i feel i need to check the new library for the existing unique ID, and delete the file if it exists. Here is what i have so far but it is erroring out when i try and Get Files (Properties Only 2) saying. "The API 'sharepointonline' returned an invalid response for workflow operation 'Get_files_(properties_only)_2' of type 'OpenApiConnection'. Error details: 'The API operation 'GetFileItems' is missing required property 'body/value/0/Document_x0020_Title'.'"

Can anyone let me know what that is?

r/MicrosoftFlow - Copying a file from one document library to another, but checking if that file first exists in the new library in another format, and if it does, delete it and create the new one.
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Firstly thank you for the great picture truly (no sarcasm intended at all) but hehe, can you for my old self (even if its just me) use a carriage return hehe. So sorry as I get older my brain melts lol reading the TV ;-)
     
    As for your issue, this is almost 100% because the Title column in the other side is marked as required but is blank. Can you verify for me, if you have any blank Title Columns over there?
     
    If you dont plan on using it mark is as optional, as its defaulted to required, or you made it that way.
     
    If this helps please mark as such and maybe a like!! :-)
     
     
  • CU06061603-0 Profile Picture
    4 on at
    @Michael E. Gernaey unfortunately that does not seem to be the issue. I went ahead and made sure every file in the library had a title, theres only 3 items in there, and still getting the issue. I tried moving the flow around a bit to see if it would help, but it did not. now i'm just getting "The API 'sharepointonline' returned an invalid response for workflow operation 'Get_files_(properties_only)' of type 'OpenApiConnection'. Error details: 'The API operation 'GetFileItems' is missing required property 'body/value/0/DocumentID'.'" as an error even when all the items in both libraries have documentid

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard