{ "name": "Supabase Tuto", "nodes": [ { "parameters": { "mode": "insert", "tableName": { "__rl": true, "value": "documents", "mode": "list", "cachedResultName": "documents" }, "options": {} }, "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase", "typeVersion": 1.3, "position": [ -1280, 192 ], "id": "c803bee6-9124-4299-85e0-4fe0ae3520fb", "name": "Supabase Vector Store", "notesInFlow": false, "credentials": { "supabaseApi": { "id": "4llBlQkaC2jnOC5b", "name": "Supabase account" } } }, { "parameters": { "operation": "download", "fileId": { "__rl": true, "value": "={{ $json.webViewLink }}", "mode": "url" }, "options": {} }, "type": "n8n-nodes-base.googleDrive", "typeVersion": 3, "position": [ -1744, 192 ], "id": "837f15e5-995f-4042-bccd-42998ff89ea6", "name": "Download file", "credentials": { "googleDriveOAuth2Api": { "id": "js3ZdPwUaIaLYxkc", "name": "Google Drive account 3" } } }, { "parameters": { "textSplittingMode": "custom", "options": {} }, "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader", "typeVersion": 1.1, "position": [ -1184, 416 ], "id": "e7b3e926-21d8-4b2f-adbd-8b87e82353cc", "name": "Default Data Loader" }, { "parameters": { "pollTimes": { "item": [ { "mode": "everyMinute" } ] }, "triggerOn": "specificFolder", "folderToWatch": { "__rl": true, "value": "1hc9lrly9U9ysABXuiOreE2HDplugjEdA", "mode": "list", "cachedResultName": "Restaurant", "cachedResultUrl": "https://drive.google.com/drive/folders/1hc9lrly9U9ysABXuiOreE2HDplugjEdA" }, "event": "fileCreated", "options": {} }, "type": "n8n-nodes-base.googleDriveTrigger", "typeVersion": 1, "position": [ -1952, 192 ], "id": "56d2d9f3-bbaf-4104-bf9f-d054f8445538", "name": "Google Drive Trigger", "credentials": { "googleDriveOAuth2Api": { "id": "js3ZdPwUaIaLYxkc", "name": "Google Drive account 3" } } }, { "parameters": { "options": {} }, "type": "@n8n/n8n-nodes-langchain.chatTrigger", "typeVersion": 1.4, "position": [ -2768, 672 ], "id": "307ef1ef-895a-4252-868b-2011b0f999f3", "name": "When chat message received", "webhookId": "dadf3ecd-8b8f-49f2-9083-c9a21629835d" }, { "parameters": { "options": { "systemMessage": "=You are a helpful Restaurant assistant.\n\n# You have access to \"supabase Vector store - tool\" \nUse the tool to retrieve data from the Supabase database.\n\n# Your task is to answer users according to the data in the supabase table.\n\n!! Answer only from the database table !!\n!! If you don't find the information in the database answer with : \"I don't have that information in the moment\" !!\n\n\n## Always check the \"Supabase Vector Store - tool\" before answering the users " } }, "type": "@n8n/n8n-nodes-langchain.agent", "typeVersion": 3.1, "position": [ -2496, 672 ], "id": "30f4f2fa-352e-4925-9f85-a6c0e072d534", "name": "AI Agent" }, { "parameters": { "model": { "__rl": true, "mode": "list", "value": "gpt-4.1-mini" }, "builtInTools": {}, "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.3, "position": [ -2544, 896 ], "id": "42d014f2-d6ad-43ae-b0e2-211c15f7ecfc", "name": "OpenAI Chat Model", "credentials": { "openAiApi": { "id": "k9LlgnkWoOMbNkRw", "name": "OpenAi account 5" } } }, { "parameters": {}, "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", "typeVersion": 1.3, "position": [ -2416, 896 ], "id": "77f0cbf7-2dec-4bf2-b071-4dd25aaf1d90", "name": "Simple Memory", "disabled": true }, { "parameters": { "mode": "retrieve-as-tool", "toolDescription": "use this node to get data from the database table ", "tableName": { "__rl": true, "value": "documents", "mode": "list", "cachedResultName": "documents" }, "topK": 50, "options": {} }, "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase", "typeVersion": 1.3, "position": [ -2288, 896 ], "id": "cc78e8e0-8515-49a4-a150-91cc8b0e2802", "name": "Supabase Vector Store1", "credentials": { "supabaseApi": { "id": "4llBlQkaC2jnOC5b", "name": "Supabase account" } } }, { "parameters": { "options": {} }, "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi", "typeVersion": 1.2, "position": [ -1312, 416 ], "id": "04647549-7c7e-428c-a5c1-0c26cb9bece2", "name": "Embeddings OpenAI1", "credentials": { "openAiApi": { "id": "k9LlgnkWoOMbNkRw", "name": "OpenAi account 5" } } }, { "parameters": { "options": {} }, "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter", "typeVersion": 1, "position": [ -1104, 624 ], "id": "6ade9934-42ab-4ea8-a2cf-d81e0b1f6021", "name": "Recursive Character Text Splitter" }, { "parameters": { "operation": "xls", "options": {} }, "type": "n8n-nodes-base.extractFromFile", "typeVersion": 1.1, "position": [ -1504, 192 ], "id": "143b7e24-493d-49c0-a3dd-5b3f6f6ef4e3", "name": "Extract from File" }, { "parameters": { "content": "# AI Agent\n## The AI Agent answers users queries through SUPABASE DB Table", "height": 640, "width": 864, "color": 4 }, "type": "n8n-nodes-base.stickyNote", "position": [ -2848, 432 ], "typeVersion": 1, "id": "722d8743-3172-454e-a290-abdfb4ed1b14", "name": "Sticky Note" }, { "parameters": { "content": "# Supabase Insert \n ## Inserting Data using Google Drive and Extract from file ", "height": 720, "width": 1168, "color": 5 }, "type": "n8n-nodes-base.stickyNote", "position": [ -2096, 0 ], "typeVersion": 1, "id": "0360f767-e406-4e14-a134-12516dfac7fe", "name": "Sticky Note1" } ], "pinData": {}, "connections": { "Download file": { "main": [ [ { "node": "Extract from File", "type": "main", "index": 0 } ] ] }, "Default Data Loader": { "ai_document": [ [ { "node": "Supabase Vector Store", "type": "ai_document", "index": 0 } ] ] }, "Google Drive Trigger": { "main": [ [ { "node": "Download file", "type": "main", "index": 0 } ] ] }, "When chat message received": { "main": [ [ { "node": "AI Agent", "type": "main", "index": 0 } ] ] }, "OpenAI Chat Model": { "ai_languageModel": [ [ { "node": "AI Agent", "type": "ai_languageModel", "index": 0 } ] ] }, "Simple Memory": { "ai_memory": [ [ { "node": "AI Agent", "type": "ai_memory", "index": 0 } ] ] }, "Supabase Vector Store1": { "ai_tool": [ [ { "node": "AI Agent", "type": "ai_tool", "index": 0 } ] ] }, "Embeddings OpenAI1": { "ai_embedding": [ [ { "node": "Supabase Vector Store1", "type": "ai_embedding", "index": 0 }, { "node": "Supabase Vector Store", "type": "ai_embedding", "index": 0 } ] ] }, "Recursive Character Text Splitter": { "ai_textSplitter": [ [ { "node": "Default Data Loader", "type": "ai_textSplitter", "index": 0 } ] ] }, "Extract from File": { "main": [ [ { "node": "Supabase Vector Store", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1", "availableInMCP": false }, "versionId": "b5f398d3-66e6-4c87-8d70-6e766b25f7a7", "meta": { "templateCredsSetupCompleted": true, "instanceId": "23830929e6c018b604abb710d12ca57ce411c63a552f9a21234ab1d153211b0b" }, "id": "PAONzatv4oAkwS_l99DAx", "tags": [] }