Cannot read properties of undefined (reading 'toString') error in Vector Store node (Pinecone)

Hey there,

I had a simple AI Agent to test things out and it was working just fine - until it wasn’t.

I’m currently getting “Cannot read properties of undefined (reading ‘toString’)” error from Pinecone. What’s wrong?

I use cloud version.

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:

I have an assumption but would be great if someone could confirm.

I insert the documents into Pinecone not via native node, but HTTP, as this allows me to set custom ID used then for upserting. I was passing metadata for vectors like title and body (for each help center article) and the error was there.

I uploaded the vectors via native node and in Pinecone I could see the metadata being text (and a few others). Then my AI Agent node worked fine, and retrieved text as pageContent.

I attempted to use my custom workflow and insert documents via HTTP node once again, this time by setting the key to text and it worked fine.

Could someone confirm the AI Agent node expects key named text, and therefore when inserting documents via HTTP the metadata key name has to remain text as well?

1 Like

Hi @supbarty,

Could you share your http request node set-up as well as your Pinecone node so we can take a better look at how you’re inserting documents?

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


Hey @aya,

Looks like someone ran into the same issue and figured it out:

Content apparently needs to be passed as text and the different key name will cause this to fail.

2 Likes

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