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:

In Actions, select "Send an HTTP request to SharePoint"

 

Graphical user interface, application

Description automatically generated

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"

}

 

Graphical user interface, text, application, email

Description automatically generated

 

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).

Graphical user interface, application

Description automatically generated

 

Sample Output:

 

Graphical user interface, text, application, email

Description automatically generated

 

 


Comments

Popular posts from this blog

The supplied reference link is invalid Error in Cloudflows

Set Dynamic Recipients of D365 Email in Power Automate

Retrieve Email Recipients (TO, CC, BCC) in Cloud Flow