{
  "name": "Recipe recommendations with Qdrant and Mistral",
  "nodes": [
    {
      "id": "1eb82902-a1d6-4eff-82a2-26908a82cea2",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        720,
        320
      ]
    },
    {
      "id": "e0031fc3-27f1-45d9-910b-4c07dd322115",
      "name": "Get This Week's Menu",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        992,
        370
      ]
    },
    {
      "id": "2c556cc7-7d4e-4d80-902f-9686e756ed8c",
      "name": "Extract Available Courses",
      "type": "n8n-nodes-base.code",
      "position": [
        992,
        650
      ]
    },
    {
      "id": "90c39db6-6116-4c37-8d48-a6d5e8f8c777",
      "name": "Extract Server Data",
      "type": "n8n-nodes-base.html",
      "position": [
        992,
        510
      ]
    },
    {
      "id": "fbd4ed97-0154-4991-bf16-d9c4cb3f4776",
      "name": "Get Course Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        1172,
        370
      ]
    },
    {
      "id": "5ab1a5fa-adc3-41e0-be6d-f680af301aca",
      "name": "Get Recipe",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1172,
        510
      ]
    },
    {
      "id": "5014dc62-8320-4968-b9bd-396a517a2b5c",
      "name": "Embeddings Mistral Cloud",
      "type": "@n8n/n8n-nodes-langchain.embeddingsMistralCloud",
      "position": [
        1960,
        420
      ]
    },
    {
      "id": "2a8fad89-f74b-4808-8cb6-97c6b46a53ee",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        2080,
        420
      ]
    },
    {
      "id": "44ceef5c-1d08-40d2-8ab4-227b551f72f5",
      "name": "Merge Course & Recipe",
      "type": "n8n-nodes-base.merge",
      "position": [
        1480,
        500
      ]
    },
    {
      "id": "b56bd85e-f182-49d1-aeb1-062e905c316a",
      "name": "Prepare Documents",
      "type": "n8n-nodes-base.set",
      "position": [
        1660,
        500
      ]
    },
    {
      "id": "6b800632-f320-4fc3-bd2a-6a062834343d",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        2080,
        560
      ]
    },
    {
      "id": "df7f17a2-8b27-4203-a2ff-091aaf6609b8",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        2440,
        360
      ]
    },
    {
      "id": "ee38effe-5929-421e-a3c5-b1055a755242",
      "name": "Extract Recipe Details",
      "type": "n8n-nodes-base.html",
      "position": [
        1172,
        650
      ]
    },
    {
      "id": "dede108f-2fde-49cb-8a0e-fa5786c59d4b",
      "name": "Qdrant Recommend API",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        2840,
        540
      ]
    },
    {
      "id": "5e703134-4dd9-464b-9ec9-dc6103907a1e",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        2420,
        940
      ]
    },
    {
      "id": "9fb5f4fd-3b38-4a35-8986-d3955754c8d1",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        2660,
        540
      ]
    },
    {
      "id": "d38275e6-aede-4f1c-9b05-018f3cf4faab",
      "name": "Get Tool Response",
      "type": "n8n-nodes-base.set",
      "position": [
        3160,
        940
      ]
    },
    {
      "id": "dc3ceb2f-3c64-4b42-aeca-ddcdb84abf12",
      "name": "Wait for Rate Limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        2420,
        1080
      ]
    },
    {
      "id": "ec36d6f8-c3da-4732-8d56-a092a3358864",
      "name": "Get Mistral Embeddings",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2620,
        940
      ]
    },
    {
      "id": "aebcb860-d25c-4833-9e9d-0297101259c7",
      "name": "Use Qdrant Recommend API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        940
      ]
    },
    {
      "id": "2474c97d-0d85-4acc-a95e-2eb6494786dc",
      "name": "Get Recipes From DB",
      "type": "n8n-nodes-base.code",
      "position": [
        2980,
        940
      ]
    },
    {
      "id": "54229c2a-6e26-4350-8a94-57f415ef2340",
      "name": "Save Recipes to DB",
      "type": "n8n-nodes-base.code",
      "position": [
        1960,
        940
      ]
    },
    {
      "id": "725c1f56-5373-4891-92b9-3f32dd28892b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        901.1666225087287,
        180.99920515712074
      ],
      "parameters": {
        "width": 484.12381677448207,
        "height": 674.1153489831718,
        "content": "## Step 1. Fetch Available Courses For the Current Week\n\nTo populate our vectorstore, we'll scrape the weekly menu off the HelloFresh Website. The pages are quite large so may take a while so please b"
      }
    },
    {
      "id": "f4e882b8-3762-4e6b-9e95-b0d708d0c284",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        300
      ],
      "parameters": {
        "width": 409.1756468632768,
        "height": 398.81415970574335,
        "content": "## Step 2. Create Recipe Documents For VectorStore\n\nTo populate our vectorstore, we'll scrape the weekly menu off the HelloFresh Website. The pages are quite large so may take a while so please be pat"
      }
    },
    {
      "id": "fc3c2221-b67c-451c-9096-d6acd2a297fa",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1860,
        19.326425127730317
      ],
      "parameters": {
        "width": 486.02284096214964,
        "height": 690.7816167755491,
        "content": "## Step 3. Vectorise Recipes For Recommendation Engine\n[Read more about Qdrant node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant)\n\nWe'll sto"
      }
    },
    {
      "id": "43296173-b929-46cc-b6ea-58007837b8df",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1740,
        740
      ],
      "parameters": {
        "width": 547.0098868353456,
        "height": 347.6002738958705,
        "content": "## Step 4. Save Original Document to Database\n[Read more about Code Node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code)\n\nFinally, let's have the original document stored in "
      }
    },
    {
      "id": "6e2e58d2-e0ad-4503-8ed6-891124c8035b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2380,
        160
      ],
      "parameters": {
        "width": 673.6008766895472,
        "height": 552.9202706743265,
        "content": "## 5. Chat with Our HelloFresh Recommendation AI Agent\n[Read more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nThis agent is designed "
      }
    },
    {
      "id": "ba692c21-38bc-48a1-8b40-bad298be8b9e",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2660,
        360
      ]
    },
    {
      "id": "d7ca0f97-72dc-4f4c-8b46-3ff57b9068a4",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        740
      ],
      "parameters": {
        "width": 987.4785537889618,
        "height": 531.9173034334732,
        "content": "## 5. Using Qdrant's Recommend API & Grouping Functionality\n[Read more about Qdrant's Recommend API](https://qdrant.tech/documentation/concepts/explore/?q=recommend)\n\nUnlike basic similarity search, Q"
      }
    },
    {
      "id": "96a294e2-1437-4ded-9973-0999b444c999",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -40
      ],
      "parameters": {
        "width": 432.916474478624,
        "height": 542.9295980774649,
        "content": "## Try it out!\n### This workflow does the following:\n* Fetches and stores this week's HelloFresh's menu\n* Builds the foundation of a recommendation engine by storing the recipes in a Qdrant Vectorstor"
      }
    },
    {
      "id": "72c98600-f21a-42d4-97be-836b8ef6dc77",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1960,
        240
      ]
    },
    {
      "id": "b7c4b597-ac2b-41d7-8f0f-1cbba25085de",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1860,
        -195.8987124522777
      ],
      "parameters": {
        "width": 382.47301504497716,
        "height": 195.8987124522777,
        "content": "### 🚨Ensure Qdrant collection exists!\nYou'll need to run the following command in Qdrant:\n```\nPUT collections/hello_fresh\n{\n  \"vectors\": {\n    \"distance\": \"Cosine\",\n    \"size\": 1024\n  }\n}\n```"
      }
    },
    {
      "id": "39191834-ecc2-46f0-a31a-0a7e9c47ac5d",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2740,
        920
      ],
      "parameters": {
        "width": 213.30551928619226,
        "height": 332.38559808882246,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🚨Configure Your Qdrant Connection\n* Be sure to enter your endpoint address"
      }
    }
  ],
  "connections": {
    "Get Recipe": {
      "main": [
        [
          {
            "node": "Extract Recipe Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Documents": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save Recipes to DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Extract Server Data": {
      "main": [
        [
          {
            "node": "Extract Available Courses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Course Metadata": {
      "main": [
        [
          {
            "node": "Merge Course & Recipe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Recipes From DB": {
      "main": [
        [
          {
            "node": "Get Tool Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get This Week's Menu": {
      "main": [
        [
          {
            "node": "Extract Server Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Recommend API": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Rate Limits": {
      "main": [
        [
          {
            "node": "Get Mistral Embeddings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Course & Recipe": {
      "main": [
        [
          {
            "node": "Prepare Documents",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Recipe Details": {
      "main": [
        [
          {
            "node": "Merge Course & Recipe",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Mistral Embeddings": {
      "main": [
        [
          {
            "node": "Use Qdrant Recommend API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Mistral Cloud": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Wait for Rate Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Use Qdrant Recommend API": {
      "main": [
        [
          {
            "node": "Get Recipes From DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Available Courses": {
      "main": [
        [
          {
            "node": "Get Course Metadata",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Recipe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Get This Week's Menu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}