When we are working with SharePoint Document Libraries, there are scenarios where folder names need to be updated automatically based on business requirements. for example project folder should be renamed when the project name changes and customer folder should display an updated customer code.

My Document Library

I will rename this folder name through flow.

Screenshot - 2026-06-01T141649.869

Stepwise Implementation

1 - Create flow

2 - Add Send HTTP request to SharePoint action

Screenshot - 2026-06-01T142001.034
Uri: _api/web/GetFolderByServerRelativeUrl('/sites/UserData/TestDocs/Test')/ListItemAllFields
Headers: {
  "Accept": "application/json;odata=verbose",
  "X-HTTP-Method": "MERGE",
  "If-Match": "*",
  "Content-Type": "application/json;odata=verbose"
}

where

Body: {
  "__metadata": {
    "type": "SP.Data.TestDocsItem"
  },
  "FileLeafRef": "New Folder Name2"
}

where

3 - Run the flow

After flow ran successfully, check the folder name in Document Library

Screenshot - 2026-06-01T142742.751

Conclusion

Here, we learned how to rename a folder in a SharePoint Document Library using Power Automate and the Send an HTTP Request to SharePoint action.