Setting unique identifiers for Qdrant points in n8n

I’m trying to figure out how to assign unique IDs to Qdrant points when using n8n. The Qdrant docs say that points with the same ID will be replaced instead of duplicated. But I can’t seem to find a way to set these IDs in n8n.

I’ve tried putting the ID in the metadata, but that doesn’t work as the actual point ID. This is causing problems because every time I insert the same document, it creates a duplicate instead of replacing the existing one.

Does anyone know how to properly set point IDs in n8n when working with Qdrant? I’d really appreciate any tips or advice on how to avoid these duplicates and get the replacement behavior to work correctly. Thanks!

I’ve encountered this issue before. One effective solution is to use the Function node in n8n to generate unique IDs for your Qdrant points. You can create a function that generates a hash or UUID based on the document’s content or other unique attributes. Then, use this generated ID in a custom HTTP Request node to make API calls to Qdrant.

Here’s a basic approach:

  1. Use a Function node to create unique IDs
  2. Set up an HTTP Request node for Qdrant API calls
  3. Include the generated ID in your payload

This method gives you control over point IDs and ensures proper replacement behavior. It requires more setup but solves the duplication problem effectively.

I’ve dealt with this exact issue in my projects. Here’s what worked for me:

I ended up creating a custom HTTP Request node in n8n to directly interact with Qdrant’s API. This gave me full control over the point IDs.

In my workflow, I generate a unique ID for each document using a Function node - usually a hash of some key fields. Then I use this ID in the payload of my HTTP Request to Qdrant.

The tricky part was getting the payload structure right. Make sure you’re using the correct endpoint (like /points/upsert) and format your request body properly with the ID, vector, and payload fields.

This approach takes more setup initially, but it solved my duplication problems and gave me the replacement behavior I needed. Plus, it’s more flexible for other custom operations you might need down the line.

hey zack, ran into similar issues. try using HTTP Request node to make custom API calls to Qdrant. you can specify point IDs in the payload. it’s a bit more work but lets you control IDs. hope this helps!