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
Microsoft Copilot (Microsoft 365): Generate documents using forms in SharePoint with Power Automate
We are introducing a new Power Automate action that enables automated document generation using document generation (DocGen) forms in SharePoi...
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...
Power Automate – Analyze your processes in the process intelligence experience
We are announcing the ability to analyze your processes in the process intelligence experience in Power Automate. This feature will reach gene...
Power Automate: Planner - Update a task (V2) Action
The 'Update a task (V2)' Planner action upgrades Power Automate with Percent Complete, Bucket Id, and 25 category fields, plus key Preview got...
Power Automate Agent Flows: The Smarter Way Businesses Are Automating Decisions in 2026
If your business is still waiting on manual approvals, forwarded emails, or spreadsheet updates after every meeting, there is a cost to that d...
SharePoint: Power Automate trigger and action for forms in SharePoint
We are introducing new Power Automate integration capabilities for forms in SharePoint, enabling customers to create automated workflows based...
Power Automate: take Function
Learn how to use the "take" function in Power Automate. Grab items from the front of arrays and strings, handle edge cases, and combine with s...
Variables inside Apply To Each steps in Power Automate
For many years I’ve been saying, don’t use variables in Power Automate as it hurts the flow’s performance. Recently it was p...
Power Automate trigger and action for forms in SharePoint (Preview)
Power Automate introduces preview triggers and actions for SharePoint forms, enabling workflow automation on form submissions starting May 202...