{
  "name": "Match medical symptoms to products with OpenAI, Qdrant & Google Sheets RAG",
  "nodes": [
    {
      "id": "ab7e0eb2-1a72-4dee-8b6a-c6a836fce257",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -16
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8882b64e-5caf-4a05-a7f3-d78b93d9f30c",
      "name": "RAG Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -896,
        160
      ]
    },
    {
      "id": "3788a0b5-4f73-4bd1-bdca-b659a49710f5",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        176,
        192
      ]
    },
    {
      "id": "ec896b04-a5cc-4cc4-b7ce-3b552e2fe258",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -32
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "cc6b47eb-87b1-44a8-8319-c5a0254b83ba",
      "name": "Qdrant Vector Database",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        256,
        544
      ]
    },
    {
      "id": "6b5d2b60-f65a-4075-b5a6-415c1fb1dcc8",
      "name": "Create Embedding",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        192,
        752
      ]
    },
    {
      "id": "9db5b8ae-a9c9-4465-a426-71bb9cda333d",
      "name": "Set Data Properly in vector database",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        384,
        784
      ]
    },
    {
      "id": "186a5ebf-57fd-4aa4-8031-89c503603431",
      "name": "Split text into chunks",
      "type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
      "position": [
        464,
        960
      ]
    },
    {
      "id": "b969d3a6-f663-46bd-9207-666861aa4e49",
      "name": "Create Embedding2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -560,
        640
      ]
    },
    {
      "id": "37d1974e-0e65-441d-9a22-977035e6e1af",
      "name": "Loop over each product",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        800,
        192
      ]
    },
    {
      "id": "d6cff138-2513-4acd-bf37-3e6691b3cf07",
      "name": "Get data from Qdrant database",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        -656,
        464
      ]
    },
    {
      "id": "bf1668c5-cc6a-4ab3-9f97-e9cd701df1ed",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1120,
        160
      ]
    },
    {
      "id": "e05d5065-dec0-435e-a65d-e4f831541388",
      "name": "OpenAI LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -976,
        384
      ]
    },
    {
      "id": "e14dc3fe-f0e4-479b-ad7e-d5477d478e20",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        96
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "95f86512-e0f7-48e0-bb44-9b727ecb320a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        448
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "672df8d1-81bd-4709-b7be-76cf04c92593",
      "name": "Store Chats",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -816,
        384
      ]
    },
    {
      "id": "28d9b9f0-0b67-4828-b502-71e6f7c55ad8",
      "name": "Get all products",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        416,
        192
      ]
    }
  ],
  "connections": {
    "RAG Agent": {
      "main": [
        []
      ]
    },
    "OpenAI LLM": {
      "ai_languageModel": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Store Chats": {
      "ai_memory": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Create Embedding": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Database",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Get all products": {
      "main": [
        [
          {
            "node": "Loop over each product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Embedding2": {
      "ai_embedding": [
        [
          {
            "node": "Get data from Qdrant database",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Loop over each product": {
      "main": [
        [],
        [
          {
            "node": "Qdrant Vector Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Database": {
      "main": [
        [
          {
            "node": "Loop over each product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split text into chunks": {
      "ai_textSplitter": [
        [
          {
            "node": "Set Data Properly in vector database",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "RAG Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get data from Qdrant database": {
      "ai_tool": [
        [
          {
            "node": "RAG Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Set Data Properly in vector database": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Database",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get all products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}