Describe the problem/error/question
I have a main workflow with an AI Agent node that uses a subworkflow as a tool. I am passing a JWT from the parent workflow to the subworkflow. The JWT is evaluating CORRECTLY when viewing the execution of the parent workflow. When viewing the execution on the subworkflow, that same JWT being passed is malformed/dropping characters/truncating (with ..).
What is the error message (if any)?
401
Please share your workflow
This is the main workflow AI Agent tool node
{
"nodes": [
{
"parameters": {
"description": "Sends an email. Provide recipient_email, sender_email, subject, message_html, accessToken, emailRFCMessageId (original email's RFC Message-ID for threading), and emailThreadId (thread ID) parameters. Returns draft ID and message.",
"workflowId": {
"__rl": true,
"value": "Z4AR7KUHGM7zfDPS",
"mode": "list",
"cachedResultUrl": "/workflow/Z4AR7KUHGM7zfDPS",
"cachedResultName": "Email Send Tool"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"sender_email": "={{ $json.agentEmail }}",
"recipient_email": "={{ $json.emailFrom }}",
"subject": "={{ $fromAI('subject') }}",
"message_html": "={{ $fromAI('message_html') }}",
"accessToken": "={{ $(\"Webhook Trigger\").item.json }}",
"agentEmail": "={{ $json.agentEmail }}",
"emailProvider": "={{ $json.emailProvider }}",
"emailThreadId": "={{ $json.emailThreadId }}",
"bccEmail": "={{ $json.bccEmail }}",
"emailRFCMessageId": "={{ $json.emailRFCMessageId }}",
"outlookMessageId": "={{ $json.body.email.messageId }}"
},
"matchingColumns": [],
"schema": [
{
"id": "accessToken",
"displayName": "accessToken",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "agentEmail",
"displayName": "agentEmail",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "sender_email",
"displayName": "sender_email",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "recipient_email",
"displayName": "recipient_email",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "subject",
"displayName": "subject",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "message_html",
"displayName": "message_html",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "emailRFCMessageId",
"displayName": "emailRFCMessageId",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "emailThreadId",
"displayName": "emailThreadId",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "bccEmail",
"displayName": "bccEmail",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "emailProvider",
"displayName": "emailProvider",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "outlookMessageId",
"displayName": "outlookMessageId",
"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": [
-704,
12096
],
"id": "6e27ca16-3570-47ab-bb5b-e24d9ada5370",
"name": "Call 'Send Email'"
}
],
"connections": {
"Call 'Send Email'": {
"ai_tool": [
[]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "a60e669edf11e952ca807918abec0f36bdc555a18c8aa44a9b6d0ff9610266c0"
}
}
This is the subworkflow start node
{
"nodes": [
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "accessToken"
},
{
"name": "agentEmail"
},
{
"name": "sender_email"
},
{
"name": "recipient_email"
},
{
"name": "subject"
},
{
"name": "message_html"
},
{
"name": "emailRFCMessageId"
},
{
"name": "emailThreadId"
},
{
"name": "bccEmail"
},
{
"name": "emailProvider"
},
{
"name": "outlookMessageId"
}
]
}
},
"id": "26e5056c-05dd-4165-b1a1-d386ced93852",
"typeVersion": 1.1,
"name": "Start",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-96,
9728
]
}
],
"connections": {
"Start": {
"main": [
[]
]
}
},
"pinData": {},
"meta": {
"instanceId": "a60e669edf11e952ca807918abec0f36bdc555a18c8aa44a9b6d0ff9610266c0"
}
}
Share the output returned by the last node
The error output is obviously 401 Invalidated Auth token
Information on your n8n setup
- n8n version: [email protected]
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: MacOS




