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 →
{
"nodes": [
{
"parameters": {
"model": "qwen3:14b",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
640,
80
],
"id": "e9fe306f-4f2e-4772-bae3-b639eed54f5a",
"name": "Ollama Chat Model",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"model": "nomic-embed-text:v1.5"
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
"typeVersion": 1,
"position": [
592,
400
],
"id": "4778ecbf-674b-47fc-b3e9-13ced039f024",
"name": "Embeddings Ollama",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"id": "9aca16b6-6d08-4823-931c-afcec947b3e1",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
544,
-128
],
"typeVersion": 1.1
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-832,
-96
],
"id": "0d925394-33e0-4256-885e-e7fb4b5784fd",
"name": "When clicking \u2018Execute workflow\u2019"
},
{
"parameters": {
"url": "http://192.168.0.180:1337/api/meetings",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-624,
-96
],
"id": "b62fccf0-4247-4894-84aa-477a36df7065",
"name": "HTTP Request",
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"mode": "insert",
"tableName": "embeddings",
"options": {
"collection": {
"values": {
"useCollection": true,
"collectionName": "={{ $json.cmetadata.project + ' ' + $json.cmetadata.time }}",
"collectionTableName": "vector_collections"
}
}
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
"typeVersion": 1.3,
"position": [
48,
-96
],
"id": "0af14744-9963-4a65-b83e-606bbfa62264",
"name": "Postgres PGVector Store",
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"textSplittingMode": "custom",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"typeVersion": 1.1,
"position": [
0,
208
],
"id": "8fa6e3aa-1e34-4013-807d-cb999e3847a5",
"name": "Default Data Loader"
},
{
"parameters": {
"jsCode": "let data;\n\nfor (const item of $input.all()) {\n data = item.json.data.map((d) => ({\n cmetadata: {\n strapi_id: d.id,\n project: d.project,\n time: d.meetingTime\n },\n strapi_id: d.id,\n text: d.anotations\n }));\n}\n\nreturn data;"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-432,
-96
],
"id": "124d7887-d37f-4801-a2e7-610d82db8996",
"name": "Code in JavaScript",
"executeOnce": false
},
{
"parameters": {
"chunkOverlap": 50,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"typeVersion": 1,
"position": [
-48,
560
],
"id": "44a4ad8e-bb4e-48e4-9622-022c4f71878a",
"name": "Recursive Character Text Splitter"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
-224,
-96
],
"id": "bbe6d00c-dead-47d8-8952-67801b3145d4",
"name": "Loop Over Items"
},
{
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n item.json.myNewField = 1;\n}\n\nreturn $input.all();"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
32,
-272
],
"id": "b8089b58-ca84-4a3a-9f6f-61615812bea8",
"name": "Code in JavaScript1"
},
{
"parameters": {
"name": "project_meetings",
"description": "data for projects meetings",
"topK": "=50"
},
"id": "44598e50-a8e9-4c3e-941b-5bbc53b90615",
"name": "Answer questions with a vector store",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
1136,
80
],
"typeVersion": 1,
"notesInFlow": true
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolName": "knowledge_base",
"toolDescription": "Use this tool when asked questions from the custom knowledge base.",
"tableName": "embeddings",
"options": {}
},
"id": "89bf8e57-8ac8-4643-9b2f-17b0483bf76f",
"name": "Postgres PGVector Store1",
"type": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
"position": [
880,
304
],
"typeVersion": 1,
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"model": "qwen3:14b",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"typeVersion": 1,
"position": [
1200,
272
],
"id": "5fcf4029-3e2e-44e9-8504-a61a555aa69c",
"name": "Ollama Chat Model1",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $json.sessionId }}",
"tableName": "chat_histories"
},
"id": "154d5331-b638-4fcb-b180-440179d74a00",
"name": "Postgres Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
816,
128
],
"typeVersion": 1.3,
"credentials": {
"postgres": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"model": "nomic-embed-text:v1.5"
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOllama",
"typeVersion": 1,
"position": [
896,
512
],
"id": "95d1b71c-57d8-429b-a35e-c4b96e83e405",
"name": "Embeddings Ollama1",
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant\n\n# Rules\nOnly retrieve information from the knowledge base"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.2,
"position": [
736,
-128
],
"id": "47f8a3d3-7137-4f51-b7c7-3d75c274d532",
"name": "AI Agent"
}
],
"connections": {
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings Ollama": {
"ai_embedding": [
[
{
"node": "Postgres PGVector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Execute workflow\u2019": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Postgres PGVector Store": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Postgres PGVector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Code in JavaScript1",
"type": "main",
"index": 0
}
],
[
{
"node": "Postgres PGVector Store",
"type": "main",
"index": 0
}
]
]
},
"Answer questions with a vector store": {
"ai_tool": [
[]
]
},
"Postgres PGVector Store1": {
"ai_vectorStore": [
[]
],
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Ollama Chat Model1": {
"ai_languageModel": [
[
{
"node": "Answer questions with a vector store",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Embeddings Ollama1": {
"ai_embedding": [
[
{
"node": "Postgres PGVector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
}
},
"meta": {
"templateCredsSetupCompleted": true
}
}
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.
httpBearerAuthollamaApipostgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Rag-Strapi. Uses lmChatOllama, embeddingsOllama, chatTrigger, httpRequest. Chat trigger; 17 nodes.
Source: https://github.com/davidsondefaria/oficina-dev-5/blob/81b74fdb346c7fcbad4d37fe50a22caa1d89a81d/n8n/flows/rag-strapi.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.
This workflow acts as a 24/7 sales agent, engaging leads across WhatsApp, Instagram, Facebook, Telegram, and your website. It intelligently transcribes audio messages, answers questions using a knowle
⚡AI-Powered YouTube Playlist & Video Summarization and Analysis v2. Uses lmChatGoogleGemini, agent, splitOut, chainLlm. Chat trigger; 72 nodes.
This n8n workflow transforms entire YouTube playlists or single videos into interactive knowledge bases you can chat with. Ask questions and get summaries without needing to watch hours of content. 🔗
RAG Agent Integration Hub mit Knowledge Management. Uses memoryPostgresChat, lmChatOllama, lmOllama, toolVectorStore. Chat trigger; 27 nodes.
V2 Supabase RAG AI Agent. Uses memoryPostgresChat, lmChatOllama, lmOllama, toolVectorStore. Chat trigger; 23 nodes.