Vector store metadata filtering - no access to variables

Describe the problem/error/question

The vector store retriever node in front of any vector store doesn’t allow access to any variables. Curious to know how to work around this to filter on metadata properties.

What is the error message (if any)?

The expression uses data in the node ‘user’ but there is no path back to it. Please check this node is connected to it (there can be other nodes in between).

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.22.6
  • **Database (default: SQLite):Postgres
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker

Hi @Cees_de_Kort :wave: Thanks so much for sharing your workflow, and that information!

This may be another one for @oleg when he’s back in office, but often these issues are from an incorrect database setup :sweat_smile: Can you check out this post from earlier, and see if your database / table might need some adjustments?

I highly doubt it, since it holds true for any other database. I suspect it has to do with how the vector retrieval tool is an intermediary node and blocks access to the variables.

@oleg any update on this?

Kind regards

Hi Cees, using .first().json in stead of .item.json did the trick for me. Credits to ERROR: Can’t get data for expression under ‘Values to Set > String’ field - #2 by honzapav


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