How to rename files in SharePoint with Power Automate
the issue
Although SharePoint and Power Automate are heavily interwoven, there is no “rename file” action in Power Automate - if the file lives in a SharePoint library. Out of the box that is only possible for files living in OneDrive.
I recently saw a cry for help on twitter and decided to share here how my solution looks like.
In order to change a filename, we will need to use SharePoint REST API, which is accessible to us in Power Automate via the Send an HTTP request to SharePoint action.
the Power Automate flow

-
To make things easy, we start with a For selected file trigger. (In a real-world scenario, you’d typically rename a file after something else has happened.)
-
We then Get file properties (not needed as we already have the
IDfrom the For selected file trigger, but if you run this after another action you will need the file properties to get theIDso that you can rename the right file). -
We now need to use the Send an HTTP request to SharePoint action:
- Site Adress: choose from Dropdown
- Method:
Get - Uri:
_api/lists/getbytitle('<DisplayName of your Library goes here>')
This will re turn the
ListItemEntityTypeFullNameproperty, which we will need for the next step. -
As a last step, use another Send an HTTP request to SharePoint action:
- Site Adress: choose from Dropdown
- Method:
Post - Uri:
_api/lists/GetByTitle('<DisplayName of your Library goes here>')/Items(@{outputs('Get_file_properties')?['body/ID']}) - Headers:
- Content-type:
application/json - IF-MATCH:
* - X-HTTP-METHOD:
PATCH
- Content-type:
- Body:
{'__metadata':
{'type':'@{outputs('Send_an_HTTP_request_to_SharePoint_to_get_type')?['body']?['d']?['ListItemEntityTypeFullName']}'},
'FileLeafRef':'<your new filename goes here>'}
For the type, we are selecting the
ListItemEntityTypeFullNameproperty from the output of the previous action. You could also use Parse JSON action to obtain that value.
Conclusion
Once again, the Send an HTTP request to SharePoint action in Power Automate is a lifesaver for everything that doesn’t work with the built-in actions. Also, no additional license than your Microsoft 365 license is required to use it.
Resources
To learn more about SharePoint REST, use these resources:
Feedback & what’s next?
I’d love to know what are your renaming-scenarios and also what you use the Send an HTTP request to SharePoint action for! Let me know on twitter. If you found this blog post useful, please also subscribe to my newsletter - news coming about every 2 months, I promise to not spam you!
Published on:
Learn moreRelated posts
New Designer Run After Settings in Power Automate
I will start this post with a warning about the New Designer Run After settings. The steps described in this post do not make it easier to und...
Power Automate: range function
The 'range' function in Power Automate creates arrays of consecutive integers. Use it to replace counter variables and skip the count-vs-end t...
Power Automate: Teams - When I'm @mentioned
The Power Automate "When I'm @mentioned" Teams trigger fires for chat and channel mentions in near real time. Webhook based, fires on replies,...
Power Automate – Debug flows using variable default values
We are announcing the ability to debug flows using variable default values in Power Automate. This feature will reach general availability on ...
Power Automate – Export object-centric process mining data to Microsoft Fabric semantic model
We are announcing the ability to export object-centric process mining data to the Microsoft Fabric semantic model in Power Automate. This feat...
Power Automate – Create and visualize custom KPIs in the process intelligence experience
We are announcing the ability to create and visualize custom KPIs in the process intelligence experience in Power Automate. This feature will ...
Microsoft Power Automate – Support for normalized schema import for data ingestion
We are announcing the ability to ingest data in a normalized data structure format for process mining in Power Automate. This feature will rea...
Microsoft Power Automate – Build better forms with integrated Power Apps
We are announcing the ability to build better forms with integrated Power Apps in Power Automate. This feature will reach public preview on Ma...
Power Automate – Restore accidentally deleted flows
We are announcing the ability to restore accidentally deleted flows in Power Automate. This feature will reach public preview on June 1, 2026....