HTTP Post JSON Object

Hi Folks,

a question: How can i send a JSON via HTTP Post ?

"patient": {
  "dob": "1970-01-01",
  "firstName": "General"
}

I like to send it without JSON/RAW Parameter.

Any idea ?

Regards,
Stefan

You can do this:

2 Likes

Thanks, Jan !! I have made it like you sample.

2 Likes

I’ve had issues by the escaping of " and had to use raw instead. Is raw the only way if you have nested json and can I include values from previous steps there as well?

Sometimes it’s possible to use one type of quotation marks (e.g. ") outside and another type (e.g. ’ ) inside. Like '{ “nodes”: [ { “parameters”: { “requestMethod”: “POST”, “url” [...]'
Not sure if this works here, just an idea.

In the expression editor you usually have access to all existing nodes in your workflow so you should be able to select other values there. I let the workflow run one time so it shows more options (at least that’s what I think) to choose from.
HTH

I think so. I’ve never managed to use the selectors for a nested .json either.

Not sure if understand the problem. Here are how you can access deep level data from a previous node and return it as a string. For the lowest level I gave two examples. But the same is possible for all levels:

Hope that helps. If not, please try to give another example that I maybe understand better. Thanks!

Thank you, helped me a lot

1 Like

Hi, similar to what some of the earlier members may have mentioned - I am having trouble using the JSON/RAW approach when wanting to reference the output of earlier nodes. I get caught in a loop of it not recognising any valid JSON. The flow works fine if I write directly into the body parameters, though whenever I try to reference a previous step I get the error

“ERROR: The data in “Body Parameters” is no valid JSON. Set Body Content Type to “RAW/Custom” for XML or other types of payloads”

When I then go to add headers as per mentioned here I can’t get it to work either. Was there a solution on how to reference previous nodes when using JSON/RAW?

Hey @LBAdam, welcome to the community!

I am sorry to hear you’re having trouble. Any chance you can post your HTTP Request node workflow in a separate thread for a closer look?

Thanks so much!