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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Renaming folder with "...
Power Automate
Unanswered

Renaming folder with "Send an HTTP Request to SharePoint" fails when there's a single quote character (%27)

(0) ShareShare
ReportReport
Posted on by 17

I'm using this guide: https://www.sharepointwidgets.com/2020/07/rename-folder-using-microsoft-flow.html

 

When the folder name i'm trying to rename has a single quote in it, it fails. I've tried adding a encodeUriComponent() to the variable resulting in the underlined string below, but it still fails. 

 

Error:

<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code><m:message xml:lang="en-US">The expression "web/GetFolderByServerRelativeUrl('Shared Documents/General/TEST/Carlo's Test/FolderTemplate')/ListItemAllFields" is not valid.</m:message></m:error>
clientRequestId: 47034f39-9c02-4071-b076-03eb5956e9e9
serviceRequestId: fab5caa0-c0c2-3000-f88f-aa1419c79fe5

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @carlom_iptech ,

     

    Please try this

    vxiaochenmsft_0-1690510436372.png

    vxiaochenmsft_1-1690510451735.png

    {
    "Title": "C'D",
    "FileLeafRef": "C'D"
    }

    vxiaochenmsft_2-1690510477082.png

    vxiaochenmsft_3-1690510485365.png

     

    Best Regards,

    Wearsky

  • carlom_iptech Profile Picture
    17 on at

    Issue is when the original folder’s name has a single quote.

  • carlom_iptech Profile Picture
    17 on at

    Issue is when the original folder’s name has a single quote.

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @carlom_iptech ,

     

    You can use double single quote to solve it.

    If your folder name is <Test1'Test2>, please try to use Test1''Test2 in the request url.

     

    Best Regards,

    Wearsky

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Months ago I remember trying to set up an HTTP request that could accommodate a SPList name with single quote. I was going to have the SPList name in a variable and then put it into the HTTP request.

     

    I wanted it to be an example other people could use no matter what the name of this list was set to.

     

    I tried and tried for hours to come up with a way to get it to work. I never could.

     

    I know that doesn't help, but my end conclusion was, "They shouldn't put those special characters in a list name". I would be thinking the same thing about folder names.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 241 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 179

#3
Haque Profile Picture

Haque 159

Last 30 days Overall leaderboard