Hello n8n community!
I’m encountering a persistent error when trying to use the LangChain Tool Workflow node to call a sub-workflow. I initially had memory-related errors, but now I’m getting a “Referenced node doesn’t exist” error. I’d love some guidance from anyone who has successfully implemented this pattern.
The Error
When executing my workflow, I get this error:
json
{
"errorMessage": "Referenced node doesn't exist",
"errorDetails": {},
"n8nDetails": {
"time": "5/21/2025, 5:29:53 PM",
"n8nVersion": "1.90.2 (Cloud)",
"binaryDataMode": "filesystem",
"cause": {
"executionId": "1602",
"workflowId": "pYHGkQINJU42w9HS"
}
}
}
My Setup
I’m trying to build an AI agent with LangChain that uses tools implemented as sub-workflows. Here’s what I’ve tried so far:
- First, I set up a main workflow with a Chat Trigger node and a LangChain Tool Workflow node that calls another workflow.
- Initially, I encountered a “No session ID found” error in the “Simple Memory” node of my sub-workflow, which suggested I needed to pass the session ID to maintain conversation context.
- I then tried passing
{{ $json.sessionId }}
in the workflow inputs of my Tool Workflow node, but got a “Key parameter is empty” error. - Now, the error has changed to “Referenced node doesn’t exist”.
What I’m Trying to Accomplish
I’m building an AI agent workflow where:
- The main workflow receives user input via a Chat Trigger
- It processes the input with LangChain (or Claude/GP
- When specific tasks need to be performed, it calls specialized sub-workflows via the Tool Workflow node
- These sub-workflows need to maintain memory/context between calls