This workflow corresponds to n8n.io template #3799 — we link there as the canonical source.
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 →
{
"id": "6fZffoKqrzLAmbHc",
"name": "Google Drive File Ingestion to Supabase for Knowledge Base",
"tags": [],
"nodes": [
{
"id": "eff80cb0-26e5-4a19-a4d6-671a11fe26b6",
"name": "File Created",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-80,
880
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a78ad8a2-93a9-4c71-8916-e6247d408d82",
"name": "Update to File",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-80,
680
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f8a528ba-9638-4a32-a2e2-596c4a63da0c",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
140,
780
],
"parameters": {},
"typeVersion": 3
},
{
"id": "bf8e763f-fff5-4fa4-a0ec-4b13bdeb498d",
"name": "Set File ID",
"type": "n8n-nodes-base.set",
"position": [
360,
640
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "47bc2891-8f9f-416d-b2ce-8fd656796348",
"name": "Check for Duplicates",
"type": "n8n-nodes-base.postgres",
"position": [
800,
540
],
"parameters": {},
"typeVersion": 2.6,
"alwaysOutputData": true
},
{
"id": "71dd64ed-9c40-4ef0-bf24-5243b2cff499",
"name": "Insert Metadata",
"type": "n8n-nodes-base.postgres",
"position": [
1900,
740
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "6a66a187-30c1-46b0-830f-484add803b1d",
"name": "Extract from File PDF",
"type": "n8n-nodes-base.extractFromFile",
"position": [
3000,
180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ebc02b0a-0481-42e8-8043-e9bcd6c0f02e",
"name": "Extract from CSV",
"type": "n8n-nodes-base.extractFromFile",
"position": [
2560,
580
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8bb13f35-03c3-413a-9dcc-1526f40325d3",
"name": "Extract from XLSX",
"type": "n8n-nodes-base.extractFromFile",
"position": [
2560,
980
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a598e49c-d9bc-4305-b917-ccc64feb4c68",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
2780,
740
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e1c0c059-66f5-4a1b-b76a-8db1823c25e1",
"name": "Summarize",
"type": "n8n-nodes-base.summarize",
"position": [
3000,
740
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "cb46dfca-96ce-478a-98cb-5c94fd48e104",
"name": "Extract from RTF",
"type": "n8n-nodes-base.extractFromFile",
"position": [
3000,
1160
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9832240d-7cea-465e-b167-17fcf254f5f7",
"name": "Error Logger",
"type": "n8n-nodes-base.supabase",
"position": [
1240,
1380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "01b5f966-e5b7-436e-9551-c31f6b9d4eac",
"name": "Validate File",
"type": "n8n-nodes-base.if",
"position": [
580,
640
],
"parameters": {},
"typeVersion": 1
},
{
"id": "466e1cc8-25e7-462c-b19f-467c66eb1d77",
"name": "IF Duplicate Check",
"type": "n8n-nodes-base.if",
"position": [
1020,
540
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "0dd9891e-7dd3-4f2d-8a2e-094ab3cecec6",
"name": "Log Duplicate",
"type": "n8n-nodes-base.supabase",
"position": [
1240,
440
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7d05de17-7909-4da3-bba3-c7f512af1708",
"name": "Supabase Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
3240,
440
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "a764be2e-110f-4320-8bae-f04a749a3ac5",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
3220,
660
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "0ef91d4c-7d6b-4544-9ef5-09a0bdb6dd7c",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
3340,
660
],
"parameters": {},
"typeVersion": 1
},
{
"id": "86c648a9-4b9d-4afb-9e2e-f4fff12a1ce0",
"name": "Debug File ID",
"type": "n8n-nodes-base.set",
"position": [
1240,
740
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "392916f3-2265-4c57-abfd-37054da9e741",
"name": "Download File",
"type": "n8n-nodes-base.googleDrive",
"position": [
2120,
740
],
"parameters": {},
"typeVersion": 3
},
{
"id": "a7367c0f-6f22-4099-ac6c-8511081b79f6",
"name": "Set Schema",
"type": "n8n-nodes-base.set",
"position": [
3360,
1160
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "7051505f-4da8-44c0-90c4-c522d3a2f6d3",
"name": "Schema Document Metadata",
"type": "n8n-nodes-base.postgres",
"position": [
3600,
1160
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "6f76fa9d-d1f9-4e05-80af-ec78fed5416c",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
2340,
680
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "f62efcf8-bb87-4e4e-9c73-0c86ec1c55fd",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-120,
-60
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "82015f8b-1456-4b04-bf38-2735e7f416f6",
"name": "Extract from DOC",
"type": "n8n-nodes-base.extractFromFile",
"position": [
3000,
1360
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7af0771c-bed1-4cbb-8122-01ec2d8b4664",
"name": "Slack Duplicate Notification",
"type": "n8n-nodes-base.gmail",
"position": [
1460,
440
],
"parameters": {},
"typeVersion": 2.1
},
{
"id": "a5ef8a35-ea86-466a-bb6b-2f3ef72acab7",
"name": "Error Notification",
"type": "n8n-nodes-base.gmail",
"position": [
1460,
1400
],
"parameters": {},
"typeVersion": 2.1
},
{
"id": "6ca4d2d7-536c-4229-ac19-39dcb0853c4c",
"name": "Delete old Doc",
"type": "n8n-nodes-base.supabase",
"position": [
1460,
740
],
"parameters": {},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "98d0c000-5d9b-419b-aa7c-e98a9f0a90e2",
"name": "Extract from TXT",
"type": "n8n-nodes-base.extractFromFile",
"position": [
3000,
380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a53ca5ed-b9f0-4f9e-bb55-017dc5ed1451",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1880,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "a1c76c00-0bed-48f0-ad8c-f686d5186222",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1620,
-40
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "71f8678a-ef8b-40ef-a3ef-3ee90afe65dc",
"name": "RAG AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-880,
700
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "7c7ebb71-1699-46a5-a756-cf2589815dc8",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1460,
1180
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "510482ba-030b-4777-9740-bf8993dce021",
"name": "Postgres Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
-1280,
1180
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "223791e6-5148-47cd-aab6-ca9cb20b7017",
"name": "List Documents",
"type": "n8n-nodes-base.postgresTool",
"position": [
-1060,
1180
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "25cc4ca1-4910-4ae7-a755-c5611946c325",
"name": "Query Document Rows",
"type": "n8n-nodes-base.postgresTool",
"position": [
-620,
1180
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "194c1ee8-1c21-4a1d-b8d2-9991dc8133fd",
"name": "Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"position": [
3440,
860
],
"parameters": {},
"typeVersion": 1
},
{
"id": "f311ab63-88fa-413a-8ba9-aa866e1fb5f0",
"name": "Insert Table Rows",
"type": "n8n-nodes-base.postgres",
"position": [
2780,
940
],
"parameters": {},
"typeVersion": 2.6
},
{
"id": "529e05ca-0494-4eb3-b0f4-275ba252f646",
"name": "Delete Old Data Rows",
"type": "n8n-nodes-base.supabase",
"position": [
1680,
740
],
"parameters": {},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "d1702791-fe65-4068-982b-8b378f9c2e0a",
"name": "Set Error Type",
"type": "n8n-nodes-base.set",
"position": [
1020,
1200
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "23a05be3-2b40-400b-b8d4-21ee6db78ac4",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-1440,
720
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "89262c14-2910-4a9d-b86a-84c015e0daa5",
"name": "Edit Fields2",
"type": "n8n-nodes-base.set",
"position": [
-1180,
700
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "2325e26f-6237-4128-bead-17e0a9ccb50d",
"name": "Supabase Vector Store2",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
-460,
840
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "1289b037-7bc9-4d13-9516-328f1f781c14",
"name": "Embeddings OpenAI2",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-240,
1060
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "3d15f7db-e7b7-4bb7-a5f7-9962f3a81051",
"name": "Get Full Document Text - Get File Contents",
"type": "n8n-nodes-base.postgresTool",
"position": [
-820,
1180
],
"parameters": {},
"typeVersion": 2.6
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "0c6700ed-433f-46ca-8907-c2f4f94adfda",
"connections": {
"Switch": {
"main": [
[
{
"node": "Extract from File PDF",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from TXT",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from CSV",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from XLSX",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from RTF",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from DOC",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Summarize",
"type": "main",
"index": 0
}
]
]
},
"Summarize": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
},
{
"node": "Set Schema",
"type": "main",
"index": 0
}
]
]
},
"Set Schema": {
"main": [
[
{
"node": "Schema Document Metadata",
"type": "main",
"index": 0
}
]
]
},
"Set File ID": {
"main": [
[
{
"node": "Validate File",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields2": {
"main": [
[
{
"node": "RAG AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Error Logger": {
"main": [
[
{
"node": "Error Notification",
"type": "main",
"index": 0
}
]
]
},
"File Created": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Debug File ID": {
"main": [
[
{
"node": "Delete old Doc",
"type": "main",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Log Duplicate": {
"main": [
[
{
"node": "Slack Duplicate Notification",
"type": "main",
"index": 0
}
]
]
},
"Validate File": {
"main": [
[
{
"node": "Check for Duplicates",
"type": "main",
"index": 0
}
],
[
{
"node": "Set Error Type",
"type": "main",
"index": 0
}
]
]
},
"Delete old Doc": {
"main": [
[
{
"node": "Delete Old Data Rows",
"type": "main",
"index": 0
}
]
]
},
"List Documents": {
"ai_tool": [
[
{
"node": "RAG AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Set Error Type": {
"main": [
[
{
"node": "Error Logger",
"type": "main",
"index": 0
}
]
]
},
"Update to File": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Insert Metadata": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Set File ID",
"type": "main",
"index": 0
}
]
]
},
"Extract from CSV": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
},
{
"node": "Insert Table Rows",
"type": "main",
"index": 0
}
]
]
},
"Extract from DOC": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Extract from RTF": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Extract from TXT": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Extract from XLSX": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
},
{
"node": "Insert Table Rows",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "RAG AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings OpenAI2": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store2",
"type": "ai_embedding",
"index": 0
}
]
]
},
"IF Duplicate Check": {
"main": [
[
{
"node": "Log Duplicate",
"type": "main",
"index": 0
}
],
[
{
"node": "Debug File ID",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Supabase Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Query Document Rows": {
"ai_tool": [
[
{
"node": "RAG AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Check for Duplicates": {
"main": [
[
{
"node": "IF Duplicate Check",
"type": "main",
"index": 0
}
]
]
},
"Delete Old Data Rows": {
"main": [
[
{
"node": "Insert Metadata",
"type": "main",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "RAG AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Extract from File PDF": {
"main": [
[
{
"node": "Supabase Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Supabase Vector Store": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Supabase Vector Store2": {
"ai_tool": [
[
{
"node": "RAG AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Edit Fields2",
"type": "main",
"index": 0
}
]
]
},
"Get Full Document Text - Get File Contents": {
"ai_tool": [
[
{
"node": "RAG AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This n8n workflow automates the process of ingesting files from Google Drive into a Supabase database, preparing them for a knowledge base system. It supports text-based files (PDF, DOCX, TXT, etc.) and tabular data (XLSX, CSV, Google Sheets), extracting content, generating…
Source: https://n8n.io/workflows/3799/ — 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.
A lightweight, self-hosted AI assistant built entirely in n8n. Multi-channel messaging (Telegram, WhatsApp, Gmail), persistent memory, task management, and autonomous work — all in a single visual wor
Your AI workforce is ready. Are you?
This intelligent chatbot leverages cutting-edge financial APIs and AI-driven analysis to deliver comprehensive stock research reports. Get instant access to professional-grade investment analysis that
This advanced n8n workflow automates the full lead enrichment, qualification, and personalized outreach process tailored specifically for the B2B real estate sector. Integrating top platforms like Api
This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, th