This workflow corresponds to n8n.io template #8209 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger 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 →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "3d75673b-dd38-4c8f-81c5-715bec2a432b",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-160,
0
],
"parameters": {
"public": true,
"options": {
"title": "Welcome to Sofia",
"subtitle": "Start a chat. We're here to help you 24/7.",
"customCss": "\n /* Variables CSS para una paleta de colores limpia y f\u00e1cil de mantener */\n :root {\n --color-background-primary: #F7F5F2; /* Un blanco roto y c\u00e1lido, como papel */\n --color-background-secondary: #FFFFFF; /* Blanco puro para burbujas de mensaje */\n --color-text-primary: #333333; /* Gris oscuro en lugar de negro puro */\n --color-text-secondary: #888888; /* Gris medio para descripciones */\n --color-border: #E8E8E8; /* Gris muy claro para bordes sutiles */\n --color-accent: #B0B7C6; /* Azul gris\u00e1ceo para los mensajes del usuario y el bot\u00f3n */\n --color-accent-disabled: #DCDCDC; /* Gris claro para el bot\u00f3n deshabilitado */\n }\n\n /* Reset b\u00e1sico para el cuerpo del chat */\n body {\n margin: 0 !important;\n padding: 0 !important;\n font-family: 'Helvetica Neue', Arial, sans-serif !important;\n background-color: var(--color-background-primary) !important;\n color: var(--color-text-primary) !important;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Contenedor principal del chat */\n #n8n-chat {\n background-color: var(--color-background-primary) !important;\n color: var(--color-text-primary) !important;\n display: flex !important;\n flex-direction: column !important;\n height: 100vh !important;\n width: 100% !important; /* Asegura que ocupe todo el ancho */\n border-radius: 0 !important; /* Elimina bordes redondeados si la app es fullscreen */\n box-shadow: none !important; /* Elimina cualquier sombra global */\n overflow: hidden !important;\n }\n\n .n8n-chat { /* Clase adicional del main */\n background-color: var(--color-background-primary) !important;\n height: 100% !important;\n width: 100% !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n }\n\n /*\n Cabecera del chat: limpia y con alto contraste\n */\n .chat-header {\n background-color: var(--color-background-secondary) !important;\n padding: 24px !important;\n border-bottom: 1px solid var(--color-border) !important;\n text-align: left !important;\n box-shadow: none !important; /* Asegura que no haya sombras extra */\n }\n\n .chat-header h1 {\n font-size: 1.35rem !important; /* Ligeramente m\u00e1s grande */\n font-weight: 500 !important;\n margin: 0 !important;\n color: var(--color-text-primary) !important;\n }\n\n .chat-header p {\n font-size: 0.9rem !important;\n color: var(--color-text-secondary) !important;\n margin-top: 6px !important;\n line-height: 1.4 !important;\n }\n\n /*\n Cuerpo de los mensajes\n */\n .chat-body {\n flex-grow: 1 !important;\n padding: 24px !important;\n overflow-y: auto !important;\n display: flex !important;\n flex-direction: column !important;\n gap: 12px !important;\n background-color: var(--color-background-primary) !important; /* Fondo del \u00e1rea de mensajes */\n }\n\n .chat-messages-list {\n display: flex !important;\n flex-direction: column !important;\n list-style: none !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n /* Estilo de cada burbuja de mensaje */\n .chat-message {\n max-width: 80% !important;\n margin-bottom: 12px !important; /* Espacio entre mensajes */\n }\n\n .chat-message-from-bot {\n background-color: var(--color-background-secondary) !important;\n color: var(--color-text-primary) !important;\n border-radius: 12px 12px 12px 4px !important; /* Bordes suaves, esquina inferior izquierda menos redondeada */\n padding: 14px 18px !important;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important; /* Sombra muy sutil */\n align-self: flex-start !important;\n }\n\n .chat-message-from-user { /* Necesitar\u00edas una clase para mensajes de usuario si a\u00fan no existe */\n background-color: var(--color-accent) !important;\n color: var(--color-background-secondary) !important;\n border-radius: 12px 12px 4px 12px !important; /* Bordes suaves, esquina inferior derecha menos redondeada */\n padding: 14px 18px !important;\n align-self: flex-end !important; /* Los mensajes del usuario se alinean a la derecha */\n margin-left: auto !important; /* Empuja el mensaje a la derecha */\n }\n\n /* Asegura que el contenido markdown dentro de los mensajes se vea bien */\n .chat-message-markdown p {\n margin: 0 !important;\n line-height: 1.5 !important;\n }\n\n /*\n Pie de p\u00e1gina y barra de entrada de texto\n */\n .chat-footer {\n background-color: var(--color-background-secondary) !important;\n border-top: 1px solid var(--color-border) !important;\n padding: 16px 24px !important; /* Menos padding vertical para una barra m\u00e1s compacta */\n box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.03) !important; /* Sombra superior sutil */\n }\n\n .chat-input {\n display: flex !important;\n align-items: center !important;\n gap: 12px !important;\n }\n\n .chat-input textarea {\n flex-grow: 1 !important;\n border: 1px solid var(--color-border) !important;\n background-color: var(--color-background-primary) !important;\n border-radius: 24px !important; /* Bordes m\u00e1s redondeados para la caja de texto */\n padding: 12px 20px !important;\n font-size: 1rem !important;\n color: var(--color-text-primary) !important;\n resize: none !important;\n transition: border-color 0.2s !important;\n min-height: 48px !important; /* Altura m\u00ednima para la caja de texto */\n box-sizing: border-box !important; /* Asegura que padding no aumente el tama\u00f1o total */\n }\n\n .chat-input textarea:focus {\n border-color: var(--color-accent) !important;\n outline: none !important;\n box-shadow: 0 0 0 2px rgba(176, 183, 198, 0.2) !important; /* Efecto de enfoque suave */\n }\n\n .chat-input-send-button {\n background-color: var(--color-accent) !important;\n color: var(--color-background-secondary) !important;\n width: 44px !important; /* Ligeramente m\u00e1s peque\u00f1o */\n height: 44px !important; /* Ligeramente m\u00e1s peque\u00f1o */\n border-radius: 50% !important;\n border: none !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n cursor: pointer !important;\n transition: background-color 0.2s, transform 0.1s !important;\n }\n\n .chat-input-send-button:hover:not(:disabled) {\n background-color: #9da7bd !important; /* Tono m\u00e1s oscuro al pasar el rat\u00f3n */\n transform: translateY(-1px); /* Peque\u00f1o efecto de elevaci\u00f3n */\n }\n\n .chat-input-send-button:disabled {\n background-color: var(--color-accent-disabled) !important;\n color: #a0a0a0 !important; /* Color m\u00e1s oscuro para el \u00edcono deshabilitado */\n cursor: not-allowed !important;\n box-shadow: none !important;\n }\n",
"getStarted": "Nueva conversaic\u00f3n",
"responseMode": "responseNodes",
"allowedOrigins": "*",
"inputPlaceholder": "Type your question..",
"showWelcomeScreen": true,
"loadPreviousSession": "memory"
},
"initialMessages": "Hi there! \ud83d\udc4b\nMy name is Sofia. How can I assist you today?"
},
"typeVersion": 1.3
},
{
"id": "dafed6bb-63f9-4ac9-a807-1b20a951b035",
"name": "Respond to Chat",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
768,
0
],
"parameters": {
"message": "={{ $json.output }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "5e6d7308-c187-4faf-bfdb-c184bac6de67",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
272,
0
],
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant"
}
},
"typeVersion": 2.2
},
{
"id": "65dea8d5-968d-46bf-ad23-cf5758c0210e",
"name": "GPT",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
224,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-nano",
"cachedResultName": "gpt-5-nano"
},
"options": {
"temperature": 0.7
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "8d2527da-6f86-4c74-8adc-7b54a9a9877c",
"name": "IA Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
352,
208
],
"parameters": {
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "a24bdbea-eebd-4aff-975b-48e913d6a680",
"name": "Search",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
480,
208
],
"parameters": {
"url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', ``, 'string') }}",
"options": {},
"toolDescription": "Search using Bing example: https://www.bing.com/search?q=example"
},
"typeVersion": 4.2
},
{
"id": "9ca16d28-cc27-4c13-b550-a0752643c734",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-160,
208
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "f3bed1f0-8221-4269-9e5b-107f449d9fd3",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
-192
],
"parameters": {
"color": 5,
"width": 352,
"height": 544,
"content": "## Chat\nWhen a chat message is received: Triggers the flow when a user sends a message to the chat. It also manages the appearance and initial setup.\nIt also has session memory, so it remembers up to 5 sessions (this can be increased)."
},
"typeVersion": 1
},
{
"id": "998c0873-b2b2-4590-8a66-b171b98f3017",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
192,
-192
],
"parameters": {
"color": 5,
"width": 400,
"height": 544,
"content": "## Agent\nAI Agent: The brain of the chatbot. It uses memory, the GPT model, and Bing's search engine to generate an intelligent and configurable response."
},
"typeVersion": 1
},
{
"id": "53ad233c-41e6-4513-ac4c-e8c00728817c",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
-192
],
"parameters": {
"color": 5,
"width": 384,
"height": 544,
"content": "## Response\nRespond to Chat: Sends the AI-generated message back to the user in the chat and stores the conversation in memory."
},
"typeVersion": 1
},
{
"id": "ba192be2-9ccb-4825-9aa4-96371f5c4cfe",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
576,
-400
],
"parameters": {
"color": 3,
"width": 448,
"content": "## BY OXSR\nBy OXSR, visit my profile for professional and business workflows \nN8N Acc: https://n8n.io/creators/oxsr11/\nGit: https://github.com/OXSR\nMail: oriolrotllant3@gmail.com"
},
"typeVersion": 1
},
{
"id": "09ca881c-bf3a-4dda-a0c0-fe2846a716e4",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
-400
],
"parameters": {
"color": 3,
"width": 736,
"content": "## Welcome\nEste flujo de trabajo est\u00e1 dise\u00f1ado para crear un chatbot inteligente y funcional. Al recibir un mensaje, el chatbot utiliza una potente IA con memoria y la capacidad de buscar en la web para generar respuestas precisas y conversacionales. La respuesta se env\u00eda de vuelta al usuario con un dise\u00f1o limpio y minimalista, perfecto para una experiencia de usuario moderna y fluida."
},
"typeVersion": 1
},
{
"id": "8b56a3d0-5990-4c11-b9da-a07c42cc654b",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
-400
],
"parameters": {
"color": 4,
"width": 256,
"height": 752,
"content": "## LICENSE\nThis project is distributed under an open source license. You are free to use, modify, and distribute this work.\n\nKey Terms:\n\nUse: You may use this project for personal, educational, or commercial purposes.\n\nModification: You are permitted to modify the code or content as you wish.\n\nDistribution: You may share copies of the project, both in its original and modified versions."
},
"typeVersion": 1
}
],
"connections": {
"GPT": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Search": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Respond to Chat",
"type": "main",
"index": 0
}
]
]
},
"IA Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "When chat message received",
"type": "ai_memory",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This is an n8n workflow designed to implement an advanced AI chatbot with real-time conversation and search capabilities. Configured with a minimalist European design, this chatbot is ready to be integrated into any website.
Source: https://n8n.io/workflows/8209/ — 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.
Who is this workflow for? This workflow is designed for SEO analysts, content creators, marketing agencies, and developers who need to index a website and then interact with its content as if it were
This workflow implements an advanced AI-powered system for generating, and executing Claude Skills stored on GitHub.
This AI Agent Carousel Maker uses ChatGPT and Blotato to write, generate, and auto-post social media carousels to 5 social platforms: Instagram, Tiktok, Facebook, Twitter, and Pinterest.
ModelRouter. Uses chatTrigger, agent, modelSelector, httpRequest. Chat trigger; 28 nodes.
Turn any YouTube channel into a searchable knowledge base. The AI agent understands relationships between videos, topics, tools, and concepts - enabling powerful queries like "Which videos talk about