qdrantn8n

N8N + qdrant: working example in the documentation?


That might seem very simple. I'm trying to replicate the Workflow 1 from qdrant-n8n documentation, but I encounter the following error:

Problem in node ‘Qdrant Vector Store‘
400 Bad Request: Wrong input: Not existing vector name error:

workflow error

Any clue about how to solve this? Thanks in advance for your help

The following is not included inqdrant-n8n documentation:

Here is how I created the collection in qdrant: Here is how I created the collection in qdrant

Here are some more details about the error: Here are some more details about the error:

Full workflow code:

{
  "name": "VanillaWorkflow",
  "nodes": [
    {
      "parameters": {
        "model": "text-embedding-3-small",
        "options": {}
      },
      "id": "12a2cf2a-1a58-431e-9c9e-18df40c6ab72",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1,
      "position": [
        1080,
        260
      ],
      "credentials": {
        "openAiApi": {
          "id": "tFhC2KmV4dSxIDlf",
          "name": "OpenAi"
        }
      }
    },
    {
      "parameters": {
        "repository": "https://github.com/qdrant/demo-food-discovery",
        "additionalOptions": {}
      },
      "id": "fbea791d-6f7f-4524-8dad-2e71083cf6b9",
      "name": "GitHub Document Loader",
      "type": "@n8n/n8n-nodes-langchain.documentGithubLoader",
      "typeVersion": 1,
      "position": [
        1180,
        260
      ],
      "credentials": {
        "githubApi": {
          "id": "uBLBPG8XsplzEEl3",
          "name": "GitHub account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "9f5ed629-7f76-4991-ab10-630b94e62db9",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        1320,
        420
      ]
    },
    {
      "parameters": {},
      "id": "48ed4863-dffd-4587-9385-932c8d888a74",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        820,
        60
      ]
    },
    {
      "parameters": {
        "mode": "insert",
        "qdrantCollection": {
          "__rl": true,
          "value": "documents2",
          "mode": "list",
          "cachedResultName": "documents2"
        },
        "options": {}
      },
      "id": "d95c24d8-cb9a-4dae-af5f-a581c7453f8c",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "typeVersion": 1,
      "position": [
        1060,
        60
      ],
      "credentials": {
        "qdrantApi": {
          "id": "xU6ckdScUzDOhzdT",
          "name": "QdrantApi account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "GitHub Document Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "GitHub Document Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8d2b92dc-d47b-4575-b7b5-7dcf3dca39a3",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "2f70cd111ab80d00cdd02b4bc3bb9ec8acf888ed8ff50d1ba51efd710abc7661"
  },
  "id": "mocWTbbcEA6LcYMj",
  "tags": []
}

Others encountering similar issue, but their solution did not apply: https://github.com/orgs/qdrant/discussions/3213


Solution

  • It seems the collection is misconfigured. You don't need to explicitly create a collection.

    The node automatically does so based on the embeddings.

    You can try specifying a different collection name, which will be created by the node and data will be added into it.