
Announcements
Hi, I have a flow which based on a form will update and rename a sharepoint folder.
However when attempting to find the file its unable to find the file.
The file I have checked is named correctly in a subfolder of projects
As you can see by the URL and the file name, it is correct.
I am unsure of where it might be going wrong, any advice would be greatly appreciate.
Hi @NiallOB01,
I see you made a typo in your Accept and Content-Type header values. The Header values should be Odata not Adata.
Here is an example of such type of MERGE headers
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"If-Match": "*",
"X-HTTP-Method": "MERGE"
}
When using verbose MERGE headers also make sure you the correct odata type for the folder in the body of the request.
In my example below that is SP.Data.Project_x0020_FoldersItem. In your setup might be different.
{
"__metadata": {
"type": "SP.Data.Project_x0020_FoldersItem"
},
"Title": "NewFolderName",
"FileLeafRef": "NewFolderName"
}
For both scenario I have blogs with code examples:
https://www.expiscornovus.com/2022/11/15/get-odata-type-folder/
https://www.expiscornovus.com/2022/11/15/rename-a-folder/