{
  "name": "Build a WordPress RAG chatbot with OpenAI, Qdrant or MongoDB",
  "nodes": [
    {
      "id": "0534d7a4-ed00-4d3d-af44-681d911980d0",
      "name": "Qdrant Vector Store1",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        448,
        224
      ]
    },
    {
      "id": "3b438fa4-92e5-475c-8536-671bf8d89e5f",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        448,
        400
      ]
    },
    {
      "id": "50890836-e0e0-4fd0-b07e-8db9ad8d7ee3",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        608,
        400
      ]
    },
    {
      "id": "74daea1f-fd4b-40b3-bfb3-66f023bce059",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        608,
        800
      ]
    },
    {
      "id": "94f3bbd3-2e45-40f9-836f-e3551fe1bcfb",
      "name": "WP Get all post",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        -352,
        224
      ]
    },
    {
      "id": "138a6a5a-18d8-4ced-a999-4fcf23b0a688",
      "name": "Prepare Documents for Indexing",
      "type": "n8n-nodes-base.code",
      "position": [
        32,
        224
      ]
    },
    {
      "id": "81d0dea1-56f6-46a7-8537-08e2456f41bd",
      "name": "Manual Indexing",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -720,
        224
      ]
    },
    {
      "id": "db2b7836-5993-4870-afa8-837ba49f72f9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        -80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "bf8c0fed-f009-419e-9b58-b5043660bb4d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9cefe2db-b513-4740-a72a-35e36cd3fe29",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        768
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "105d4d03-a5fa-4850-a270-45ffe941c44b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        368
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5ddfbad1-77f7-4ad3-a04a-73fed41c8d74",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        368
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "dd43376a-24ac-40eb-9780-db747b937197",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        -80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "d73ccc2a-0bd5-4f29-85ec-0a62e00b2215",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        -128
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ff0dfe21-83de-4bbe-b7e6-128ff6e41c71",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        1296
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a11995ad-c357-4e29-9598-413c63794de7",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2256,
        1568
      ]
    },
    {
      "id": "cc92981a-2a83-4d57-9f13-216d8d13b509",
      "name": "Build context from Qdrant results1",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        2064
      ]
    },
    {
      "id": "757b54f5-2300-41cd-8ce1-8b7f4711b0bc",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -688,
        1616
      ]
    },
    {
      "id": "9d7e4372-d93c-425f-a842-49282bd82b08",
      "name": "Code-Response_Parsing",
      "type": "n8n-nodes-base.code",
      "position": [
        1536,
        2064
      ]
    },
    {
      "id": "f994e7f5-9e40-44b8-af19-151f57f8f37b",
      "name": "Code-Request_Parsing",
      "type": "n8n-nodes-base.code",
      "position": [
        -432,
        1616
      ]
    },
    {
      "id": "67c87db9-a110-4062-aa25-35a12f239f04",
      "name": "Reranker Cohere",
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "position": [
        752,
        2224
      ]
    },
    {
      "id": "94fbb53f-0eaa-4f28-8be9-d7c0a3bdf565",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1344,
        2224
      ]
    },
    {
      "id": "3f884baf-ada7-41d7-9ab3-c2f8557695de",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1168,
        2224
      ]
    },
    {
      "id": "d0293610-3381-4084-a4e6-872f7fcd8451",
      "name": "Qdrant Search (Collection_name)",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        592,
        2064
      ]
    },
    {
      "id": "024db1cf-8299-4250-859e-183cf2c41511",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1168,
        2064
      ]
    },
    {
      "id": "89458f41-c5b6-440c-97a2-d3ae3a46330f",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        128,
        1568
      ]
    },
    {
      "id": "ec466b34-8398-4ce5-8c4f-0b6edbfb338a",
      "name": "Code-Smalltalk_response",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        1568
      ]
    },
    {
      "id": "b9f71010-05dc-4702-b360-490f89bbe3f4",
      "name": "OpenAI Intent Router",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -208,
        1616
      ]
    },
    {
      "id": "09e069fc-6dde-4b6b-9fa5-0dbc6c87eb0c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        1776
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4bc22d89-e931-476b-9f98-8034a0acb87f",
      "name": "Build context from Qdrant results",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        2368
      ]
    },
    {
      "id": "a62a1d75-56e6-4d30-b06a-92d1aee4aa8e",
      "name": "Reranker Cohere3",
      "type": "@n8n/n8n-nodes-langchain.rerankerCohere",
      "position": [
        736,
        2528
      ]
    },
    {
      "id": "56576c05-0c8c-45de-ad92-96158499bb3e",
      "name": "Embeddings OpenAI3",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        576,
        2528
      ]
    },
    {
      "id": "47da27fb-25b5-49b3-abf4-9fa52c69556d",
      "name": "Structured Output Parser3",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1328,
        2528
      ]
    },
    {
      "id": "2b7ae763-7c40-4c80-99b0-a2a0e8bf1382",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1152,
        2528
      ]
    },
    {
      "id": "b2427416-0df8-4340-97d1-9f0666db2d2a",
      "name": "Qdrant Search (Collection_name)",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        576,
        2368
      ]
    },
    {
      "id": "6d5db6c2-5f51-4be0-8e4b-95a6a371e2fb",
      "name": "AI Agent3",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1152,
        2368
      ]
    },
    {
      "id": "24888152-b4d0-4e9b-accf-3a689529c056",
      "name": "url_en",
      "type": "n8n-nodes-base.code",
      "position": [
        1536,
        2368
      ]
    },
    {
      "id": "fbbe524e-5f07-4639-9682-c18ecfa76de3",
      "name": "Set: date",
      "type": "n8n-nodes-base.set",
      "position": [
        2656,
        1568
      ]
    },
    {
      "id": "02310ff9-972b-4eae-81e1-f2d69c845186",
      "name": "GCS: Object_Log",
      "type": "n8n-nodes-base.googleCloudStorage",
      "position": [
        3264,
        1568
      ]
    },
    {
      "id": "1d8cb44e-06c5-4342-a3de-caee4de84eea",
      "name": "Code: parsing",
      "type": "n8n-nodes-base.code",
      "position": [
        3056,
        1568
      ]
    },
    {
      "id": "bb5570bb-7f2d-48df-80e4-8c4d201baeb2",
      "name": "set: ObjectName_Date/Folder & data",
      "type": "n8n-nodes-base.set",
      "position": [
        2848,
        1568
      ]
    },
    {
      "id": "7a5178fa-83e8-41c4-b001-caec9b0d578a",
      "name": "Crypto: IP Hash",
      "type": "n8n-nodes-base.crypto",
      "position": [
        2464,
        1568
      ]
    },
    {
      "id": "31763079-6b76-4008-83ce-9010f049b36c",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1456,
        3200
      ]
    },
    {
      "id": "a9d43cea-9ce9-40af-ba86-8696b7ff2834",
      "name": "Embeddings OpenAI4",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        592,
        3200
      ]
    },
    {
      "id": "3d6472d8-7e2d-4fd8-a78d-57a8c5875b40",
      "name": "Code in JavaScript3",
      "type": "n8n-nodes-base.code",
      "position": [
        1264,
        3024
      ]
    },
    {
      "id": "b59241e1-22c0-4c84-b3be-a5ea92f53f6d",
      "name": "MongoDB Atlas Vector SKILLS",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
      "position": [
        592,
        3024
      ]
    },
    {
      "id": "23581d36-9a31-41e1-b79b-c23c0b17db49",
      "name": "Embeddings OpenAI5",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        928,
        3200
      ]
    },
    {
      "id": "fd2d04c5-cdef-40d2-865f-ecb43ebfdf1d",
      "name": "MongoDB Atlas Vector PROFILE",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas",
      "position": [
        928,
        3024
      ]
    },
    {
      "id": "9fed3e95-af84-47ae-b792-d59d80e1b7d3",
      "name": "AI Agent - SKILLS",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1456,
        3024
      ]
    },
    {
      "id": "705d00c2-5bde-4c00-942d-958f8517d966",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        1808,
        3024
      ]
    },
    {
      "id": "bd3b3a11-ca11-41eb-a06f-c3d7fb17b700",
      "name": "Code: remove followup",
      "type": "n8n-nodes-base.code",
      "position": [
        1920,
        2064
      ]
    },
    {
      "id": "b720508c-723b-4017-90bb-e72b86d3f691",
      "name": "SmallTalk Response",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        576,
        1568
      ]
    },
    {
      "id": "2db21e1b-e83b-49d9-9785-4ae73c64e9fe",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2256,
        1376
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "bb3b4bdf-9e5d-4ab5-9536-d5ce66b6de89",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        1776
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "20d0ea5a-7e29-4a64-859f-74c055eb85eb",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        592,
        2224
      ]
    },
    {
      "id": "a8c3a843-8edf-427e-8d73-86dd14e972c3",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        1456
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2d4268e0-bfd0-4e8e-83a7-be8bcfed19be",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        1296
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "7d16fddf-23ec-4006-a166-9c7624b3865e",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        2688
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5ddec878-34ad-4dd2-88b5-cab92b30085b",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        2064
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "82b57ff7-9271-4479-b034-3be6322cd11b",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        2352
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "34a7aa80-0de4-46e1-9f88-81f1bad8a262",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        3008
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4cabf381-b81c-4b0f-8de5-ffb19aed2fac",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2416,
        1568
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "3f9826e6-ca11-40bf-bdfe-366242577a9b",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        1280
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "SmallTalk Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "SmallTalk Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Qdrant Search (Collection_name)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Qdrant Search (Collection_name)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "MongoDB Atlas Vector SKILLS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "url_en": {
      "main": [
        [
          {
            "node": "Code: remove followup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Code-Request_Parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code-Response_Parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent3": {
      "main": [
        [
          {
            "node": "url_en",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set: date": {
      "main": [
        [
          {
            "node": "set: ObjectName_Date/Folder & data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: parsing": {
      "main": [
        [
          {
            "node": "GCS: Object_Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto: IP Hash": {
      "main": [
        [
          {
            "node": "Set: date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Indexing": {
      "main": [
        [
          {
            "node": "WP Get all post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Search (Collection_name)",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "WP Get all post": {
      "main": [
        [
          {
            "node": "Prepare Documents for Indexing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reranker Cohere3": {
      "ai_reranker": [
        [
          {
            "node": "Qdrant Search (Collection_name)",
            "type": "ai_reranker",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - SKILLS": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Code: remove followup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Search (Collection_name)",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI3": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Search (Collection_name)",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI4": {
      "ai_embedding": [
        [
          {
            "node": "MongoDB Atlas Vector SKILLS",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI5": {
      "ai_embedding": [
        [
          {
            "node": "MongoDB Atlas Vector PROFILE",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - SKILLS",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "Crypto: IP Hash",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SmallTalk Response": {
      "main": [
        [
          {
            "node": "Code-Smalltalk_response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "AI Agent - SKILLS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Code-Request_Parsing": {
      "main": [
        [
          {
            "node": "OpenAI Intent Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Intent Router": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code-Response_Parsing": {
      "main": [
        [
          {
            "node": "Code: remove followup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: remove followup": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code-Smalltalk_response": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser3": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB Atlas Vector SKILLS": {
      "main": [
        [
          {
            "node": "MongoDB Atlas Vector PROFILE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB Atlas Vector PROFILE": {
      "main": [
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Documents for Indexing": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Search (Collection_name)": {
      "main": [
        [
          {
            "node": "Build context from Qdrant results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build context from Qdrant results": {
      "main": [
        [
          {
            "node": "AI Agent3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Build context from Qdrant results1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set: ObjectName_Date/Folder & data": {
      "main": [
        [
          {
            "node": "Code: parsing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}