HTTP node with multiple nodes + Invalid expression under ‘JSON’

Describe the problem/error/question

I have 2 input nodes, one that runs an LLM change and outputs some text, and another for a python code execution that outputs a string.
Both the input nodes connect to an HTTP node which is doing a POST call to an endpoint.
As seen in the image below, the nodes are all connected properly.
Here is the JSON defined body content;
“tldr”: “{{ $(‘Basic LLM Chain - TLDR’).item.json.text }}”,
“published_at”: “{{ $(‘Code-Story publish time’).item.json[“published_at”] }}”

What is the error message (if any)?

Error #1: When I execute the workflow from scratch, it only completes the python code since its quicker and attempts to execute the HTTP node before the LLM has a chance to execute.
Note I will be adding multiple LLM nodes into the HTTP request in the future.

Error #2: If I execute the 2 input nodes individually and then run the HTTP node, even though the JSON defined body content above shows up as green in the expression, I get an error:

ERROR: Invalid expression under ‘JSON’
The expression uses data in the node ‘Basic LLM Chain - TLDR’ but there is no path back to it. Please check this node is connected to it (there can be other nodes in between).

Please share your workflow


Share the output returned by the last node

Is there a way to modify the output of the LLM JSON key instead of text have it as tldr?

Information on your n8n setup

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

If you add a merge node before the http request it will wait for both and you can make sure that both items are related to each other.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.