I have a simple chat workflow that I have copied from the template page:
{
“name”: “Chat with local LLMs using n8n and Ollama”,
“nodes”: [
{
“parameters”: {
“options”: {}
},
“id”: “475385fa-28f3-45c4-bd1a-10dde79f74f2”,
“name”: “When chat message received”,
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“position”: [
912,
624
],
“webhookId”: “ebdeba3f-6b4f-49f3-ba0a-8253dd226161”,
“typeVersion”: 1.1
},
{
“parameters”: {
“options”: {}
},
“id”: “61133dc6-dcd9-44ff-85f2-5d8cc2ce813e”,
“name”: “Ollama Chat Model”,
“type”: “@n8n/n8n-nodes-langchain.lmChatOllama”,
“position”: [
1104,
784
],
“typeVersion”: 1,
“credentials”: {
“ollamaApi”: {
“id”: “lCtwNqRXjkJytDLf”,
“name”: “Ollama Test”
}
}
},
{
“parameters”: {
“content”: “## Chat with local LLMs using n8n and Ollama\nThis n8n workflow allows you to seamlessly interact with your self-hosted Large Language Models (LLMs) through a user-friendly chat interface. By connecting to Ollama, a powerful tool for managing local LLMs, you can send prompts and receive AI-generated responses directly within n8n.\n\n### How it works\n1. When chat message received: Captures the user’s input from the chat interface.\n2. Chat LLM Chain: Sends the input to the Ollama server and receives the AI-generated response.\n3. Delivers the LLM’s response back to the chat interface.\n\n### Set up steps\n* Make sure Ollama is installed and running on your machine before executing this workflow.\n* Edit the Ollama address if different from the default.\n”,
“height”: 473,
“width”: 485
},
“id”: “3e89571f-7c87-44c6-8cfd-4903d5e1cdc5”,
“name”: “Sticky Note”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
368,
240
],
“typeVersion”: 1
},
{
“parameters”: {
“content”: “## Ollama setup\n* Connect to your local Ollama, usually on http://localhost:11434\n* If running in Docker, make sure that the n8n container has access to the host’s network in order to connect to Ollama. You can do this by passing --net=host option when starting the n8n Docker container”,
“height”: 258,
“width”: 368,
“color”: 6
},
“id”: “9345cadf-a72e-4d3d-b9f0-d670744065fe”,
“name”: “Sticky Note1”,
“type”: “n8n-nodes-base.stickyNote”,
“position”: [
1280,
800
],
“typeVersion”: 1
},
{
“parameters”: {},
“id”: “eeffdd4e-6795-4ebc-84f7-87b5ac4167d9”,
“name”: “Chat LLM Chain”,
“type”: “@n8n/n8n-nodes-langchain.chainLlm”,
“position”: [
1136,
624
],
“typeVersion”: 1.4
}
],
“pinData”: {},
“connections”: {
“Ollama Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “Chat LLM Chain”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“When chat message received”: {
“main”: [
[
{
“node”: “Chat LLM Chain”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”,
“binaryMode”: “separate”,
“availableInMCP”: false
},
“versionId”: “4175a286-4d6a-42a5-915e-f8855614221f”,
“meta”: {
“templateId”: “2384”,
“templateCredsSetupCompleted”: true,
“instanceId”: “92d82d8eddeb75c1632295d367de7c0a28a1a65bbe8e484bc9236a3b35962a42”
},
“nodeGroups”: ,
“id”: “rR55c5eeONtyLGm9”,
“tags”:
}
I am using N8N at http://192.168.2.145:11434. The LLM I am using on ollama is llama3.2:latest.
Unfortunately, when I run the workflow, regardless of what I enter into the chat I get
the following error:
Error: Failed to receive response
When I check the Chat component output, I am seeing “no chat output”. And of course, there is no
input data received by the “Chat LLM Chain” component.
There was another post where the person was unable to receive a response using the chat component.
The solution was to set up the editor URL:
- N8N_EDITOR_BASE_URL=http://localhost:5678
- WEBHOOK_URL=http://localhost:5678/
I tried that. It didn’t work.
Is there something wrong with the Chat component? Or am I missing something in the configuration
of the components?
Someone please advise.
