This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Multiagente MCP",
"nodes": [
{
"parameters": {
"promptType": "define",
"text": "={{ $json.text }}",
"options": {
"systemMessage": "# Descripcion General:\nEres un asistente personal, tu tarea es llamar a la herramienta adecuada en funci\u00f3n de la consulta del usuario.\n\n\n# Herramientas:\n\"MCP Gmail\": usa esta herramienta para enviar, responder, eliminar, y obtener correos.\n\"MCP Calendario\": usa esta herramienta para crear, eliminar, obtener y actualizar eventos en el calendario.\n\"MCP Contactos\": usa esta herramienta para obtener, a\u00f1adir, actualizar y eliminar un contacto.\n\n# Reglas:\nSi el usuario pide enviar un correo y no especifica la direcci\u00f3n del destinatario pero s\u00ed que te da un nombre, tienes que usar primero la herramienta \"MCP Contactos\" para obtener la direcci\u00f3n de correo del contacto especificado y despu\u00e9s usar la herramienta \"MCP Gmail\" para enviar el correo. Si no existe el contacto, solicita al usuario la direcci\u00f3n de correo para a\u00f1adirlo.\n\n## Ejemplo 1:\n\nEntrada: Env\u00eda un email a josema@gmail.com con el asunto \"Reunion\" y el contenido \"Est\u00e1s disponible ma\u00f1ana a las 10 ?\"\n\nAcci\u00f3n: Usa la herramienta \"MCP Gmail\" para enviar el email a josema@gmail.com.\n\nSalida: Se ha enviado el correo a josema@gmail.com con el asunto \"Reunion\" y el contenido \"Est\u00e1s disponible ma\u00f1ana a las 10 ?\"\n\n\n## Ejemplo 2:\n\nEntrada: Agenda una reuni\u00f3n con josema@gmail.com con el t\u00edtulo \"Reuni\u00f3n\" y la descripci\u00f3n \"Reuni\u00f3n de Ventas\"\n\nAcci\u00f3n: Usa la herramienta \"MCP Calendario\" para crear un evento con josema@gmail.com.\n\nSalida: Se ha agendado una reuni\u00f3n con josema@gmail.com.\n\n\n## Ejemplo 3:\n\nEntrada: A\u00f1ade el contacto Josema con el correo josema@gmail.com\n\nAcci\u00f3n: Usa la herramienta \"MCP Contactos\" para a\u00f1adir informaci\u00f3n que te de el usuario\n\nSalida: Se ha a\u00f1adido la informaci\u00f3n correctamente.\n\n\n\n\n# Recordatorios\n- La fecha y hora actual es: **{{ $now }}**. \n- Nunca te inventes informaci\u00f3n, solo selecciona la herramienta adecuada para realizar la acci\u00f3n."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
0,
-100
],
"id": "b34b9e8f-f4ef-4067-9215-cbaf465579fd",
"name": "AI Agent"
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
-40,
140
],
"id": "79565456-cfec-4c6d-9705-a784ae0484e1",
"name": "Simple Memory"
},
{
"parameters": {
"sseEndpoint": "https://primary-production-13209.up.railway.app/mcp/27dd4208-4407-4413-a270-1302d812e60e/sse"
},
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"typeVersion": 1,
"position": [
140,
240
],
"id": "ed2aa5a8-1cb6-4da7-9f9b-8753bf67da09",
"name": "MCP Gmail"
},
{
"parameters": {
"sseEndpoint": "https://primary-production-13209.up.railway.app/mcp/336d6b12-6aaf-4ebc-bd5b-c682313cd94f/sse"
},
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"typeVersion": 1,
"position": [
300,
240
],
"id": "d5f4ae07-915b-49dd-a548-6b86f3e6b9bd",
"name": "MCP Calendario"
},
{
"parameters": {
"sseEndpoint": "https://primary-production-13209.up.railway.app/mcp/33322373-5080-4e97-b468-f0f40f6686d9/sse"
},
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"typeVersion": 1,
"position": [
440,
240
],
"id": "207342ba-610c-4175-8d5a-68a84aa8b215",
"name": "MCP Contactos"
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.1,
"position": [
-1140,
-100
],
"id": "dd145a32-db8a-47eb-a80a-411229465ce6",
"name": "Telegram Trigger",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.message.voice.file_id }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"id": "0ef7181d-c151-4d40-a341-b0002fc82518"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Voice"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "16af8e01-a416-45b8-8358-30e9243ca95f",
"leftValue": "={{ $json.message.text }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "Text"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
-920,
-100
],
"id": "b5252a31-b573-48cf-a9ae-8e9e22ed047d",
"name": "Switch"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "9cd54906-fbfa-4578-a57c-e7cc41daae92",
"name": "text",
"value": "={{ $json.message.text }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-480,
0
],
"id": "824f51ea-baf4-478d-8ec7-563896dbb45e",
"name": "Edit Fields"
},
{
"parameters": {
"resource": "file",
"fileId": "={{ $json.message.voice.file_id }}"
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
-700,
-200
],
"id": "e8bafb65-5a31-4bea-9777-41578c66ac59",
"name": "Descargar Audio",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"resource": "audio",
"operation": "transcribe",
"options": {
"language": "es"
}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-480,
-200
],
"id": "8e194d08-b8d7-4588-9a85-ad286d655c0a",
"name": "Transcribir",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "={{ $json.output }}",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
500,
-100
],
"id": "97258778-aad1-44a8-bb75-e7db2d7dbdbb",
"name": "Telegram",
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1-mini",
"mode": "list",
"cachedResultName": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-240,
120
],
"id": "6e5f1846-3014-49cf-8149-6c8a7ad88aae",
"name": "OpenAI 4.1 mini",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"MCP Gmail": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"MCP Calendario": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"MCP Contactos": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Descargar Audio",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Descargar Audio": {
"main": [
[
{
"node": "Transcribir",
"type": "main",
"index": 0
}
]
]
},
"Transcribir": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Telegram",
"type": "main",
"index": 0
}
]
]
},
"OpenAI 4.1 mini": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "nAWcsFqEIMIvT733",
"timezone": "Europe/Madrid"
},
"versionId": "c45c3f2e-8f9b-406c-8e5e-240bbe17590e",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "l2SLrP1k0gYbnG63",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Multiagente MCP. Uses agent, memoryBufferWindow, mcpClientTool, telegramTrigger. Event-driven trigger; 12 nodes.
Source: https://github.com/DragonJAR/n8n-workflows-esp/blob/5b7d3b288093125a02c8d1034fbf6107b85e4974/workflows/01553-Multiagente_MCP.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
BoomerBobBot.TP. Uses agent, telegramTrigger, telegram, memoryBufferWindow. Event-driven trigger; 95 nodes.
Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon
Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I
Jarvis is a powerful multi-agent productivity assistant built in n8n. It works directly from Telegram and can understand both text messages and voice notes.
Unlock the Power of Language with Personalized AI Learning! MOTION TUTOR is a revolutionary AI-powered language learning platform that adapts to your progress and guides you from basic vocabulary to c