Renaming SharePoint Folder using Microsoft Flows

Introduction:

Using MS Flows, On any trigger, you can add the below action to rename the SharePoint folder.

 

Steps:

1) In Actions, select “Send an HTTP request to SharePoint”

2) Enter the below details:

Site Address: Select your site address from the list.

Method: POST

Uri:_api/web/GetFolderByServerRelativeUrl(‘LibraryTitle/CurrentFolderName’)//ListItemAllFields

Headers:

Accept

application/json;odata=verbose

X-HTTP-Method

MERGE

If-Match

*

Body: {

Title :”New Name of Folder”

FileLeafRef’:”New Name of Folder”

}

3) The Folder Name in Uri and new folder names in body can be dynamic as per your requirement( Refer Screenshot below: the data here is taken directly from the trigger when file is created in SharePoint).

Sample Output:

Conclusion:

Simple SharePoint Connector in MS Flows can help to rename a SharePoint Folder.


Share Story :