This workflow follows the Agent → Ollama 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": "Consulta",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "54ec9a8e-7675-45b5-ba15-e4d497edbac1",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
-368,
16
],
"id": "e4b9e6a0-e968-431a-86e8-6bcd9fc66dea",
"name": "Webhook"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.body.chatInput }}",
"options": {
"systemMessage": "You are a helpful assistant with access to a semantic knowledge base. \n\nFor every user question, first search the knowledge base using the available vector database tool. \n\nUse the retrieved documents as the primary source of truth. \n\nOnly answer from your own knowledge if the tool returns no relevant information. \n\nWhen answering, base your response on the retrieved documents."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": [
-64,
16
],
"id": "e945cda7-8be6-47c4-bda5-efb26ee6de05",
"name": "AI Agent"
},
{
"parameters": {
"model": "qwen2.5:latest",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
-64,
208
],
"id": "a49d6f5c-27fe-4635-89df-0caac4cf73e1",
"name": "Ollama Chat Model",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $json.body.user_id }}"
},
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.4,
"position": [
64,
288
],
"id": "6ab9499f-d52b-497d-8efd-f631dca5a638",
"name": "Simple Memory"
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "MANDATORY TOOL.\n\nUse this tool FIRST for every user question.\n\nThis tool contains the complete knowledge base and documentation.\n\nBefore answering any question, search this tool.\n\nDo not answer from your own knowledge until you have searched this tool.\n\nIf information is found, base the answer only on the retrieved documents.",
"qdrantCollection": {
"__rl": true,
"value": "test",
"mode": "list",
"cachedResultName": "test"
},
"topK": 10,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
"typeVersion": 1.3,
"position": [
240,
272
],
"id": "5b6c7eab-f8aa-4159-aced-163daf80d620",
"name": "Qdrant Vector Store",
"credentials": {
"qdrantApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"model": "nomic-embed-text:latest"
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
"typeVersion": 1,
"position": [
224,
448
],
"id": "c2736ff9-35a0-41ec-a387-e3048cd6e182",
"name": "Embeddings Ollama",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.5,
"position": [
384,
16
],
"id": "804db889-ef77-4b4f-affe-d9a760fde1be",
"name": "Respond to Webhook"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Qdrant Vector Store": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Embeddings Ollama": {
"ai_embedding": [
[
{
"node": "Qdrant Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate"
},
"versionId": "aa8b8710-c306-49dc-bc47-9b2af6405e26",
"meta": {
"templateCredsSetupCompleted": true
},
"nodeGroups": [],
"id": "Mg7HOJvWqtcdBkPU",
"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.
ollamaApiqdrantApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Consulta. Uses agent, lmChatOllama, memoryBufferWindow, vectorStoreQdrant. Webhook trigger; 7 nodes.
Source: https://gitlab.com/facundonsr/diia_data/-/blob/main/Consulta.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.
project Dick n8n. Uses agent, memoryBufferWindow, mistralAi, lmChatOllama. Webhook trigger; 60 nodes.
RAG Pipeline. Uses formTrigger, vectorStoreQdrant, embeddingsOllama, documentDefaultDataLoader. Event-driven trigger; 13 nodes.
Click here to view the YouTube Tutorial
Provides one workflow to maintain the knowledge base and another one to query the knowledge base. Uploaded documents are saved into the Qdrant vector store. When a query is made, the most relevant doc
RAG Agent. Uses vectorStoreInMemory, documentDefaultDataLoader, agent, lmChatOllama. Webhook trigger; 11 nodes.