Describe the problem/error/question
I have an AI Agent that calls a sub-workflow tool. The sub-workflow tool calls Jira to search for some ticket and then return a JSON array that contains the tickets matching the search criteria. Output of the sub-workflow tool looks like below when I look at the execution log:
[
{
“id”: “10080”,
“key”: “MAN-17”,
“description”: “XYZ”,
“status”: “To Do”,
“summary”: “XYZ”
},
{
“id”: “10079”,
“key”: “MAN-16”,
“description”: “XYZ”,
“status”: “To Do”,
“summary”: “XYZ”
},
{
“id”: “10004”,
“key”: “MAN-5”,
“description”: “XYZ”,
“status”: “To Do”,
“summary”: “XYZ”
}
].
However, when I look at the AI Agent output from the execution log, the Agent doesn’t seem to see the response from the tool and is showing empty . My AI Agent’s prompt is below:
<system_instruction>
Role
You are a Direct Data Relay. Your only task is to fetch data from Jira and display it.
Tool Specifications
- Jira-Child:
- input: { “parent_filter”: “string”, “child_filter”: “string” }
Logic Flow
- Step 1: Use the process name from the user to call the Jira-Child tool.
- Step 2: Provide the raw output of that tool directly to the user. Do not summarize. Do not edit. Do not iterate. Just show the JSON.
Constraints
- Literalism: If the tool returns an empty array
[], show[]. - Mandatory Input: You MUST pass “Step1” as the
child_filterwhen calling the tool.
</system_instruction>
Any suggestion why my Agent is not able to see the child workflow tool’s response?
What is the error message (if any)?
No error message when executing the AI agent or tool. Just the AI agent cannot see the response from the tool, even though the execution log shows the tool output contains the right response.
Please share your workflow
Sub-workflow tool:
{
"nodes": [
{
"parameters": {
"operation": "getAll",
"returnAll": true,
"options": {
"fields": "key",
"jql": "=project=MAN and summary ~ \"{{ $json.parent_filter }}\""
}
},
"type": "n8n-nodes-base.jira",
"typeVersion": 1,
"position": [
-64,
0
],
"id": "3cafc94e-b0d8-4258-802b-12b84a55c5fc",
"name": "Get many issues",
"credentials": {
"jiraSoftwareCloudApi": {
"id": "i8pqNIwkDVp2hKlo",
"name": "Jira SW Cloud account"
}
}
},
{
"parameters": {
"operation": "getAll",
"returnAll": true,
"options": {
"fields": "key,description,status,summary,customfield_10038,customfield_10039,customfield_10041,customfield_10042,customfield_10043",
"jql": "=project=MAN and parent={{ $json.key }} and labels={{ $('When Executed by Another Workflow').first().json.child_filter }}"
}
},
"type": "n8n-nodes-base.jira",
"typeVersion": 1,
"position": [
160,
0
],
"id": "bb8c38ed-eb8c-4353-b351-28f0a0e58f4c",
"name": "Get many issues1",
"credentials": {
"jiraSoftwareCloudApi": {
"id": "i8pqNIwkDVp2hKlo",
"name": "Jira SW Cloud account"
}
}
},
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "child_filter"
},
{
"name": "parent_filter"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-288,
0
],
"id": "744480e1-1093-48de-8cdc-22ac0906faf3",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"jsCode": "return items.map(item => {\n // Jira Simplified Output puts fields at the top level\n const data = item.json;\n const key = data.key;\n\n return {\n json: {\n id: data.id,\n key: key,\n description: data.fields.description,\n status: data.fields.status.name,\n summary: data.fields.summary,\n recipient_email: data.fields.customfield_10038,\n chase_frequency: data.fields.customfield_10039,\n archive_folder: data.fields.customfield_10041,\n deadline: data.fields.customfield_10042,\n last_chase_date: data.fields.customfield_10043\n }\n };\n});"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
368,
0
],
"id": "bd32dd8f-e755-4388-85a3-b9db4516d52a",
"name": "Code in JavaScript"
}
],
"connections": {
"Get many issues": {
"main": [
[
{
"node": "Get many issues1",
"type": "main",
"index": 0
}
]
]
},
"Get many issues1": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Get many issues",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[]
]
}
},
"pinData": {},
"meta": {
"instanceId": "e7c260f21e76c6e244587a9b9f44f139839ab96524b5135ec8e14b5aa3e1c353"
}
}
AI Agent workflow:
{
“nodes”: [
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“typeVersion”: 1.4,
“position”: [
0,
-64
],
“id”: “52217fa7-18ef-432f-9fea-60dcdbadd9a4”,
“name”: “When chat message received”,
“webhookId”: “75124893-f413-4bab-a99c-7e407c9aa0cd”
},
{
“parameters”: {
“options”: {
“systemMessage”: “=<system_instruction>\n## Role\nYou are a Direct Data Relay. Your only task is to fetch data from Jira and display it.\n\n## Tool Specifications\n1. Jira-Child: \n - input: { “parent_filter”: “string”, “child_filter”: “string” }\n\n## Logic Flow\n1. Step 1: Use the process name from the user to call the Jira-Child tool.\n2. Step 2: Provide the raw output of that tool directly to the user. Do not summarize. Do not edit. Do not iterate. Just show the JSON.\n\n## Constraints\n- Literalism: If the tool returns an empty array [], show [].\n- Mandatory Input: You MUST pass “Step1” as the child_filter when calling the tool.\n</system_instruction>”,
“maxIterations”: 20
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3,
“position”: [
224,
-160
],
“id”: “1db08876-48c8-46dd-a058-df2fd12b157b”,
“name”: “AI Agent1”
},
{
“parameters”: {
“description”: “Use this tool to search and filter Jira issues specifically for process automation. You MUST provide two parameters: parent_filter and child_filter.\n\nparent_filter: Use the name of the process (e.g., “Q4 Process”, “Q2 Process”).\nchild_filter: Use the specific step’s label (e.g., “Step1”).\n\nOutput: Returns a JSON array of issues matching both criteria. Each object contains: id, key, description, status, summary, recipient_email, chase_frequency, archive_folder, deadline, and last_chase_date.”,
“workflowId”: {
“__rl”: true,
“value”: “4XJ3uhFcsqtjBwXO”,
“mode”: “list”,
“cachedResultUrl”: “/workflow/4XJ3uhFcsqtjBwXO”,
“cachedResultName”: “Jira-Child”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {
“child_filter”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘child_filter’, REQUIRED. The specific Jira task to target. For the initial email request process, this MUST be set to 'Step1' to ensure only the starting tasks are retrieved., ‘string’) }}”,
“parent_filter”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘parent_filter’, REQUIRED. The summary of the high-level process to be searched (e.g., 'Q4 Process'). This should be extracted from the user's natural language input., ‘string’) }}”
},
“matchingColumns”: ,
“schema”: [
{
“id”: “child_filter”,
“displayName”: “child_filter”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“canBeUsedToMatch”: true,
“type”: “string”,
“removed”: false
},
{
“id”: “parent_filter”,
“displayName”: “parent_filter”,
“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”: [
368,
64
],
“id”: “b8cc2764-af6a-4d32-b399-debe4e69a5d1”,
“name”: “Call 'Jira-Child’2”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4.1-mini”,
“mode”: “list”,
“cachedResultName”: “gpt-4.1-mini”
},
“builtInTools”: {},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.3,
“position”: [
240,
64
],
“id”: “ad066aaa-8c2c-4272-9112-accd644a8493”,
“name”: “OpenAI Chat Model1”,
“credentials”: {
“openAiApi”: {
“id”: “ba1e4J34e4KiHhh0”,
“name”: “OpenAi account”
}
}
}
],
“connections”: {
“When chat message received”: {
“main”: [
[
{
“node”: “AI Agent1”,
“type”: “main”,
“index”: 0
}
]
]
},
“Call 'Jira-Child’2”: {
“ai_tool”: [
[
{
“node”: “AI Agent1”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“OpenAI Chat Model1”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent1”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateId”: “ready-to-run-ai-workflow-v4”,
“templateCredsSetupCompleted”: true,
“instanceId”: “e7c260f21e76c6e244587a9b9f44f139839ab96524b5135ec8e14b5aa3e1c353”
}
}
I run the AI Agent by type in ‘start “Q4 Process”’ in the chat window
Share the output returned by the last node
AI Agent node returns:
[
{
“output”: “”
}
]
Information on your n8n setup
- n8n version: latest, I am testing directly on the cloud version of n8n
- Database (default: SQLite): not applicable
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: