Hola @nguyenthieutoan ,
Hemos estado intentando solucionar el problema en el nodo de chat human-in-the-loop, pero parece que hay un problema en la comunicación entre los nodos.
{
"nodes": [
{
"parameters": {
"availableInChat": true,
"agentIcon": {
"type": "icon",
"value": "brain"
},
"agentName": "Skye",
"options": {
"responseMode": "responseNodes"
}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.4,
"position": [
-3472,
480
],
"id": "b03a6cac-d84f-4e7a-b166-8797ece194e9",
"name": "When chat message received",
"webhookId": "448a433f-b790-488b-b2ef-68ad19d89c96"
},
{
"parameters": {
"message": "={{ $json.output }}",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chat",
"typeVersion": 1.2,
"position": [
-2880,
480
],
"id": "4c5a4e38-a28c-4c09-a78b-4f9cae3fe312",
"name": "Chat3",
"webhookId": "a46aa6d8-b57c-4bd7-9101-378577634cc5"
},
{
"parameters": {
"options": {
"systemMessage": "."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": [
-3200,
480
],
"id": "fd7eadf2-b2dc-4b4f-b453-0188ec0d72a2",
"name": "AI Agent"
},
{
"parameters": {
"model": "n8n-gpt-4.1",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"typeVersion": 1,
"position": [
-3584,
1152
],
"id": "c7064aa7-b13e-4afe-98a6-aee71981c25a",
"name": "Azure OpenAI Chat Model",
"credentials": {
"azureOpenAiApi": {
"id": "Sd2Rr1eXpv8GChqr",
"name": "Azure Open AI account"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.4,
"position": [
-3392,
1136
],
"id": "66b3ce47-c5c2-4dc4-8211-040a3d17a0e8",
"name": "Simple Memory"
},
{
"parameters": {
"message": "=Skye wil een mail uitsturen met de volgende eigenschappen:\n{{ JSON.stringify($tool.parameters, null, 2) }}",
"approvalOptions": {
"values": {
"approvalType": "double"
}
},
"options": {
"limitWaitTime": {
"values": {
"resumeAmount": 10,
"resumeUnit": "minutes"
}
}
}
},
"type": "@n8n/n8n-nodes-langchain.chatHitlTool",
"typeVersion": 1.3,
"position": [
-3536,
704
],
"id": "3b2d8e57-6ee7-40dc-9fe1-65f0e8dfcb46",
"name": "Chat1",
"webhookId": "b1c1ec2f-33a6-4a4b-90fe-131801234aa8"
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "MS7xbrVN9zX5vAWC",
"mode": "list",
"cachedResultUrl": "/workflow/MS7xbrVN9zX5vAWC",
"cachedResultName": "Util — AI - Mail"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"to": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('to', `The email addresses it will be send to, split by ';' character.`, 'string') }}",
"subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('subject', \"Subject of email. If it is related to a Hive case, always start the subject with `[#123]` which is the Hive case number.\", 'string') }}",
"body": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('body', `Content of email in HTML format. Note that this value will be placed within an
<html><body><div></div></body></html> part, so those HTML tags should not be included. Also email signatures are provided and should not be within this content.`, 'string') }}",
"body_markdown": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('body_markdown', `Content of email in Markdown format. Note that the content should be identical as to HTML format but only now in Markdown format.`, 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "to",
"displayName": "to",
"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": "body",
"displayName": "body",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "body_markdown",
"displayName": "body_markdown",
"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": [
-3648,
832
],
"id": "46b90ed9-6d7b-4386-8670-9644c8094ce2",
"name": "Call 'AI - Mail'1"
}
],
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Chat3",
"type": "main",
"index": 0
}
]
]
},
"Azure OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Chat1": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Call 'AI - Mail'1": {
"ai_tool": [
[
{
"node": "Chat1",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {
"When chat message received": [
{
"sessionId": "b4b17dc477714a9d84cc9afe7586e881",
"action": "sendMessage",
"chatInput": ".",
"files": []
}
]
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "518261c4a70f7b056a90d1ccc637553f99a6f84990fec2cd318a8ea62bbc25be"
}
}
Seguimos recibiendo el error
Solicitud incorrecta - por favor verifica tus parámetros
400 Parámetro requerido faltante: ‘tools[0].type’.
Intentamos agregar el nodo desde cero (para ver si hay un problema de compatibilidad de versiones de nodos) e hicimos todas las configuraciones de nuevo desde cero. No sé cuál podría ser el problema. ¿Quizás tengas alguna idea sobre cómo se podría solucionar esto?