cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ianw1000
Level: Powered On

Issues using Send an HTTP request to SharePoint

Hi!

I am building a Flow to setup a new set of folders in a Document Library and copy template files over to the folders, renaming the templates once they have been copied. I am using the method outlined in this post:

https://powerusers.microsoft.com/t5/Building-Flows/Renaming-a-File-in-SharePoint-Online/td-p/176708

which has been very useful, but I am stuck with a fairly consistent error which I can't work out how to get round.

This is the request:

Send step.png

Id is the ID of the file from the previous copy step. HouseName is a user input item from the start of the Flow.

 

This is the error message:

Error message.png

I have tried putting single quote marks round items('ID') as there are some dashes in the filename, but that doesn't help either!

I suspect that I am making a rookie error (this being my first Flow) but I can't see where it is!

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Issues using Send an HTTP request to SharePoint

Hi @ianw1000 ,

 

Please try to modify Uri, I did a test on my side, I need to remove "/" in front of _api, and then we need to change Id to ItemId.

This method is analogous to update list item, so we need ItemId instead of File Idetifier.

Image reference:

2.PNG

Flow run history:

3.PNG

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Issues using Send an HTTP request to SharePoint

You may want to start by reviewing the Working with folders and files with REST documentation. When working with the API, all of the links you are generating should be easily copy/paste verifiable, so the following link should work if you copy and paste it:URI.png

If it doesn't work when you copy/paste check it at the root of your SharePoint site, then it won't work in Flow and you need to figure out the correct format and path. 

It looks to me at first glance, that your URI has double-encoding, so you may want to verify your file path against proper URL encoding

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: Issues using Send an HTTP request to SharePoint

Hi @ianw1000 ,

 

Please try to modify Uri, I did a test on my side, I need to remove "/" in front of _api, and then we need to change Id to ItemId.

This method is analogous to update list item, so we need ItemId instead of File Idetifier.

Image reference:

2.PNG

Flow run history:

3.PNG

 

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ianw1000
Level: Powered On

Re: Issues using Send an HTTP request to SharePoint

 Thank you!

That resolved it.

There are so many options on these URI calls that getting it all lined up is a bit of a marathon.

ianw1000
Level: Powered On

Re: Issues using Send an HTTP request to SharePoint

Thanks.

I certainly need to understand the URI stuff more, but I am doing fairly basic Flows and have to say I am more than a bit puzzled that Rename File isn't a built-in option!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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!

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: 538 members 4,556 guests
Please welcome our newest community members: