cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sam_new_zealand
New Member

Http request format of body

I'm adding dynamic content to the body of an http request.

The body is json formatted.

When I add the data manually it works fine. However when I add dynamic content it get's a malformed error.

The problem seems to be a number that I'm retrieving from a sharepoint list. In the return output it appears as a green number (no quotation marks).

 

Code:

sam_new_zealand_3-1661569662826.png

 

Output:

 

sam_new_zealand_1-1661569523685.png

 

Can anyone help?

I've tried writing the above json to a string using Set Variable - this worked. But I'd really like to understand why the green number format is not working.

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User
Super User

Hey @sam_new_zealand 

 

Can you please perform the test below

 

  • Try to add a compose
  • Add the tg_user_id to te compose action.
  • Then pass in the output of the compose action to the request body

 

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!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

View solution in original post

4 REPLIES 4
CFernandes
Super User
Super User

Hey @sam_new_zealand 

 

Can you please perform the test below

 

  • Try to add a compose
  • Add the tg_user_id to te compose action.
  • Then pass in the output of the compose action to the request body

 

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!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

sam_new_zealand
New Member

Hi,

Thanks for the suggestion. Unfortunately, it didn't change the nature of the json - same problem:

 

sam_new_zealand_0-1661581911442.png

 

@sam_new_zealand - Is this an anonymous API? If yes, I can try.

sam_new_zealand
New Member

Sorry CFernandes, it requires credentials. As I said, I got it working, but only by writing the json directly with static data. As soon as I used dynamic data it fails.

I DID get it to work using Set Variable as this explicitly allows you to specify the output as string. But this seems very convoluted.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,573)