Setting unique identifiers for Qdrant points in n8n workflow

I’m trying to figure out how to assign unique IDs to Qdrant points when using n8n. I know that in Qdrant, if you insert a point with the same ID, it’s supposed to replace the existing one. 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’s not the same as the actual point ID. This is causing a problem because every time I insert the same document, it creates a duplicate instead of updating the existing one.

Does anyone know how to properly set point IDs in n8n when working with Qdrant? I want to avoid duplicates and make sure my data is being updated correctly. Any tips or examples would be really helpful!

I’ve encountered this issue as well. The key is to utilize the Upsert operation within the Qdrant node in n8n. This allows you to specify the point ID directly. For generating unique IDs, I’ve found success using a combination of a UUID generator and a hash of specific document fields.

I typically set up a Function node before the Qdrant node to create these IDs. This approach has proven effective in maintaining data integrity and avoiding duplicates. Additionally, ensure your workflow is configured to pass this ID to the Qdrant node correctly.

Remember to thoroughly test your workflow with various scenarios to confirm it’s behaving as expected. If you’re still facing issues, reviewing Qdrant’s documentation on point management might provide further insights.

hey avamtz, i had the same issue! try using the Upsert operation in qdrant node instead of Insert. you can set the point ID there directly. i usually make IDs by combining timestamp + hash of some unique doc stuff. works great for me, no more dupes! lmk if u need more help

In my experience working with n8n and Qdrant, you can resolve the unique ID challenge by switching from the Insert operation to the Upsert option. In the Qdrant node, there is an option to specify the operation type, and opting for Upsert allows you to designate the point ID directly. Personally, I generate IDs by combining a current timestamp with a hash of some unique document attributes. This method ensures that when the same document is processed more than once, it updates the existing entry rather than creating a duplicate. I prepare the ID using a Function node before sending it to the Qdrant node, and this approach consistently prevents duplicate entries while ensuring proper updates.