Error in Supabase Vector Store Node

I am having the following error when trying to load data into a Supabase Vector Store - " Problem in node ‘Supabase Vector Store‘

Error inserting: null value in column “brand” of relation “comments” violates not-null constraint 400 Bad Request"

Problem in node ‘Supabase Vector Store‘

Error inserting: null value in column “brand” of relation “comments” violates not-null constraint 400 Bad Request

‘’’
{
“nodes”: [
{
“parameters”: {
“rule”: {
“interval”: [
{
“field”: “weeks”,
“triggerAtMinute”: 50
}
]
}
},
“type”: “n8n-nodes-base.scheduleTrigger”,
“typeVersion”: 1.2,
“position”: [
0,
0
],
“id”: “dbdae23d-d190-4bc2-8086-625d17f7e434”,
“name”: “Schedule Trigger”
},
{
“parameters”: {
“authentication”: “airtableOAuth2Api”,
“operation”: “search”,
“base”: {
“__rl”: true,
“value”: “appy0gMIWFNyEBddG”,
“mode”: “list”,
“cachedResultName”: “Social Analytics”,
“cachedResultUrl”: “Airtable
},
“table”: {
“__rl”: true,
“value”: “tblZAM0oCgTDGCV0B”,
“mode”: “list”,
“cachedResultName”: “Comment DB”,
“cachedResultUrl”: “Airtable
},
“filterByFormula”: “{Sort} = "Comment"”,
“options”: {}
},
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 2.1,
“position”: [
200,
120
],
“id”: “2789598e-cc8c-4bb0-b655-b58b5ef9248c”,
“name”: “Get Comments”,
“credentials”: {
“airtableOAuth2Api”: {
“id”: “MUffYFxlSmQ8d6hC”,
“name”: “Airtable Personal Access Token account 2”
}
}
},
{
“parameters”: {
“authentication”: “airtableOAuth2Api”,
“operation”: “search”,
“base”: {
“__rl”: true,
“value”: “appy0gMIWFNyEBddG”,
“mode”: “list”,
“cachedResultName”: “Social Analytics”,
“cachedResultUrl”: “Airtable
},
“table”: {
“__rl”: true,
“value”: “tblZAM0oCgTDGCV0B”,
“mode”: “list”,
“cachedResultName”: “Comment DB”,
“cachedResultUrl”: “Airtable
},
“filterByFormula”: “{Sort} = "Post"”,
“options”: {}
},
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 2.1,
“position”: [
200,
-80
],
“id”: “b2a94667-b132-4b60-aa38-f3ec61c877f7”,
“name”: “Get Posts”,
“credentials”: {
“airtableOAuth2Api”: {
“id”: “MUffYFxlSmQ8d6hC”,
“name”: “Airtable Personal Access Token account 2”
}
}
},
{
“parameters”: {
“authentication”: “airtableOAuth2Api”,
“operation”: “deleteRecord”,
“base”: {
“__rl”: true,
“value”: “appy0gMIWFNyEBddG”,
“mode”: “list”,
“cachedResultName”: “Social Analytics”,
“cachedResultUrl”: “Airtable
},
“table”: {
“__rl”: true,
“value”: “tblZAM0oCgTDGCV0B”,
“mode”: “list”,
“cachedResultName”: “Comment DB”,
“cachedResultUrl”: “Airtable
},
“id”: “={{ $json.id }}”
},
“type”: “n8n-nodes-base.airtable”,
“typeVersion”: 2.1,
“position”: [
420,
-80
],
“id”: “3976b52e-7df4-431f-8011-cdf6a4b54d13”,
“name”: “Delete Posts”,
“credentials”: {
“airtableOAuth2Api”: {
“id”: “MUffYFxlSmQ8d6hC”,
“name”: “Airtable Personal Access Token account 2”
}
}
},
{
“parameters”: {
“mode”: “insert”,
“tableName”: {
“__rl”: true,
“value”: “comments”,
“mode”: “list”,
“cachedResultName”: “comments”
},
“options”: {
“queryName”: “match_documents”
}
},
“type”: “@n8n/n8n-nodes-langchain.vectorStoreSupabase”,
“typeVersion”: 1,
“position”: [
400,
120
],
“id”: “b2cb4f5c-c1f2-4f23-aedd-9aeb5baaafc5”,
“name”: “Supabase Vector Store”,
“credentials”: {
“supabaseApi”: {
“id”: “EfxEQRScXUT1vdMe”,
“name”: “MGA Comment DB”
}
}
},
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.embeddingsOpenAi”,
“typeVersion”: 1.1,
“position”: [
380,
300
],
“id”: “4cc2df01-bbc8-4b6b-86de-0e61f780ddba”,
“name”: “Embeddings OpenAI”,
“credentials”: {
“openAiApi”: {
“id”: “LMbYfzAeyJVuquu7”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“jsonMode”: “expressionData”,
“jsonData”: “={\n "id": "{{ $json.id }}",\n "content": "{{ $json.Text }}",\n "brand": "{{ $json.Brand }}",\n "week_start": "{{ $json[‘Start Date’] }}",\n "week_end": "{{ $json[‘End Date’] }}"\n}”,
“options”: {
“metadata”: {
“metadataValues”: [
{
“name”: “guid”,
“value”: “={{ $json.guid }}”
},
{
“name”: “createdTime”,
“value”: “={{ $json.createdTime }}”
}
]
}
}
},
“type”: “@n8n/n8n-nodes-langchain.documentDefaultDataLoader”,
“typeVersion”: 1,
“position”: [
600,
300
],
“id”: “9f2cb82e-d7b8-4a40-aa4d-5df7346edcc5”,
“name”: “Default Data Loader”
},
{
“parameters”: {
“chunkSize”: 500,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter”,
“typeVersion”: 1,
“position”: [
620,
480
],
“id”: “214df9a8-3eff-4d3b-bf5b-d5f3eb3ad6fc”,
“name”: “Recursive Character Text Splitter”
}
],
“connections”: {
“Schedule Trigger”: {
“main”: [
[
{
“node”: “Get Comments”,
“type”: “main”,
“index”: 0
},
{
“node”: “Get Posts”,
“type”: “main”,
“index”: 0
}
]
]
},
“Get Comments”: {
“main”: [
[
{
“node”: “Supabase Vector Store”,
“type”: “main”,
“index”: 0
}
]
]
},
“Get Posts”: {
“main”: [
[
{
“node”: “Delete Posts”,
“type”: “main”,
“index”: 0
}
]
]
},
“Embeddings OpenAI”: {
“ai_embedding”: [
[
{
“node”: “Supabase Vector Store”,
“type”: “ai_embedding”,
“index”: 0
}
]
]
},
“Default Data Loader”: {
“ai_document”: [
[
{
“node”: “Supabase Vector Store”,
“type”: “ai_document”,
“index”: 0
}
]
]
},
“Recursive Character Text Splitter”: {
“ai_textSplitter”: [
[
{
“node”: “Default Data Loader”,
“type”: “ai_textSplitter”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “326d2059ae881b89c45f7eb1a595ebabf20ba095f305b0382e490ea8f6bd44de”
}
}
‘’’

The supabase database is set up with the following columns;
id (text), content (text), brand (text), week_start (Date), week_end (date), metadata (blob) and embeddings

Information on your n8n setup

  • N8N Version - 1.79.2
  • **Database Supabase
  • n8n EXECUTIONS_PROCESS default
  • Running n8n via Railway.app cloud hosted:
  • Operating system:Mac OS Sequoia

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Go to your comments table and edit the column brand:

Then enable Allow Nullable option


.
:muscle: If my reply answers your question, please remember to mark it as a solution.

I’m having a very similar issue and unfortunately @solomon this solution is not helping as i need to pass in some metadata together with the file. For example i have a system that contains multiple properties and each property will have it’s own rules document. The file upload to the vector store must be able to include what property the document belongs to, but i’m not able to pass anything else than the pure text as the text splitter remove everything else than the text document content. So even if i would allow NULL the information would still be missing.

Hi @Fredrik_Jansson

Can you please create a topic detailing your issue?
Some screenshots and sharing your workflow would be helpful too!

You can send me the link to your topic in my DMs, if you want. I’ll go there and help you out =)