Supabase vector DB as a tool retrieval

Describe the problem/error/question

Unable to retrieve from supabase vector DB node. Insert works fine, Supabase setup is all correct. Tested with meta data search and without but nothing comes back. Embeddings works fine, small embeddings setting. Running latest version (1.108.1), deleted and added node again but nothing works.

What is the error message (if any)?

Error searching for documents: 42P01 relation “documents” does not exist null

Please share your workflow

Share the output returned by the last node

Json is empty (I think this may be part of the problem), but embeddings are showing.

Information on your n8n setup

  • 1.108.1
  • Supabase vector DB, table name documents set up as per quick start guide
  • n8n EXECUTIONS_PROCESS setting: default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: Mac

Hey @Jeroen_van_Amerongen hope all is good. Welcome to the community.

Could you show us the matching function you have in Supabase?

Thanks! And thanks for the quick response. I’m not sure this is exactly what you’re referring to, let me know if it isn’t.

Here, we are looking for this guy -

called match_documents. Click on three dots and then edit function. Copy and share here.

Got it, that’s super helpful. Here it is.

Again, not sure if it’s relevant, but there’s quite a few other functions in there in addition to the match_documents one. FYI I am using lovable for front end and it has made a lot of changes to the supabase DB functions, policies etc because of security profile.

Ok, now show me the configuration of your Supabase vector store Node.

Her eit is, vector store node and embeddings node

Did you make any changes to the schema of the documents table or modified the definition of the match_documents function?

One thing you could try if you don’t have much information in the table yet - delete both documents table and match_documents function and recreate them (langchain template in SQL Editor).

Also, can you share your workflow instead of a screenshot?

1 Like

Sorry for delay in response! You have been very helpful. I got it working again. I’m almost embarrassed to admit it but it was a credential issue. I used two different openAI credential for the node and embeddings node. At least I have gained a lot of knowledge about how vector DBs works, how to query functions in supabase, how to look through logs etc etc. Apologies for wasting your time!

No worries at all, you learned something new - this is already not a waste of time. Glad this is resolved.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.