Supabase with n8n: Database, Auth, and Vector Store in One
Supabase in n8n: database, auth backend, and vector store for RAG in one system, including common setup pitfalls.

Supabase can be used in n8n in three ways: as a classic Postgres database via the Supabase node, as a vector store for AI applications like RAG chatbots, and indirectly as an auth backend when your own applications access the same Supabase instance. For a company, this means one database for master data and for embeddings, instead of maintaining two separate services. As of: August 2026.
How do you integrate Supabase as a regular database in n8n?
The regular Supabase node covers the basic operations on a table: create a row, delete, read, retrieve multiple rows, and update. It works by default in the `public` schema, but can be switched to other schemas. If the functionality isn't enough for a use case, the same credentials can also be reused in an HTTP Request node for direct API calls.
How are the credentials set up correctly?
For the Supabase credentials in n8n two pieces of information are needed: the host as a project URL in the format `https://your_project.supabase.co` without the path `/rest/v1`, and a secret key from the project settings. Important for existing workflows: according to the documentation, the classic `service_role` key still works, but Supabase is gradually switching to new secret keys and plans to shut down the old `service_role` keys by the end of 2026. Anyone setting up a new project now should use the new secret key directly.
How does the Supabase Vector Store work for RAG applications?
The Supabase Vector Store node supports five modes: retrieving multiple documents via similarity search, inserting documents, providing a vector store for a chain or as a tool for an AI agent, and updating existing entries. When integrated as a tool, an agent can access the vector store independently if the store's name and description match the query. For this, the node needs a matching function in the database, which, according to the documentation, is called `match_documents` by default when following the Supabase quickstart.
What is needed on the Supabase side for the vector store?
On the Supabase side, the pgvector extension must first be enabled, either via the dashboard or via SQL command (`create extension vector with schema extensions`). After that, a table with a vector column is needed, whose dimension must match the embedding model used. For queries, Supabase recommends encapsulating the similarity search in a Postgres function, because PostgREST does not directly support the pgvector operators; the cosine distance operator is commonly used here. Supabase also points out that embeddings with fewer dimensions tend to perform better and that embeddings from the same model should always be used for comparability.
Which errors come up most often in practice?
The most commonly documented error in the n8n community is a violated not-null constraint on insert: a user reported in the thread Error in Supabase Vector Store when trying to add documents a message that a column named "brand" did not accept a null value, because their table schema deviated from the Supabase default template. The solution suggested in the forum was to remove the not-null constraint on this column directly in the table editor, since the vector store node only fills in the fields it knows. Anyone deviating from the Supabase quickstart should, according to the documentation, understand exactly which parameters they are changing, since deviations from the default template are the most common source of errors with this node.
Who benefits from Supabase as a combined solution?
For companies that already need a Postgres database for master data and are also planning a knowledge assistant or chatbot, Supabase saves the effort of maintaining a separate vector service. Anyone who only needs a simple similarity search without relational data may reach their goal faster with a dedicated vector store. NordFlux frequently uses exactly this combination of Postgres and pgvector in customer projects with knowledge assistants; more on this at /leistungen/ki-agenten.
Frequently asked questions about Supabase with n8n
Can I use the same Supabase node for regular data and for vectors?
No, these are two separate nodes in n8n: the regular Supabase node for row operations and the Supabase Vector Store node for similarity search and AI applications. Both, however, access the same Supabase database and can be connected with the same credentials.
Do I have to enable the pgvector extension manually?
Yes, pgvector is a Postgres extension that must be enabled either via the Supabase dashboard or via SQL command before a table can contain a vector column. Without this step, creating the table fails.
What does the shutdown of the old service_role keys mean for existing n8n workflows?
Existing workflows with a service_role key will, according to Supabase, continue to work for now, but should be switched to the new secret key before the end of 2026. Anyone who updates the credentials in n8n in good time avoids an unplanned connection outage.
Why do I get a not-null error message when inserting documents?
This typically happens when your own table deviates from the Supabase quickstart schema and contains a required column that the vector store node does not fill in. The common solution is either to remove the constraint or to give the table a default value for this column.
Simon Glowik
Founder of NordFlux. Spent four years automating processes at enterprise scale at Dräger, and now brings that depth to the mid-market — pragmatic and with full data sovereignty.
Certifications
- Microsoft certified — PL-900 and AZ-900
- UiPath certified — Automation Developer Associate
- UiPath zertifiziert — Automation Developer Associate
Concrete questions about automation or AI?
In a free 30-minute initial call we discuss your case directly. No strings attached.