# Power Automate: Rename a File in SharePoint (No Rename Action)

> For the full documentation index, see https://250highstreet.com/llms.txt

> The SharePoint connector has no Rename file action. Use Send an HTTP request to SharePoint to set FileLeafRef. Steps, body, and common errors.

Power Automate has no "Rename file" action for SharePoint libraries. The fix is one "Send an HTTP request to SharePoint" step that sets the FileLeafRef field to the new name, including the file extension.

## Why is there no Rename file action for SharePoint?

The SharePoint connector reference on Microsoft Learn lists no Rename file action. Its "Update file properties" action "updates the properties stored in columns", and the file name is not one of those columns, so it cannot rename the file either.

SharePoint stores a file name in a field called FileLeafRef. If you write a new value to that field, SharePoint renames the file.

## How do you rename a file with an HTTP request?

1.  Start a new cloud flow at make.powerautomate.com. Choose a trigger such as "For a selected file" or "When a file is created (properties only)".
2.  Add the SharePoint action "Send an HTTP request to SharePoint".
3.  In Site Address, pick the site that holds the library.
4.  Set Method to POST.
5.  Set Uri to \_api/web/lists/getbytitle('Documents')/items(ID)/validateUpdateListItem. Replace Documents with your library name. Replace ID with the item ID from the trigger.
6.  Add the header Content-Type with the value application/json;odata=verbose.
7.  In Body, send: {"formValues":\[{"FieldName":"FileLeafRef","FieldValue":"NewName.docx"}\]}
8.  Save, then try it on a single throwaway file and confirm the new name shows in the library.

## Do you include the file extension in the new name?

Yes. FileLeafRef holds the full file name. If you send "Budget" and not "Budget.xlsx", the file loses its extension and Windows no longer knows which app opens it.

To keep the old extension, build the new name with an expression. For example, use [concat](/guides/power-automate-concat-join-text-together/) to join your new text with the extension. Take the extension from the old name with [substring](/guides/power-automate-substring-extract-text/) and [indexOf](/guides/power-automate-indexof-find-position-in-text/).

## Does a rename move the file to another folder?

No. The file stays in its current folder. If you also want to change the folder, the [move file guide](/guides/power-automate-move-file-sharepoint/) covers the Move file action.

For more on the HTTP action itself, see the guide to [Send an HTTP request to SharePoint](/guides/power-automate-send-http-request-to-sharepoint/).

## Why does the rename fail?

These are the usual causes:

1.  The new name already exists in that folder. Add a timestamp or ID to make each name unique.
2.  The name has a character SharePoint blocks, such as \* : \< \> ? / or \|.
3.  Someone has the file open. See [file is locked for shared use](/guides/power-automate-file-is-locked-for-shared-use/).
4.  The library name or item ID in the Uri is wrong. Check both against the trigger output.

## Want help with a file-naming flow?

I am Al Davies at 250 High Street LLC. Naming rules are a common ask from small teams: one pattern, applied to every upload, with no one fixing names by hand. I build those SharePoint and Power Automate flows remotely. A tracker is \$5,000 and takes 2 weeks. The first call is free, and my [portfolio](/portfolio/) shows past work.

## FAQ

### Can Update file properties rename a file?

No. That action edits column values, and the file name is not one of the properties it changes.

### Does renaming a file break links to it?

Links that use the old file name can break. Links created with the Share button usually keep working, because they point to the file ID.

### Can I rename many files in one flow?

Yes. Use Get files (properties only), then an Apply to each loop with the HTTP request inside. Test on three files first.

## Sources

- [SharePoint connector reference (Microsoft Learn)](https://learn.microsoft.com/en-us/connectors/sharepointonline/)
- [How to rename files in SharePoint with Power Automate (PnP Blog)](https://pnp.github.io/blog/post/how-to-rename-files-in-sharepoint-with-power-automate)
- [Rename SharePoint file using REST API in Power Automate (SPGuides)](https://www.spguides.com/rename-sharepoint-file-rest-api-power-automate/)

## Related guides

- [When to use Send an HTTP request to SharePoint](/guides/power-automate-send-http-request-to-sharepoint/)
- [Power Automate: Move a File in SharePoint (Move File Action)](/guides/power-automate-move-file-sharepoint/)
- [Fix "file is locked for shared use" in Power Automate](/guides/power-automate-file-is-locked-for-shared-use/)
- [Power Automate: Join Text With concat()](/guides/power-automate-concat-join-text-together/)
- [Power Automate substring(): Get Part of a Text Value](/guides/power-automate-substring-extract-text/)

Source: https://250highstreet.com/guides/power-automate-rename-file-sharepoint/
