Automated Crawling & Supabase Vector Store: Ensuring `client_id` is a Proper Column and Auto-Trigger from New Rows




Describe the problem/error/question

We want a fully automated workflow in n8n that:

  1. Watches our Supabase database for new website URLs submitted by clients.
  2. Triggers a site-crawling routine (via an external crawler) to scrape text.
  3. Inserts the scraped text into our Supabase Vector Store with a valid client_id in its own column. Our documents table has a client_id (NOT NULL, references auth.users(id)), plus content, metadata, and embedding.

Currently, the “Default Data Loader” → “Supabase Vector Store” AI sub-flow often forces client_id into metadata or treats it as null. This violates the constraint:

Error inserting: null value in column “client_id” of relation “documents” violates not-null constraint

We also want to trigger this workflow automatically whenever a new row (URL) is inserted into Supabase (rather than manual triggers). Essentially, we need help with:

• How to store client_id properly as a separate column instead of having it show up as metadata or null.
• How to set up an automatic trigger so that when a new row is added to our “URLs” table, the entire crawl + insert process kicks off without manual intervention.

What is the error message (if any)?

Error inserting: null value in column “client_id” of relation “documents” violates not-null constraint (400 Bad Request)

Please share your workflow

We’ll attach a screenshot showing the chain:

• Data is crawled.
• A “Default Data Loader” node processes the text.
• The “Supabase Vector Store” node tries to insert it.
• Our attempts to pass client_id (via “Set” or “Code” node) either lump it into content/metadata or lose it, causing the NOT NULL constraint to fail.

Share the output returned by the last node

Can see it in the pictures

We’d really appreciate guidance on:

  1. Keeping client_id as a proper column during an AI sub-flow (Default Data Loader → Supabase Vector Store).
  2. Setting up an automatic trigger whenever a new record is added in Supabase (so we don’t have to run or schedule the workflow manually).

Information on your n8n setup

  • **n8n version: 0.224.5
  • Database (default: SQLite): SQLite
  • **n8n EXECUTIONS_PROCESS own
  • **Running n8n via Docker
  • **Operating system: Windows 11

Thank you in advance!