cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Saharc
Level: Power Up

Copy File from REST API to SPO library

Hi,

I want to copy old document version from SPO library to arcive library, I found this REST API:

https://site/_vti_history/1024/Documents/Document.docx

When I click this URL the file start to download to my machine

 

So I tried this action of "Copy File":

CopyFile.PNG

But I get "BadGateway" error:

 

BadGetway.PNG

 

How can I copy the file from the REST API?

 

Thanks,

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Copy File from REST API to SPO library

Hi @Saharc,

 

When using the action Copy file, we are asked to specify a file for the field "File to copy" using a valid File Identifier. It is either a dynamic content “File identifier” from the previous trigger/action, or a specific file that you selected from the SharePoint library.

1.PNG

Please take a try with it on your side.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Saharc
Level: Power Up

Re: Copy File from REST API to SPO library

Hi @v-yamao-msft

If I use "/Documents/Document.docx" in "File to copy" it work, but I want to copy file from API: "/_vti_history/1024/Documents/Document.docx" and this doesnt work

Is there a way?

 

Thanks,

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 17 members 4,297 guests
Please welcome our newest community members: