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 / Send an HTTP failed du...
Power Automate
Unanswered

Send an HTTP failed due to character use

(0) ShareShare
ReportReport
Posted on by 76
Hi,
 
The below step uses a variable Combo which combines a file Name and Title
 
The problem is that the Title portion can include characters such as & or / or :.
 
For these cases the flow fails and I get a Bad Gateway. I am concluding that these characters are interfering with the JSON.
 
I am trying to avoid renaming all of the files to eliminate these characters. Is there a way to keep them so that this step works?
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,874 Most Valuable Professional on at
    It might be a small typo which has caused the 502 Bad Gateway. Normally the URI should start with _api/web/lists/getbytitle()
     
    Can you add 'web' to your URI and try the below instead?
    _api/web/lists/getbytitle('Tempfolder')/items(itemid)
    And can you also change the X-HTTP-Method header from PATCH to MERGE as well?

    Below is an example with the MERGE headers and a different URI.

    Combo var with & in the file name.


    HTTP request setup with MERGE header

    Headers
    {
      "Accept": "application/json;odata=verbose",
      "Content-Type": "application/json;odata=verbose",
      "If-Match": "*",
      "X-HTTP-Method": "MERGE"
    }


    Body
    {
    "__metadata": {"type": "SP.Data.TempfolderItem"},
    "FileLeafRef": "@{variables('Combo')}"
    }


     
    Test result

    ​​​​​​​
  • CU29071243-0 Profile Picture
    76 on at
     
    Unfortunately, this did not work.  I tried with both the "web" edition and without:
     
  • Expiscornovus Profile Picture
    33,874 Most Valuable Professional on at
    Did you use single quote or double quote characters in your Body payload? Can you try it with double quotes?
     
    What URI did you use in the Site Address field? It is a site collection address, correct? Not a subsite? Something like:
     
    And have you double checked the SP.Data.TempfolderItem value? Maybe that is wrong. You can check that by retrieving the ListItemEntityTypeFullName property of the list. I have blog post about this check/approach:
     
  • CU29071243-0 Profile Picture
    76 on at
    Specific to those cases where the title is & or / :
     
    When I use double quotes, it fails 
     
    "message""Invalid JSON. A comma character ',' was expected in scope 'Object'. 
    Every two elements in an array and properties of an object must be separated by commas.
     
    When I use single quotes, it fails 
    "message""The file or folder name contains characters that are not permitted.  Please use a different name.,
     
    NOTE: Only the single quotes work when the title does not include & or / :.
     
    Thanks
  • Expiscornovus Profile Picture
    33,874 Most Valuable Professional on at
    Hmm, strange. Can you share the exact data you are using? This way I can try it with your test data in my setup.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 957

#2
Valantis Profile Picture

Valantis 847

#3
Haque Profile Picture

Haque 609

Last 30 days Overall leaderboard