Loading...

How to rename files in SharePoint with Power Automate

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

Power Automate flow to rename a file

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

  2. We then Get file properties (not needed as we already have the ID from the For selected file trigger, but if you run this after another action you will need the file properties to get the ID so that you can rename the right file).

  3. 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 ListItemEntityTypeFullName property, which we will need for the next step.

  4. 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
    • 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 ListItemEntityTypeFullName property 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 more
Luise Freese: Consultant & MVP
Luise Freese: Consultant & MVP

Recent content on Luise Freese: Consultant & MVP

Share post:

Related posts

How to Identify and Update Power Automate HTTP Request Trigger Flows Before November 2025

Few weeks back, while working on one of our Power Automate flows, we noticed a banner warning on the HTTP Request trigger step. Microsoft has ...

2 days ago

Power Automate – HTTP and Teams webhook trigger flows are moving to new URLs

As of August 2025, Power Automate flows and Agent flows (Copilot Studio) with HTTP triggers or Teams Webhook triggers that have logic.azure.co...

3 days ago

How to Automate Document Signing with DocuSign in Power Automate

Introduction In an earlier Inogic post, “Streamlining E-Signatures in Multi-Step Forms with Power Pages and DocuSign Integration”, Our previou...

6 days ago

Power Automate Retry and Error Handling Patterns for Reliable Power Pages Integrations

When Power Pages integrates with Power Automate, reliability becomes key. Portal users expect instant responses — whether submitting a form, u...

8 days ago

Handling Large Files in Power Automate

Power Automate can handle large files, but how large? SharePoint Online supports files up to 250 GB, which sounds generous until you try movin...

8 days ago

UTCNow and that little hidden feature in Power Automate

If you have been following my posts on SharePains.com, then you will know about the UTCNow function generating the current UTC time. But did y...

9 days ago

Understanding Binary and Base64 in Power Automate

If you work with Power Automate and deal with files, you’ve encountered issues saving them. If you see things like “String/bytes i...

15 days ago

How to Auto-Fill Third-Party Web Forms Using Power Automate Desktop and JavaScript

In today’s digital workflows, teams across HR, operations, finance, and support deal with repetitive manual tasks every day. One of the most c...

16 days ago

How to Design Custom Approval Buttons in Outlook Email Using Power Automate (Step-by-Step Guide)

Microsoft’s standard approval emails make it easy to send and capture user feedback directly through Outlook. However, one major limitation is...

18 days ago

We need to talk about... Power Automate... Licensing

Next in my blog, I am going to cover a topic that has come up several times in recent conversations with clients.....Microsoft Licensing! part...

20 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy