Supabase Vector Store1 returns empty results (response: []) even though data exists in Supabase
Environment
-
n8n workflow name:
Ultimate Agentic RAG copy -
Key nodes involved:
-
When chat message received→Edit Fields→RAG AI Agent -
Supabase Vector Store1(@n8n/n8n-nodes-langchain.vectorStoreSupabase, mode:retrieve-as-tool) -
Embeddings Google Gemini1(connected toSupabase Vector Store1asai_embedding, credentials:Gemini 0301) -
Ingestion path : Google Drive Trigger →
Download File→ typeSwitch→ extraction → chunking →Insert into Supabase Vectorstore(same table + queryName) withEmbeddings Google Gemini
-
Problem Description
When my agent calls the tool backed by Supabase Vector Store1, the node returns an empty array in response, despite the vector table containing data and being queryable directly in Supabase.
Example run:
-
Input to
Supabase Vector Store1: JSON {“query”: {“input”: “stock 403050”}} -
Output from
Supabase Vector Store1: {“response”: }
However, I can see rows present in Supabase in the configured table.
Configuration Details (Supabase Vector Store1)
-
Type:
@n8n/n8n-nodes-langchain.vectorStoreSupabase -
Mode:
retrieve-as-tool -
toolName:
documents -
toolDescription: (present)
-
tableName:
"base de connaissance"(note: contains a space) -
options.queryName:
match_documents -
Credentials:
supabaseApi(valid) -
ai_embedding: connected to Embeddings Google Gemini1 (same provider as used during ingestion)
What I Expect
- Passing a query like
"stock 403050"should compute a query embedding and return the top‑k matching rows (chunks) from Supabase, not an empty list—at least when a low/zero similarity threshold is used and data exists.
What Happens Instead
-
The node completes successfully (no error) but returns
response: []. -
My workflow
-
Thanks for your help

`{
"nodes": [
{
"parameters": {
"jsonMode": "expressionData",
"jsonData": "={{ $json.data || $json.text || $json.concatenated_data }}",
"options": {
"metadata": {
"metadataValues": [
{
"name": "=file_id",
"value": "={{ $('Set File ID').first().json.file_id }}"
},
{
"name": "file_title",
"value": "={{ $('Set File ID').first().json.file_title }}"
}
]
}
}
},
"id": "1879fb8c-09c7-4570-9399-98a793ab16e8",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"typeVersion": 1,
"position": [
720,
976
]
},
{
"parameters": {
"content": "## Agent Tools for RAG",
"height": 433,
"width": 583,
"color": 4
},
"id": "910033b8-4887-4262-bfd9-9ae24449f179",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
64,
64
]
},
{
"parameters": {
"content": "## Tool to Add a Google Drive File to Vector DB",
"height": 851,
"width": 1969,
"color": 5
},
"id": "61e14430-3df1-477e-86e0-27b686ff9b27",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1008,
528
]
},
{
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "={{ $('Set File ID').item.json.file_id }}",
"mode": "id"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "text/plain"
}
}
}
},
"id": "9fa79f4d-a7b0-4dac-819a-2ef45a6c6c6a",
"name": "Download File",
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-640,
784
],
"executeOnce": true,
"credentials": {
"googleDriveOAuth2Api": {
"id": "6mgxVnZ1vyzF85zy",
"name": "Drive Voixia.test"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"value": "1Z8T8keewWMt-PqgAjTFve_fXl1J6fIKO",
"mode": "list",
"cachedResultName": "Excel",
"cachedResultUrl": "https://drive.google.com/drive/folders/1Z8T8keewWMt-PqgAjTFve_fXl1J6fIKO"
},
"event": "fileCreated",
"options": {}
},
"id": "c7e7423e-17f2-4ad2-81cb-7f8013dfc5db",
"name": "File Created",
"type": "n8n-nodes-base.googleDriveTrigger",
"typeVersion": 1,
"position": [
-992,
704
],
"credentials": {
"googleDriveOAuth2Api": {
"id": "6mgxVnZ1vyzF85zy",
"name": "Drive Voixia.test"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"value": "1HtaIIK3kWwjbwhsmEbtJ-upalxVn3Ek9",
"mode": "list",
"cachedResultName": "n8n Documents",
"cachedResultUrl": "https://drive.google.com/drive/folders/1HtaIIK3kWwjbwhsmEbtJ-upalxVn3Ek9"
},
"event": "fileUpdated",
"options": {}
},
"id": "e7d19c91-624a-4dac-9eca-a25aba37dc2b",
"name": "File Updated",
"type": "n8n-nodes-base.googleDriveTrigger",
"typeVersion": 1,
"position": [
-992,
864
],
"credentials": {
"googleDriveOAuth2Api": {
"id": "6mgxVnZ1vyzF85zy",
"name": "Drive Voixia.test"
}
}
},
{
"parameters": {
"operation": "text",
"binaryPropertyName": "=data",
"options": {
"keepSource": "json"
}
},
"id": "18431db2-799c-4a1c-8f34-d1c011840f14",
"name": "Extract Document Text",
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
48,
1088
],
"alwaysOutputData": true
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "10646eae-ae46-4327-a4dc-9987c2d76173",
"name": "file_id",
"value": "={{ $json.id }}",
"type": "string"
},
{
"id": "f4536df5-d0b1-4392-bf17-b8137fb31a44",
"name": "file_type",
"value": "={{ $json.mimeType }}",
"type": "string"
},
{
"id": "77d782de-169d-4a46-8a8e-a3831c04d90f",
"name": "file_title",
"value": "={{ $json.name }}",
"type": "string"
},
{
"id": "9bde4d7f-e4f3-4ebd-9338-dce1350f9eab",
"name": "file_url",
"value": "={{ $json.webViewLink }}",
"type": "string"
}
]
},
"options": {}
},
"id": "cab624fa-72c4-4e32-bda2-86e74277b75d",
"name": "Set File ID",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-816,
784
]
},
{
"parameters": {
"content": "## RAG AI Agent with Chat Interface",
"height": 433,
"width": 1036
},
"id": "af87124b-9f95-472d-9560-c27409cc4cec",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-992,
64
]
},
{
"parameters": {
"public": true,
"options": {}
},
"id": "03f679a1-945c-4fb1-953c-0b67b0347597",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
-976,
144
],
"webhookId": "7dbf2f17-5eb3-4752-b884-da3581fb1677"
},
{
"parameters": {
"operation": "pdf",
"options": {}
},
"id": "efd9d7a1-3a7c-4556-b8f5-c51635f2147f",
"name": "Extract PDF Text",
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
64,
528
]
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"options": {}
},
"id": "dcad0feb-92d6-4a86-ae21-6ada727dd2e5",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
96,
704
]
},
{
"parameters": {},
"id": "342206e7-9200-4860-85c8-be16bd64cce5",
"name": "Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"typeVersion": 1,
"position": [
720,
1200
]
},
{
"parameters": {
"fieldsToSummarize": {
"values": [
{
"aggregation": "concatenate",
"field": "data"
}
]
},
"options": {}
},
"id": "d79cfb60-80c7-4a4a-98e8-ba2d5b552dd5",
"name": "Summarize",
"type": "n8n-nodes-base.summarize",
"typeVersion": 1,
"position": [
304,
784
]
},
{
"parameters": {
"agent": "conversationalAgent",
"promptType": "define",
"text": "={{ $json.chatInput }}",
"options": {}
},
"id": "85ab703f-f88b-4b24-8bc2-e68e2793aefe",
"name": "RAG AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.6,
"position": [
-960,
320
]
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "application/pdf",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"id": "2ae7faa7-a936-4621-a680-60c512163034",
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"id": "fc193b06-363b-4699-a97d-e5a850138b0e",
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "=application/vnd.google-apps.spreadsheet",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"id": "b69f5605-0179-4b02-9a32-e34bb085f82d",
"leftValue": "={{ $('Set File ID').item.json.file_type }}",
"rightValue": "application/vnd.google-apps.document",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
}
}
]
},
"options": {
"fallbackOutput": 3
}
},
"id": "392fe1d8-048e-4792-9994-8abd77ab2661",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
-416,
752
]
},
{
"parameters": {
"mode": "insert",
"tableName": {
"__rl": true,
"value": "base de connaissance",
"mode": "list",
"cachedResultName": "base de connaissance"
},
"options": {
"queryName": "match_documents"
}
},
"id": "e31d536a-647f-43e0-b7bc-3766b8dba519",
"name": "Insert into Supabase Vectorstore",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"typeVersion": 1,
"position": [
576,
784
],
"credentials": {
"supabaseApi": {
"id": "OXnBiDkoq1TuSTRH",
"name": "Supabase account"
}
}
},
{
"parameters": {
"operation": "xlsx",
"options": {}
},
"id": "bc232b25-f6f8-409e-a591-2f825857ec7a",
"name": "Extract from Excel",
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
-112,
704
]
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.extractFromFile",
"typeVersion": 1,
"position": [
-112,
880
],
"id": "7fe59f4f-44c3-4728-b115-b6bd83d02ad5",
"name": "Extract from CSV"
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolName": "documents",
"toolDescription": "Utilise le RAG pour récupérer les informations nécessaires aux questions stock, prix, information sur l'entreprise",
"tableName": {
"__rl": true,
"value": "base de connaissance",
"mode": "list",
"cachedResultName": "base de connaissance"
},
"options": {
"queryName": "match_documents"
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"typeVersion": 1,
"position": [
256,
176
],
"id": "4d07210e-76d4-4137-ad0b-d934717d0f36",
"name": "Supabase Vector Store1",
"credentials": {
"supabaseApi": {
"id": "OXnBiDkoq1TuSTRH",
"name": "Supabase account"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"typeVersion": 1,
"position": [
528,
992
],
"id": "3df1cc97-3f39-4e23-95e5-d3d6e9cf4b1e",
"name": "Embeddings Google Gemini",
"credentials": {
"googlePalmApi": {
"id": "MtB7YkAf4H7dpPda",
"name": "Gemini 0301"
}
}
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1,
"position": [
-560,
352
],
"id": "864665f6-5230-40ea-bc80-794eea70bd9d",
"name": "Google Gemini Chat Model",
"credentials": {
"googlePalmApi": {
"id": "MtB7YkAf4H7dpPda",
"name": "Gemini 0301"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"typeVersion": 1.3,
"position": [
-416,
352
],
"id": "38fdc6ef-30c0-4844-b373-cc7ed46567a0",
"name": "Postgres Chat Memory",
"credentials": {
"postgres": {
"id": "c71yNDtzgF102EmB",
"name": "Postgres voixia.test"
}
}
},
{
"parameters": {
"options": {
"systemMessage": "[IDENTITÉ & MISSION]\nAssistant B2B professionnel. Répond factuellement et propose la prochaine étape.\n\n[POLITIQUE OUTIL]\nAvant de répondre, interroge TOUJOURS l’outil TOOL pour récupérer le contexte et l'information. Si la recherche ne retourne rien, informe-le et propose une alternative (clarification ou escalade).\n\n[TON]\nProfessionnel, courtois, concis, empathique.\n\n[SÉCURITÉ]\nRespecte confidentialité et limites légales.\n\n[SORTIE]\nDonne une réponse brève, cite les points clés du contexte et propose la prochaine étape.\n\n[ERREUR]\nEn cas de question or sujet ou non professionnel, informe la personne que son ton n'est pas professionnel et que tu dois quitter le chat et dis à bientôt "
}
},
"id": "38b569e9-668c-4a07-a011-e85fa3f6c003",
"name": "Agent traitement de la question",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3,
"position": [
-512,
144
]
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"typeVersion": 1,
"position": [
256,
352
],
"id": "b42e6c3a-2ad0-4fe7-b115-832cc3d6673c",
"name": "Embeddings Google Gemini1",
"credentials": {
"googlePalmApi": {
"id": "jen182faSjQMX7dQ",
"name": "Google Gemini(PaLM) Api account"
}
}
}
],
"connections": {
"Default Data Loader": {
"ai_document": [
[
{
"node": "Insert into Supabase Vectorstore",
"type": "ai_document",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"File Created": {
"main": [
[
{
"node": "Set File ID",
"type": "main",
"index": 0
}
]
]
},
"File Updated": {
"main": [
[
{
"node": "Set File ID",
"type": "main",
"index": 0
}
]
]
},
"Extract Document Text": {
"main": [
[
{
"node": "Insert into Supabase Vectorstore",
"type": "main",
"index": 0
}
]
]
},
"Set File ID": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Agent traitement de la question",
"type": "main",
"index": 0
}
]
]
},
"Extract PDF Text": {
"main": [
[
{
"node": "Insert into Supabase Vectorstore",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Summarize",
"type": "main",
"index": 0
}
]
]
},
"Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Summarize": {
"main": [
[
{
"node": "Insert into Supabase Vectorstore",
"type": "main",
"index": 0
}
]
]
},
"RAG AI Agent": {
"main": [
[]
]
},
"Switch": {
"main": [
[
{
"node": "Extract PDF Text",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from Excel",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract from CSV",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract Document Text",
"type": "main",
"index": 0
}
]
]
},
"Insert into Supabase Vectorstore": {
"main": [
[]
]
},
"Extract from Excel": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Extract from CSV": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Supabase Vector Store1": {
"ai_tool": [
[
{
"node": "Agent traitement de la question",
"type": "ai_tool",
"index": 0
}
]
]
},
"Embeddings Google Gemini": {
"ai_embedding": [
[
{
"node": "Insert into Supabase Vectorstore",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Agent traitement de la question",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "Agent traitement de la question",
"type": "ai_memory",
"index": 0
}
]
]
},
"Embeddings Google Gemini1": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "ab594f06d209a48e18a312abd98d457dd0d4a17cae9cc5c5e4ec0d44b71723e6"
}
}