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 / Replace special charac...
Power Automate
Answered

Replace special characters of list name to make it compatible to use in Send HTTP Request to SharePoint action

(0) ShareShare
ReportReport
Posted on by 1,123

Hello everyone,

I have a list whose name is "SOX - PO without PR (YPONR) Tasks". I am trying to create a task within this list using Send an HTTP Request to SharePoint action as I have few hyperlinks to populate. I am confused how to specify the name of the list in the body of the action

 __metadata": { "type": "ListNameListItem" } 

I know spaces can be replaced with _x0020_ but not sure of special characters like "-" (hyphen), "(" and ")". How do I encode these here and what should they be replaced with? I couldn't find any documentation regarding this. We don't want to change the list name.

Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,424 Moderator on at

    Take a look at this blog post I did yesterday:

    How to Encode SharePoint Column Display Names to Internal names 

  • Verified answer
    Paulie78 Profile Picture
    8,424 Moderator on at

    This one would also be useful to you:

    https://www.tachytelic.net/2021/03/update-hyperlink-column-sharepoint-power-automate/

     

  • rameshmukka Profile Picture
    1,123 on at

    @Paulie78 

    You did a great job in both the posts. I bookmarked them for future use. I was waiting such content since long time. Your form generated me blow json but it fails somehow. I tested with simple list called "TestList" and it works fine. Here is the screenshots

     

     

    {
    	"__metadata": {
    		"type": "SP.Data.SOX_x0020_-_x0020_PO_x0020_without_x0020_PR_x0020__x0028_YPONR_x0029__x0020_TasksListItem"
    	},
    	"RelatedItems": {
    		"Description": "Microsoft",
    		"Url": "https://www.microsoft.com"
    	}
    }

     

    RameshMukka_0-1624515374103.png

  • Paulie78 Profile Picture
    8,424 Moderator on at

    Please go to the list in your browser and copy and paste the URL here. Then we can figure out what the list name should be.

  • rameshmukka Profile Picture
    1,123 on at

    Here is it 

     

    /sites/rameshtest/Lists/SOX%20%20PO%20without%20PR%20YPONR%20Tasks/AllItems.aspx

     

  • rameshmukka Profile Picture
    1,123 on at

    Hey @Paulie78 

    I just figured it out. I replaced all %20 with _x0020_ and it worked. You blog posts came to great rescue. Thank you so much.

  • Paulie78 Profile Picture
    8,424 Moderator on at

    I think the list name would be:

    SOX_x0020__x0020_PO_x0020_without_x0020_PR_x0020_YPONR_x0020_Tasks

  • Paulie78 Profile Picture
    8,424 Moderator on at

    Well done @RameshMukka 

  • Expiscornovus Profile Picture
    33,937 Most Valuable Professional on at

    Hi @RameshMukka,

     

    Hope you guys don't mind that I bud in.

     

    You can also retrieve the correct value for the type field by retrieving the ListItemEntityTypeFullName value via an additional HTTP request action. Saves you a bit of manual encoding time 😉

     

    Below is an example of such an approach.

     

    1. First collect the ListItemEntityTypeFullName value of your SharePoint List. Replace/set the ListName variable by the name of your current list name.

    getlistentitytypefullname.png

    2. Use the following Body to create a new item. You can use an expression to get to retrieve the correct entitytypefullname.

     

     

     

    {
    	"__metadata": {
     "type": "@{outputs('Send_an_HTTP_request_to_SharePoint')?['body/ListItemEntityTypeFullName']}"
     },
     "Title": "Testing Promoted Links",
     "LinkLocation": {
     "Description": "Microsoft",
     "Url": "https://www.microsoft.com"
     }
    }

     

     

     

     createpromotedlink.png

  • MalekFCH Profile Picture
    7 on at

    Hello Paulie,

     

    this link is just amazing but i'am looking for this specific caracter : '°' and i can't find it 

    do you have any idea about how can i replace it ?

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 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard