This workflow corresponds to n8n.io template #5028 — we link there as the canonical source.
This workflow follows the Chainretrievalqa → Retrievervectorstore 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": [
{
"id": "3bc2f88b-c14e-4ee5-84ce-dc16a54aa12b",
"name": "Recursive Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
-580,
320
],
"parameters": {
"options": {
"splitCode": "markdown"
},
"chunkOverlap": 50
},
"typeVersion": 1
},
{
"id": "6bd91468-17db-4918-a232-87fb295a30c2",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1240,
-140
],
"parameters": {
"color": 7,
"width": 978.0454109366399,
"height": 806.6556079800943,
"content": "### Load data into database\nFetch file from Google Drive, split it into chunks and insert into Pinecone index"
},
"typeVersion": 1
},
{
"id": "3af4e8e9-0503-470e-b449-4551191fb405",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-160
],
"parameters": {
"color": 7,
"width": 795.4336844920119,
"height": 849.4411596574598,
"content": "### Chat with database\nEmbed the incoming chat message and use it retrieve relevant chunks from the vector store. These are passed to the model to formulate an answer "
},
"typeVersion": 1
},
{
"id": "6f94ec58-4fca-40ee-a1a0-012998093589",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
-580,
200
],
"parameters": {
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "3e145342-458d-4222-a707-9fee78e91c4d",
"name": "Question and Answer Chain",
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
"position": [
60,
-20
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
},
{
"id": "7f2b288a-a002-4cd3-93c0-b2a0e491699c",
"name": "Vector Store Retriever",
"type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
"position": [
240,
200
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ca930ba7-b45d-47d8-9f36-9db3a25ee77a",
"name": "When clicking 'Test Workflow' button",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1420,
-20
],
"parameters": {},
"typeVersion": 1
},
{
"id": "90782052-5df2-4f1e-84fc-c47095a81852",
"name": "When clicking 'Chat' button below",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-140,
-20
],
"parameters": {},
"typeVersion": 1
},
{
"id": "712dc9d3-af2d-4436-9315-78f66f748b91",
"name": "Read/Write Files from Disk",
"type": "n8n-nodes-base.readWriteFile",
"position": [
-1200,
-20
],
"parameters": {
"options": {},
"fileSelector": "/tmp/external_data/news.txt"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "1cd768c1-fcc0-480a-8b33-fbe714788b32",
"name": "In-Memory Vector Store1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
"position": [
240,
380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2393e667-7e4f-4392-9a7e-b2b4d74d46e8",
"name": "In-Memory Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
"position": [
-980,
-20
],
"parameters": {
"mode": "insert",
"clearStore": true
},
"typeVersion": 1
},
{
"id": "e53f51f3-04f3-46ef-aebd-e0b32b415101",
"name": "Embeddings Cohere",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
-940,
300
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "cf1333b6-b69b-4ff1-bfc3-d3d579585efb",
"name": "Groq Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"notes": "\u4f7f\u7528\u7e41\u9ad4\u4e2d\u6587",
"position": [
100,
220
],
"parameters": {
"model": "llama-3.3-70b-versatile",
"options": {}
},
"credentials": {
"groqApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e49cfb2e-5eca-4b43-973d-4bf7285b5d94",
"name": "Embeddings Cohere1",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
340,
560
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
}
],
"connections": {
"Groq Chat Model": {
"ai_languageModel": [
[
{
"node": "Question and Answer Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings Cohere": {
"ai_embedding": [
[
{
"node": "In-Memory Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Embeddings Cohere1": {
"ai_embedding": [
[
{
"node": "In-Memory Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "In-Memory Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Vector Store Retriever": {
"ai_retriever": [
[
{
"node": "Question and Answer Chain",
"type": "ai_retriever",
"index": 0
}
]
]
},
"In-Memory Vector Store1": {
"ai_vectorStore": [
[
{
"node": "Vector Store Retriever",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"Read/Write Files from Disk": {
"main": [
[
{
"node": "In-Memory Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"When clicking 'Chat' button below": {
"main": [
[
{
"node": "Question and Answer Chain",
"type": "main",
"index": 0
}
]
]
},
"When clicking 'Test Workflow' button": {
"main": [
[
{
"node": "Read/Write Files from Disk",
"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.
cohereApigroqApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow demonstrates a simple Retrieval-Augmented Generation (RAG) pipeline in n8n, split into two main sections:
Source: https://n8n.io/workflows/5028/ — 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.
Build A Financial Documents Assistant Using Qdrant And Mistral.Ai. Uses localFileTrigger, manualTrigger, stickyNote, readWriteFile. Event-driven trigger; 29 nodes.
Localfile. Uses localFileTrigger, manualTrigger, stickyNote, readWriteFile. Event-driven trigger; 29 nodes.
This n8n workflow demonstrates how to manage your Qdrant vector store when there is a need to keep it in sync with local files. It covers creating, updating and deleting vector store records ensuring
prototype. Uses vectorStoreInMemory, documentDefaultDataLoader, embeddingsHuggingFaceInference, readWriteFile. Event-driven trigger; 12 nodes.
Breakdown Documents Into Study Notes Using Templating Mistralai And Qdrant. Uses localFileTrigger, documentDefaultDataLoader, textSplitterRecursiveCharacterTextSplitter, embeddingsMistralCloud. Event-