additionalScope not passing the payload to the body

Hello, I am trying to pass some dynamic values to my query but the functionality seems to be broken, at first I thought it was because of the complexity of the payload but even setting it to a string doesn't work. Additionally I can see in the console that the value is present in additionalScope property but it does not make it's way to the request body.

Welcome @MichalM :tada:

What does the body definition of treatmentDefinition query look like? Have you defined "id" as {{ id }}?

1 Like

Hey @matth

The body is just set to JSON and I cannot be defined beforehand because it will be dynamically generated based on users input.

Try raw body and content-type application/json.

EDIT: Just to clarify. I use stuff like this quite a bit

//body type raw
  "privateKey": {{ accessKey }},
  "note": {
    "list": {
      "item": {{ itemList }}

Now in additionalScope define accessKey and itemList

1 Like

Thanks @matth defining it in the query worked, although it's highlighted as an error.

Yeah, that's normal. It's a little odd. I'm not sure how retool eng could resolve that. Maybe have additionalScope vars declared somewhere in the query management.