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 / 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
    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
    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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard