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 / HTTP Post keeps adding...
Power Automate
Answered

HTTP Post keeps adding a \ where a "

(0) ShareShare
ReportReport
Posted on by 32

I've spent all evening searching for the answer on this one... please help.

 

I add this into a compose action:

[{"Group":2512276,"TimeSlot":"0"},{"Group":2517214,"TimeSlot":1"},{"Group":2513377,"TimeSlot":"3"}]

When the flow is ran, the body section of my HTTP post action, where the compose is inserted shows:

{
 "Name": "AA - 12220573_637004232000000000CG",
 "CustomerRef": 45345,
 "SiteID": 2243,
 "Access": "[{\"Group\":2512276,\"TimeSlot\":\"0\"},{\"Group\":2517214,\"TimeSlot\":1\"},{\"Group\":2513377,\"TimeSlot\":\"3\"}]"
}

 

See the screenshot below. How do I stop Flow from adding the \ to my post body?

 

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @MrRK 

     

    Looks like your output of compose is fine. It is not adding the '/' character. How do you mapping the body of http? I can see there are other elements in the body such as Name, CustomerRef, SiteID. Could you please show a screenshot of this?

     

    Thanks

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @MrRK 

     

    For some reason that compose action is getting the input as string and that string is later being serialised in the HTTP action. I tried this by manually creating an array and typing the values in and it worked just fine.ww2.PNG

     

    ww3.PNG

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

     

    Hi @MrRK ,

     

    I think the advice provided by yashag2255 is correct. You could use the variable of the corresponding type to store the property value, such as an object or array variable. Please take a try.

     

    Best Regards,

  • MrRK Profile Picture
    32 on at

    You are correct, when the data is manually entered into a compose action, and then added to the HTTP Post, it works fine.

     

    However, try initialising a variable, and setting the same values inside of a string. Then bring that into a http post in the same way, and it gets incorrectly formatted. I've tried everything to stop it happening and nothing works!

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @MrRK 

     

    You got it there-> "However, try initialising a variable, and setting the same values inside of a string. Then bring that into a http post in the same way, and it gets incorrectly formatted.The moment you add it as a string it will read it as one and add those extra characters to send a serialized body to the API call. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • MrRK Profile Picture
    32 on at

    Awesome...

     

    Ideally I'm trying to append to the Variable (String) based on various actions, and so Compose won't work for me.

     

    What is the correct way?

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @MrRK 

     

    You can go the variable way too. All you have to do is to intialize an array variable and keep appending the objects in that using the append to array variable action. 

     

    Hope thsi Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 481

#2
11manish Profile Picture

11manish 278

#3
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

Last 30 days Overall leaderboard