{
  "name": "Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress",
  "nodes": [
    {
      "id": "84dfbed6-1969-4b52-9984-49dfb52f7843",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1184,
        16
      ]
    },
    {
      "id": "eac2aee4-a8aa-49f8-9246-01de9026ef61",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1328,
        16
      ]
    },
    {
      "id": "0634abd7-07be-43eb-8499-63b368e43f7e",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        1472,
        16
      ]
    },
    {
      "id": "87dec119-9774-407d-9512-bb30ae7614cb",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1600,
        208
      ]
    },
    {
      "id": "58656ef3-bd6a-42f1-b5a5-fa8b8a63479a",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1584,
        368
      ]
    },
    {
      "id": "eb62f6a3-9004-4b3c-b555-290c1804a8ad",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1872,
        208
      ]
    },
    {
      "id": "e14baaa6-fa70-408c-bfef-63698b56807a",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1808,
        -192
      ]
    },
    {
      "id": "c0711c84-945c-43a3-a704-6b7a3399a881",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        208,
        128
      ]
    },
    {
      "id": "78e48172-8879-436d-b236-fd233ca0ec35",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        0
      ],
      "parameters": {
        "width": 428,
        "height": 528,
        "content": "## STEP 4 - Wordpress Agent\nInstall the Wordpress [Voicebot AI Agent plugin](https://n3wstorage.b-cdn.net/n3witalia/voice-chatbot-n8n.zip) and enter the Webhook URL in the plugin settings."
      }
    },
    {
      "id": "d9b56072-ee50-41ff-b5f4-be4694bbee9e",
      "name": "Guardrails",
      "type": "@n8n/n8n-nodes-langchain.guardrails",
      "position": [
        672,
        128
      ]
    },
    {
      "id": "0aec07f5-572a-4316-94ca-7b176cf36231",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        656,
        304
      ]
    },
    {
      "id": "d33b2c95-2f32-435a-893e-67daff6f3ffe",
      "name": "RAG",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        1696,
        16
      ]
    },
    {
      "id": "e8f757c1-bf0e-4b7c-9745-04ac6fa0368c",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -80,
        -1120
      ]
    },
    {
      "id": "890070d2-820f-471b-8cad-fdcd89cacda4",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1312,
        -720
      ]
    },
    {
      "id": "f5adb8cd-6022-4cde-a9d5-a0b239851951",
      "name": "Default Data Loader1",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1456,
        -720
      ]
    },
    {
      "id": "0388a450-4628-4d22-a26c-3e430ea1410a",
      "name": "Create collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        -1248
      ]
    },
    {
      "id": "26cb54cf-cdcf-46f1-89e7-cf942aab3647",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1456,
        -528
      ]
    },
    {
      "id": "60b6d1e3-dff7-4da7-845c-364df343d797",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        800,
        -976
      ]
    },
    {
      "id": "21bea24b-759e-46cf-b68d-9a33207754ad",
      "name": "Clear collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        -976
      ]
    },
    {
      "id": "ac2b368c-2a3c-4f2f-8e63-d185da5e3e85",
      "name": "Search files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        528,
        -976
      ]
    },
    {
      "id": "e50584cd-c03c-4423-9c2d-f841223afeaf",
      "name": "Wait 5 sec.",
      "type": "n8n-nodes-base.wait",
      "position": [
        1760,
        -960
      ]
    },
    {
      "id": "286bed0a-8b87-4dbd-970c-05dd8eee54ae",
      "name": "Insert file",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1376,
        -960
      ]
    },
    {
      "id": "0333ad8f-301e-46be-ae14-15d10249b717",
      "name": "Get files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1072,
        -960
      ]
    },
    {
      "id": "d6b9dccf-a331-426a-9927-4ffcc1c428bf",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -1056
      ],
      "parameters": {
        "width": 348,
        "height": 476,
        "content": "## STEP 2 - Documents vectorization\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDocuments vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"
      }
    },
    {
      "id": "2ab1d275-6389-44be-a7b7-f1b87c22552c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -1440
      ],
      "parameters": {
        "width": 352,
        "height": 348,
        "content": "## STEP 1 - Create collection\n\nCreate Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"
      }
    },
    {
      "id": "e46c40e6-cef5-4d2e-902e-8c209c85e99e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -1056
      ],
      "parameters": {
        "width": 1500,
        "height": 476,
        "content": "## STEP 3 - Add documents in Qdrant collection\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "1ee62ad7-06d6-44e6-ab5f-ccc77540333b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        0
      ],
      "parameters": {
        "width": 348,
        "height": 524,
        "content": "## STEP 5 - Guardrail\nAdd Guardrail to prevent  jailbrek\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "ca642fc5-d19f-4117-ab50-9a2858ddfaf0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -288
      ],
      "parameters": {
        "width": 908,
        "height": 812,
        "content": "## STEP 6 - Generate voice\nVoicebot AI agent and generate output audio\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "3a86fc93-3718-40c1-bec6-4e557e747f69",
      "name": "Voicebot AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1264,
        -192
      ]
    },
    {
      "id": "f9a2730e-3fb1-46fd-a52f-1bbb27dcf57c",
      "name": "Generate audio (TTS)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1600,
        -192
      ]
    },
    {
      "id": "e1b57053-a570-47c3-bac6-b9b4fd15d217",
      "name": "Generate text (STT)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        432,
        128
      ]
    },
    {
      "id": "36e3ffa5-6e05-4d58-913e-078a3e76f6b0",
      "name": "Default response (TTS)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1200,
        368
      ]
    },
    {
      "id": "128b873f-6e1e-4f0a-afc2-29b926a93f39",
      "name": "Respond default to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1360,
        368
      ]
    },
    {
      "id": "4faa2789-f44a-46db-8389-e42c1288a33b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -1744
      ],
      "parameters": {
        "width": 912,
        "height": 656,
        "content": "# Voice AI Chatbot with Document Retrieval & Guardrails for Wordpress\n\n\nThis workflow implements a **complete Voice AI Chatbot system** for **Wordress** that integrates speech recognition, guardrails "
      }
    }
  ],
  "connections": {
    "RAG": {
      "ai_tool": [
        [
          {
            "node": "Voicebot AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Generate text (STT)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get files": {
      "main": [
        [
          {
            "node": "Insert file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "Voicebot AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Guardrails": {
      "main": [
        [
          {
            "node": "Voicebot AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Default response (TTS)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert file": {
      "main": [
        [
          {
            "node": "Wait 5 sec.",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5 sec.": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clear collection": {
      "main": [
        [
          {
            "node": "Search files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Voicebot AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Voicebot AI Agent": {
      "main": [
        [
          {
            "node": "Generate audio (TTS)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Insert file",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "RAG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Guardrails",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate text (STT)": {
      "main": [
        [
          {
            "node": "Guardrails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "RAG",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader1": {
      "ai_document": [
        [
          {
            "node": "Insert file",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Generate audio (TTS)": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "Voicebot AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Default response (TTS)": {
      "main": [
        [
          {
            "node": "Respond default to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Recursive Character Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader1",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Create collection",
            "type": "main",
            "index": 0
          },
          {
            "node": "Clear collection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}