Intelligent RAG Knowledge Base
I engineered a RAG (Retrieval-Augmented Generation) agent that ingests PDF assets from Google Drive, generates semantic embeddings via OpenAI, and stores them in Supabase Vector. It uses Postgres for long-term chat memory, allowing users to chat naturally with documents.
Impact
• Instant retrieval of key data points from 500+ page documents
• Zero hallucination via strict vector search retrieval constraints
• Reduced research time by 80% for complex technical queries
Shared 12/5/2025
1 views
Visual Workflow
JSON Code
{
"id": "p7DTzykC56g9Z4Xv",
"meta": {
"instanceId": "385836472bd090bc0a4be4920feadaa2165e97fb24c24504ed3bad6ead56a071",
"templateCredsSetupCompleted": true
},
"name": "C# Book RAG",
"tags": [],
"nodes": [
{
"id": "c0bf6982-0f0f-4081-8071-bda36287b1ae",
"name": "Postgres Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
1280,
-528
],
"parameters": {},
"credentials": {
"postgres": {
"id": "Wcpwlqwlm37MeKH9",
"name": "Postgres account"
}
},
"typeVersion": 1.3
},
{
"id": "c76773c0-171a-4c6b-aac2-08ea1ccc77cb",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1136,
-528
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "vx1qMfNTGKG59YUV",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "7755b90e-d3e4-481a-83ba-fd025f4d9a68",
"name": "Supabase Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
1408,
-528
],
"parameters": {
"mode": "retrieve-as-tool",
"topK": 20,
"options": {},
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
},
"toolDescription": "Use this tool to search the database"
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"typeVersion": 1.3
},
{
"id": "c53658ef-2bcf-4a92-b7ea-f3e2497e9ec5",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
1488,
-320
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "vx1qMfNTGKG59YUV",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "66d12779-7a60-442f-ad61-6433d2b32c19",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
944,
64
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7e63205d-5aa3-4620-b01b-f1e07a0fdc0c",
"name": "Search files and folders",
"type": "n8n-nodes-base.googleDrive",
"position": [
1168,
64
],
"parameters": {
"filter": {},
"options": {
"fields": [
"webViewLink",
"id",
"name",
"mimeType"
]
},
"resource": "fileFolder",
"returnAll": true,
"queryString": "'1Ap1rKPTDzRVxhEMzXcBYRluqFikT1u_D' in parents and trashed=false",
"searchMethod": "query"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "7lBNSZTmU4sskPet",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "9af79ae0-9adc-4156-a19e-5dc2efb743df",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1392,
64
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "b859a53e-d9fe-47b2-9cdb-1fa57a3b0b2f",
"name": "Download file",
"type": "n8n-nodes-base.googleDrive",
"position": [
1888,
304
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Set File Details').item.json.file_id }}"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "text/plain"
}
}
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "7lBNSZTmU4sskPet",
"name": "Google Drive account"
}
},
"executeOnce": false,
"typeVersion": 3
},
{
"id": "61a25813-34f5-44b9-abc5-09e4b508ad51",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
2112,
320
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "PDF",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "49e53e8a-d0b8-4e15-a087-c43529af080f",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set File Details').item.json.file_type }}",
"rightValue": "application/pdf"
}
]
},
"renameOutput": true
},
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "69f1af15-3422-4b87-96a7-d57fd888c987",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Set File Details').item.json.file_type }}",
"rightValue": "text/plain"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.3
},
{
"id": "689958a5-aea4-4f30-a6de-72b23feca5e0",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
2640,
544
],
"parameters": {
"options": {
"metadata": {
"metadataValues": [
{
"name": "file_id",
"value": "={{ $('Set File Details').item.json.file_id }}"
},
{
"name": "file_name",
"value": "={{ $('Set File Details').item.json.file_name }}"
},
{
"name": "file_url",
"value": "={{ $('Set File Details').item.json.file_url }}"
}
]
}
},
"jsonData": "={{ $json.text || $json.data || $json.concatenated_data}}",
"jsonMode": "expressionData",
"textSplittingMode": "custom"
},
"typeVersion": 1.1
},
{
"id": "699f1b20-e3de-43e7-acb6-be2d476a99a0",
"name": "Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"position": [
2720,
752
],
"parameters": {
"chunkSize": 750,
"chunkOverlap": 200
},
"typeVersion": 1
},
{
"id": "8e2e96c7-d7f4-4b5a-a226-38a2922f712f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
864,
-912
],
"parameters": {
"color": 5,
"width": 864,
"height": 912,
"content": "## RAG Agent"
},
"typeVersion": 1
},
{
"id": "22d63031-450e-48de-9959-8f0007dd8a87",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
864,
0
],
"parameters": {
"color": 4,
"width": 2048,
"height": 912,
"content": "## RAG Ingestion System"
},
"typeVersion": 1
},
{
"id": "9f2babd1-83e0-4beb-a27d-b5639a432838",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
1792,
-496
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "c251b8cb-d667-4768-a460-9b6f961fe3e7",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
2240,
-688
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "df1bcd7d-9dd9-46f7-9eb8-8abd77641d76",
"name": "Code in JavaScript",
"type": "n8n-nodes-base.code",
"position": [
2464,
-688
],
"parameters": {
"jsCode": "// Grab the raw data from all inputs\nconst inputData = $input.all().map(item => item.json);\n\n// Separate out the Google Drive items (no \"metadata\") vs. Supabase items (have \"metadata\")\nconst googleDriveItems = inputData.filter(item => item.id && !item.metadata);\nconst supabaseItems = inputData.filter(item => item.metadata);\n\n// Extract just the file IDs from Google Drive\nconst googleDriveIds = googleDriveItems.map(item => item.id);\n\n// Build a Set for quick membership checks (recommended for large arrays)\nconst driveIdSet = new Set(googleDriveIds);\n\n// Filter Supabase rows to find those whose file_id is not in the Drive set\nconst orphanedSupabaseRows = supabaseItems.filter(item => {\n return !driveIdSet.has(item.metadata.file_id);\n});\n\n// Return each orphaned row as a separate n8n item\nreturn orphanedSupabaseRows.map(row => ({ json: row }));"
},
"typeVersion": 2
},
{
"id": "60311d0b-6e54-43fb-a7e6-029a7daf9a65",
"name": "Merge1",
"type": "n8n-nodes-base.merge",
"position": [
2240,
-304
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "90dcfc34-e8d6-4609-8cd0-233ca25d39d6",
"name": "Code in JavaScript1",
"type": "n8n-nodes-base.code",
"position": [
2464,
-304
],
"parameters": {
"jsCode": "// Simple code to handle empty Google Drive\n\n// Determine if we have Google Drive data\nlet hasDriveData = false;\nlet driveFileIds = new Set();\n\n// Check the first item to see if it's a Google Drive file or a file list\nif (items[0] && items[0].json) {\n // Is it a files array?\n if (items[0].json.files && Array.isArray(items[0].json.files)) {\n hasDriveData = true;\n for (const file of items[0].json.files) {\n if (file && file.id) driveFileIds.add(file.id);\n }\n }\n // Is it a single file with no metadata-like properties?\n else if (items[0].json.id && !items[0].json.title && !items[0].json.created_at) {\n hasDriveData = true;\n driveFileIds.add(items[0].json.id);\n }\n}\n\nconsole.log(\"Has Drive data:\", hasDriveData);\nconsole.log(\"Drive file IDs:\", Array.from(driveFileIds));\n\n// Determine which items are metadata records\nlet metadataRecords = [];\n\n// If the first item looks like a metadata record (has title, url, created_at)\nif (!hasDriveData) {\n // All items are metadata records\n metadataRecords = items.map(item => item.json).filter(Boolean);\n console.log(\"All items are metadata records:\", metadataRecords.length);\n} else {\n // Only items after the first are metadata records\n metadataRecords = items.slice(1).map(item => item.json).filter(Boolean);\n console.log(\"Items after first are metadata records:\", metadataRecords.length);\n}\n\n// If there are no Drive files, mark all metadata records for deletion\nconst recordsToDelete = [];\n\nif (driveFileIds.size === 0) {\n console.log(\"No Drive files, marking ALL metadata records for deletion\");\n for (const record of metadataRecords) {\n if (record && record.id) {\n recordsToDelete.push({\n ...record,\n _shouldDelete: true\n });\n }\n }\n} else {\n // Otherwise, only mark records not in Drive\n console.log(\"Checking metadata records against Drive files\");\n for (const record of metadataRecords) {\n if (record && record.id && !driveFileIds.has(record.id)) {\n recordsToDelete.push({\n ...record,\n _shouldDelete: true\n });\n }\n }\n}\n\nconsole.log(\"Records to delete:\", recordsToDelete.length);\nreturn recordsToDelete;"
},
"typeVersion": 2
},
{
"id": "8948a90c-e977-4f7f-8b9e-21566ee87924",
"name": "Set File Details",
"type": "n8n-nodes-base.set",
"position": [
1616,
64
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "999fb970-2631-45f1-894a-c7fe8e418bc5",
"name": "file_id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "b15e5d32-bb4a-4bd1-af47-a7d3fb06ae25",
"name": "file_name",
"type": "string",
"value": "={{ $json.name }}"
},
{
"id": "ac034567-32e7-465c-951d-0fa80b6f4f3d",
"name": "file_type",
"type": "string",
"value": "={{ $json.mimeType }}"
},
{
"id": "412892fa-3024-4152-a944-b46de52f9743",
"name": "file_url",
"type": "string",
"value": "={{ $json.webViewLink }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4f537f21-ac36-4f25-a5fd-942e3f56b240",
"name": "Insert document metadata",
"type": "n8n-nodes-base.postgres",
"position": [
1664,
304
],
"parameters": {
"table": {
"__rl": true,
"mode": "list",
"value": "document_metadata",
"cachedResultName": "document_metadata"
},
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"columns": {
"value": {
"id": "={{ $('Set File Details').item.json.file_id }}",
"url": "={{ $('Set File Details').item.json.file_url }}",
"title": "={{ $('Set File Details').item.json.file_name }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"required": true,
"displayName": "id",
"defaultMatch": true,
"canBeUsedToMatch": true
},
{
"id": "created_at",
"type": "dateTime",
"display": true,
"removed": true,
"required": false,
"displayName": "created_at",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "title",
"type": "string",
"display": true,
"required": false,
"displayName": "title",
"defaultMatch": false,
"canBeUsedToMatch": false
},
{
"id": "url",
"type": "string",
"display": true,
"required": false,
"displayName": "url",
"defaultMatch": false,
"canBeUsedToMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "upsert"
},
"credentials": {
"postgres": {
"id": "Wcpwlqwlm37MeKH9",
"name": "Postgres account"
}
},
"executeOnce": false,
"typeVersion": 2.6
},
{
"id": "a15b2dfb-1c1b-42d3-b62b-d5d67a38ba99",
"name": "Delete old document rows",
"type": "n8n-nodes-base.supabase",
"position": [
1440,
304
],
"parameters": {
"tableId": "documents",
"operation": "delete",
"filterType": "string",
"filterString": "=metadata->>file_id=like.*{{ $json.file_id }}*"
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"executeOnce": false,
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "c5a13ee5-0b79-4779-992f-968907a58bb7",
"name": "Extract Google Doc text",
"type": "n8n-nodes-base.extractFromFile",
"position": [
2336,
416
],
"parameters": {
"options": {},
"operation": "text"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "67008b14-0da4-4800-be5a-73cd070a5533",
"name": "Extract PDF Text",
"type": "n8n-nodes-base.extractFromFile",
"position": [
2336,
224
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "5ce57ed2-a0ba-44ec-bee8-b11caea1acb1",
"name": "Insert into Supabase Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
2544,
320
],
"parameters": {
"mode": "insert",
"options": {
"queryName": "match_documents"
},
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
}
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"typeVersion": 1.3
},
{
"id": "85841a14-504e-4487-8022-76e7071fc9a1",
"name": "Embeddings OpenAI2",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
2512,
544
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "vx1qMfNTGKG59YUV",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "4801c7c5-2c3f-437b-8c90-6f67e5f1f78a",
"name": "Get File IDs",
"type": "n8n-nodes-base.googleDrive",
"position": [
2016,
-784
],
"parameters": {
"filter": {},
"options": {
"fields": [
"id"
]
},
"resource": "fileFolder",
"returnAll": true,
"queryString": "'1Ap1rKPTDzRVxhEMzXcBYRluqFikT1u_D' in parents and trashed=false",
"searchMethod": "query"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "7lBNSZTmU4sskPet",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "ed6b940e-64de-44f8-bbca-c209aebb2e3b",
"name": "Get File IDs1",
"type": "n8n-nodes-base.googleDrive",
"position": [
2016,
-400
],
"parameters": {
"filter": {},
"options": {
"fields": [
"id"
]
},
"resource": "fileFolder",
"returnAll": true,
"queryString": "'1Ap1rKPTDzRVxhEMzXcBYRluqFikT1u_D' in parents and trashed=false",
"searchMethod": "query"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "7lBNSZTmU4sskPet",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "c7cac580-9253-4f8f-abc7-5ef59a9b6089",
"name": "Get Supabase rows",
"type": "n8n-nodes-base.supabase",
"position": [
2016,
-592
],
"parameters": {
"tableId": "documents",
"operation": "getAll",
"returnAll": true
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "798bd46f-e9eb-4b22-9a4c-3b0d831f0a6e",
"name": "Get Supabase rows1",
"type": "n8n-nodes-base.supabase",
"position": [
2016,
-208
],
"parameters": {
"tableId": "document_metadata",
"operation": "getAll",
"returnAll": true
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "0ef5680c-5b2c-4b7e-b349-7a1ac65373e3",
"name": "Delete rows",
"type": "n8n-nodes-base.supabase",
"position": [
2688,
-688
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "id",
"keyValue": "={{ $json.id }}",
"condition": "eq"
}
]
},
"tableId": "documents",
"matchType": "allFilters",
"operation": "delete"
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "f034cb4e-0698-4681-a174-782c56bae3c5",
"name": "Delete rows1",
"type": "n8n-nodes-base.supabase",
"position": [
2688,
-304
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "id",
"keyValue": "={{ $json.id }}",
"condition": "eq"
}
]
},
"tableId": "document_metadata",
"matchType": "allFilters",
"operation": "delete"
},
"credentials": {
"supabaseApi": {
"id": "CY9LbpV1r4MXwtEF",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "8b0a43e5-6857-430c-ac89-df3931e0475c",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1728,
-912
],
"parameters": {
"color": 3,
"width": 1184,
"height": 912,
"content": "## RAG Clean Up"
},
"typeVersion": 1
},
{
"id": "a476c6f1-1224-4169-bb86-27556ec9283c",
"name": "Incoming Chat Request",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
928,
-752
],
"webhookId": "90b7e098-3644-4ffe-94c1-5c275daeca9d",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "6529137f-1239-4ef6-8145-872e1680f4ad",
"name": "Generate RAG Response",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1216,
-752
],
"parameters": {
"options": {
"systemMessage": "You are a helpful and friendly AI assistant for our company. Your primary goal is to assist users by answering their questions based on a knowledge base, but you should also be ableto handle simple conversation. You have access to the Supabase tool. Always call on this tool to answer questions if the user is asking for information.\n\nFirst, analyze the user's message to determine their intent.\n\n**Behavior 1: If the user's message is a simple greeting, thank you, or other conversational filler (e.g., \"hello\", \"thanks!\", \"how are you?\").**\n- You should respond politely and conversationally.\n- Do NOT use the provided [CONTEXT].\n- Do NOT mention the documents or your knowledge base.\n\n**Behavior 2: If the user's message is a question asking for information, instructions, or specific details.**\n- You must switch to your role as a specialized knowledge base assistant and follow these strict rules:\n1. **Analyze the Context:** Carefully read the provided [CONTEXT] section. This is your only source of truth.\n2. **Answer the Question:** Formulate a direct and concise answer to the [QUESTION] using only the information from the [CONTEXT].\n3. **Strictly Adhere to Context:** Do NOT use any external knowledge, make assumptions, or fill in gaps.\n4. **Handling Insufficient Information:** If the answer cannot be found within the [CONTEXT], you must respond with the exact phrase: \"I could not find an answer in the provided documents.\" Do not apologize or offer to search elsewhere.\n5. **Cite Your Sources:** After your answer, add a \"Sources:\" section. List the title of each source document you used. Use the metadata provided in the context to format each source as a clickable Markdown link.\n\n**[CONTEXT]**\n{context_from_retriever}\n**[/CONTEXT]**\n\n**[QUESTION]**\n{user_question}\n**[/QUESTION]**"
}
},
"typeVersion": 2.2
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "37b72e27-46c2-4553-8c98-a8c549158c16",
"connections": {
"Merge": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"Merge1": {
"main": [
[
{
"node": "Code in JavaScript1",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Extract PDF Text",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract Google Doc text",
"type": "main",
"index": 0
}
]
]
},
"Get File IDs": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Download file": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Get File IDs1": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Set File Details",
"type": "main",
"index": 0
}
]
]
},
"Extract PDF Text": {
"main": [
[
{
"node": "Insert into Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get File IDs",
"type": "main",
"index": 0
},
{
"node": "Get Supabase rows",
"type": "main",
"index": 0
},
{
"node": "Get File IDs1",
"type": "main",
"index": 0
},
{
"node": "Get Supabase rows1",
"type": "main",
"index": 0
}
]
]
},
"Set File Details": {
"main": [
[
{
"node": "Delete old document rows",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Get Supabase rows": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate RAG Response",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Delete rows",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI2": {
"ai_embedding": [
[
{
"node": "Insert into Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Get Supabase rows1": {
"main": [
[
{
"node": "Merge1",
"type": "main",
"index": 1
}
]
]
},
"Code in JavaScript1": {
"main": [
[
{
"node": "Delete rows1",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Insert into Supabase Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "Generate RAG Response",
"type": "ai_memory",
"index": 0
}
]
]
},
"Incoming Chat Request": {
"main": [
[
{
"node": "Generate RAG Response",
"type": "main",
"index": 0
}
]
]
},
"Supabase Vector Store": {
"ai_tool": [
[
{
"node": "Generate RAG Response",
"type": "ai_tool",
"index": 0
}
]
]
},
"Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Extract Google Doc text": {
"main": [
[
{
"node": "Insert into Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Delete old document rows": {
"main": [
[
{
"node": "Insert document metadata",
"type": "main",
"index": 0
}
]
]
},
"Insert document metadata": {
"main": [
[
{
"node": "Download file",
"type": "main",
"index": 0
}
]
]
},
"Search files and folders": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Insert into Supabase Vector Store": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Search files and folders",
"type": "main",
"index": 0
}
]
]
}
}
}