Call n8n Workflow Tool – Payload Not Passed to Target Workflow (Query/Message is Undefined

Hi everyone,

I’m building a modular multi-agent system in n8n. User requests arrive via a Webhook, and should be routed to specialized agent workflows (like a “training plan generator”) using the Call n8n Workflow Tool (with the new AI Agent features).

My Problem

A request comes in through a Webhook (POST, JSON with fields like user_id , message , etc.). The first workflow (Operator Agent) receives and processes this request as expected.

The Operator Agent is not supposed to generate a response itself. Instead, it should decide which agent workflow should process the request, and use the Call n8n Workflow Tool to forward the original payload (message , user_id , etc.) to another workflow (for example, Trainingsplaner or Session_planer ).

The issue:
In the target workflow, the expected data (the query/message and user_id) does not arrive. The payload fields are always undefined .

  • With a regular Chat Trigger workflow, the query is available as expected. But I need the flexibility to route requests via the tool-call.


My Main Question

How can I make sure that when using the Call n8n Workflow Tool, my payload (message ********, user_id , etc.) is actually passed through and accessible as input data in the target workflow?



Am I missing something? Do I need to configure anything special in the target workflow (trigger, mapping, etc.)?
Any advice would be greatly appreciated. Thanks!


Best regards,
Jan

Here is the Workflow Code:
{
“nodes”: [
{
“parameters”: { “options”: {} },
“type”: “n8n-nodes-base.respondToWebhook”,
“typeVersion”: 1.3,
“position”: [420, 860],
“id”: “ca60d371-e246-4600-974e-f905788019a9”,
“name”: “Respond to Webhook”
},
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “demo-webhook-123”,
“responseMode”: “responseNode”,
“options”: { “allowedOrigins”: “" }
},
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 2,
“position”: [-780, 760],
“id”: “a877aa95-da55-4656-a969-ff744e328998”,
“name”: “Webhook1”,
“webhookId”: “demo-webhook-123”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4.1-nano”,
“mode”: “list”,
“cachedResultName”: “gpt-4.1-nano”
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.2,
“position”: [-500, 1120],
“id”: “f588ac1b-c4ce-4705-ae1f-d9ace8fb7204”,
“name”: “OpenAI Chat Model1”,
“credentials”: {
“openAiApi”: { “id”: “openai-demo-credential”, “name”: “demo_user@example.com” }
}
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.body.message}}”,
“options”: {
“systemMessage”: “Du bist Operator-Agent. Analysiere die Nutzereingabe, sende eine kurze Bestätigung zurück, und leite die Aufgabe per Tool-Call an den passenden Agenten.\n\nAblauf:\n1. Prüfe: \n- Geht es um eine einzelne Einheit? → Session \n- Geht es um mehrere Tage / Wochenplan? → Plan \n(Hinweise: „Woche“, „Plan“, mehrere Tage = Plan)\n\n2. Antworte an User (Webhook): \n- Session: „Alles klar! Ich erstelle dir gleich eine Trainingseinheit.“ \n- Plan: „Der Trainingsplan ist in Bearbeitung. Schau auf der Trainingsplan-Seite nach.“\n\n3. Rufe call_n8n_workflow_tool auf: \n- Bei Session: Workflow-Name = "Session_planer" \n- Bei Plan: Workflow-Name = "Trainingsplaner" \nPayload: \n```json\n{\n "user_id": "",\n "user_message": ""\n}\n\nRegeln:\nDu generierst nie Trainingsinhalte.\nDu machst immer genau einen Tool-Call.\nDie User-Antwort ist immer nur die kurze Bestätigungsnachricht.\nFalls unklar → frage den Nutzer erneut was genau er will!\n”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 2,
“position”: [-260, 760],
“id”: “3e1fe887-7f58-4f61-b88e-835c576a4a75”,
“name”: “Operator Agent”
},
{
“parameters”: {
“description”: “=”,
“workflowId”: {
“__rl”: true,
“value”: “workflow-id-trainingsplaner”,
“mode”: “list”,
“cachedResultName”: “Trainingsplaner”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {},
“matchingColumns”: [],
“schema”: [
{ “id”: “Query”, “displayName”: “Query”, “required”: false, “defaultMatch”: false, “display”: true, “canBeUsedToMatch”: true, “type”: “string”, “removed”: false }
],
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
}
},
“type”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“typeVersion”: 2.2,
“position”: [40, 1120],
“id”: “c9f94735-9f71-4c09-add1-eccf734ce6ce”,
“name”: “Trainingsplaner”
},
{
“parameters”: {
“workflowId”: {
“__rl”: true,
“value”: “workflow-id-sessionplaner”,
“mode”: “list”,
“cachedResultName”: “Sessionplaner”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {},
“matchingColumns”: [],
“schema”: [],
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
}
},
“type”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“typeVersion”: 2.2,
“position”: [260, 1120],
“id”: “9c6361d7-2644-40b3-aa00-94352dbcfbea”,
“name”: “Sessionplaner”
}
],
“connections”: {
“Webhook1”: { “main”: [[{ “node”: “Operator Agent”, “type”: “main”, “index”: 0 }]] },
“OpenAI Chat Model1”: { “ai_languageModel”: [[{ “node”: “Operator Agent”, “type”: “ai_languageModel”, “index”: 0 }]] },
“Operator Agent”: { “main”: [[{ “node”: “Respond to Webhook”, “type”: “main”, “index”: 0 }]] },
“Trainingsplaner”: { “ai_tool”: [[{ “node”: “Operator Agent”, “type”: “ai_tool”, “index”: 0 }]] },
“Sessionplaner”: { “ai_tool”: [[{ “node”: “Operator Agent”, “type”: “ai_tool”, “index”: 0 }]] }
},
“pinData”: {
“Webhook1”: [
{
“headers”: {
“host”: “test.n8n.cloud”,
“user-agent”: “Mozilla/5.0”,
“content-length”: “866”,
“accept”: "
/*”,
“content-type”: “application/json”
},
“params”: {},
“query”: {},
“body”: {
“user_id”: “user_12345”,
“session_id”: “session_98765”,
“message”: “erstelle einen Trainingsplan basierend auf folgenden Informationen …”,
“language”: “en”
},
“webhookUrl”: “https://test.n8n.cloud/webhook/demo-webhook-123”,
“executionMode”: “production”
}
]
},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “anonymized-instance-id”
}
}