web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Rename a folder in Sha...
Power Automate
Unanswered

Rename a folder in SharePoint

(0) ShareShare
ReportReport
Posted on by 1,088

Hi I've found some solutions to rename a file in SharePoint using HTTP request... (still ridiculous that Microsoft hasn't included this as a basic function)

 

I'm trying to do this with a folder and I can't get it working, hoping someone knows what I am doing wrong.

 

SharePoint:

Annotation 2019-06-04 152008.png

Flow:

Annotation 2019-06-04 152025.png

 

I'm not getting an error it runs through just fine, but it doesn't actually rename anything.

 

I've also tried adding /folders at end of the uri and then it complains.  So tried /folders('Bob') and it works and goes through but doesn't actually rename anything.

 

Thanks,

Terry

Categories:
I have the same question (0)
  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi @Mattw112IG ,

     

    The SharePoint Send HTTP request action allows you to construct and execute SharePoint Rest API queries. This action is particularly useful in the cases when the existing SharePoint actions do not suffice the need or just that the action you are looking is not available yet in SharePoint.

     

    I have made the following test for your reference to rename the folder using action Send an HTTP request to SharePoint.

     

    Please take a try with it on your side.

    1.PNG

     

    Best regards,

    Mabel

     

  • Kcalexander71 Profile Picture
    8 on at

    I have tried what you posted and am getting 502 Bad Gateway.  Any suggestions?

     

    Capture.PNG

  • jslsmithyx Profile Picture
    97 on at

    Hi @Kcalexander71 , 

     

    Just wondering whether you managed to solve this? I'm attempting exactly the same & am receiving the attached error. I've also attached my Flow config. Any help would be appreciated - about to start banging my head against the keyboard 🙂 

     

    Thanks! 

     

    Joe 

     

     

  • Kcalexander71 Profile Picture
    8 on at

    Hi Joe,

     

    No, I was not able to get it working. Ended up going another direction. Hopefully Flow will be updated soon with more functionality.

     

    Good Luck,

     

    Ken

  • jslsmithyx Profile Picture
    97 on at

    Hi Ken, Thanks for the reply - I managed to get it working in the end. I'd copied some of the code from a website & the apostrophe's were the wrong format! 

     

    Cheers again 

     

    Joe 

  • NJ74 Profile Picture
    7 on at

    @jslsmithyx , can you share how you fixed it, please?  I'm having the exact same issue and would love to know what you did to make it work!  Thanks in advance!

  • jslsmithyx Profile Picture
    97 on at

    @NJ74 , try manually typing the code sequence out completely rather than any copying & pasting from external sources. I believe my issue was down to copy & paste reformatting some of the characters / punctuation (apostrophes in particular) & worked once I manually retyped everything.

     

    I'm also pretty sure I ditched this solution after a couple of weeks as its not a very stable or clean way of doing things. Hopefully MS will make this functionality more readily available in future. 

     

    Good luck & let me know if you need more help. 

  • DanielGAJohnson Profile Picture
    93 on at

    Did anybody here get an "expression not valid" error when trying this? What does that mean? Is it "web/GetFolderByServerRelativeUrl" that is not valid? Or the folder path? I've was trying to work off this example (https://sharepains.com/2020/11/03/rename-sharepoint-folder-power-automate/) but I'm getting the same error message when I set it up that way. I've seen some examples where the folder path after web/GetFolderByServerRelativeUrl started with a "/" and others that didn't. 

  • DanielGAJohnson Profile Picture
    93 on at

    I figured it out! It was a bad character! I was adding a delimiter character in one of my steps in order to be able to parse something out, and the character was a '#'. I replaced that with a text string that isn't likely to come up organically and the error went away, and the flow worked!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard