HTTP node erro can any one help i using json permeter

{{
{
“query”: $json.body.query,
“max_results”: $json.body.max_results || 5,
“web_search”: true
}
}}

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

{{

{
“query”: $json.body.query,
“max_results”: $json.body.max_results || 5,
“web_search”: true
}
}}

  • stem:

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating sy

achamm:

I think the issue here is that your json body query is inside another node. lets try to simplify it first:

{

“query”: “$json.body.query”,

“max_results”: $json.body.max_results || 5

}

this should be working fine. if not, then maybe you can share more code or context about how this json body query is being used in your workflow?

I don’t think the issue is that the query is “inside another node” — it’s more likely an expression vs JSON evaluation problem.

In n8n, $json.body.query and || 5 are only evaluated inside expressions. If this field is in plain JSON mode, they’ll never run, even if the syntax looks right. Wrapping the object in {{ }} also only works if the entire parameter is set to Expression mode and returns an object.

Before suggesting a fix, a couple of things matter a lot here:

  1. Which node and which parameter is this JSON being used in?
    (For example: HTTP Request → Body → JSON/RAW, OpenAI tool input, etc.)

  2. Is that parameter currently in “Expression” mode or “JSON” mode?
    Some fields evaluate expressions per-value, others only if the whole field is an expression.

  3. Are you trying to build this object inline, or are you open to constructing it in a Set / Code node first and passing it downstream?

Depending on the answers, the solution is usually either:

  • set the whole field to an expression that returns an object, or

  • build the object in a Set/Code node and reference the resulting fields normally.

If you can share the node name, parameter name, and a screenshot of that field (expression vs JSON) or better still share your workflow it’ll be possible to give you an exact answer instead of guessing.