Skip to main content

Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress

Workflow preview

Workflow preview
100%
Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow implements a complete Voice AI Chatbot system for Wordress that integrates speech recognition, guardrails for safety, retrieval augmented generation (RAG), Qdrant vector search, and a...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.vectorstoreqdrant, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.respondtowebhook, n8n-nodes-base.webhook, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress
Workflow name
Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress

This workflow implements a complete Voice AI Chatbot system for Wordress that integrates speech recognition, guardrails for safety, retrieval-augmented generation (RAG), Qdrant vector search, and audio responses. It is designed to be connected to a WordPress Voicebot AI plugin through a webhook endpoint.


Key Advantages

  • ✅ Complete Voice AI Pipeline** The workflow handles:

    • audio input
    • STT
    • intelligent processing
    • TTS output All within a single automated process.
  • Safe and Policy-Compliant Thanks to the Guardrails module, the system automatically:

    • detects harmful or disallowed requests
    • blocks them
    • responds safely This protects both the user and the business.
  • Contextual and Memory-Based Conversations The Window Buffer Memory tied to unique session IDs enables:

    • continuous conversation flow
    • natural dialogue
    • better understanding of context
  • Company-Specific Knowledge via RAG By integrating Qdrant as a vector store, the system can:

    • retrieve business documentation
    • give accurate and up-to-date answers
    • support personalized content This makes the chatbot far more powerful than a standard LLM.
  • Modular and Extensible Architecture Because everything is modular inside n8n, you can:

    • swap OpenAI with other models
    • add new tools or knowledge sources
    • change prompts or capabilities without redesigning the entire workflow.
  • ✅ **Easy WordPress Integration The workflow connects directly to a WordPress Voicebot plugin, meaning:

    • no custom backend development
    • simple deployment
    • fast integration for websites
  • Automatic Indexing of Documents The second workflow section:

    • fetches Google Drive files
    • converts them into embeddings
    • indexes them into Qdrant This lets you maintain your knowledge base with almost no manual work.

How It Works

This workflow creates a Wordpress voice-enabled AI chatbot that processes audio inputs and provides contextual responses using RAG (Retrieval-Augmented Generation) from a Qdrant vector database. The system operates as follows:

  1. Audio Processing Pipeline:

    • Receives audio input via webhook and converts speech to text using OpenAI's STT (Speech-to-Text)
    • Applies guardrails to detect inappropriate content or jailbreak attempts using a separate GPT-4.1-mini model
    • Routes safe queries to the AI agent and blocks unsafe content with a default response
  2. AI Agent with Contextual Memory:

    • Uses OpenAI Chat Model with window buffer memory to maintain conversation context
    • Equips the agent with two tools: Calculator for computations and RAG tool for business knowledge retrieval
    • The RAG system queries Qdrant vector store containing company documents using OpenAI embeddings
  3. Response Generation:

    • Generates appropriate text responses based on query type and available knowledge
    • Converts approved responses to audio using OpenAI's TTS (Text-to-Speech) with "onyx" voice
    • Returns binary audio responses to the webhook caller

Set Up Steps

  1. Vector Database Preparation:

    • Create Qdrant collection via HTTP request with specified vector configuration
    • Clear existing collection data before adding new documents
    • Set up Google Drive integration to source documents from specific folders
  2. Document Processing Pipeline:

    • Search and retrieve files from Google Drive folder "Test Negozio"
    • Process documents through recursive text splitting (500 chunk size, 50 overlap)
    • Generate embeddings using OpenAI and store in Qdrant vector store
    • Implement batch processing with 5-second delays between operations
  3. System Configuration:

    • Configure webhook endpoint for receiving audio inputs
    • Set up multiple OpenAI accounts for different functions (STT, TTS, guardrails, main agent)
    • Establish Qdrant API connections for vector storage and retrieval
    • Implement session-based memory management using session IDs from webhook headers
  4. WordPress Integration:

    • Install the provided Voicebot AI Agent WordPress plugin
    • Configure the plugin with the webhook URL to connect to this n8n workflow
    • The system is now ready to receive audio queries and respond with voice answers

The workflow handles both real-time voice queries and background document processing, creating a comprehensive voice assistant solution with business-specific knowledge retrieval capabilities.


Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1

Block 2 - Window Buffer Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 3 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 4 - Qdrant Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreQdrant - vectorStoreQdrant
Config choices
Version 1

Block 5 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.1

Block 6 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1

Block 7 - Respond to Webhook

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 8 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 9 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Guardrails

Type / Role
@n8n/n8n-nodes-langchain.guardrails - guardrails
Config choices
Version 1

Block 11 - OpenAI Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 12 - RAG

Type / Role
@n8n/n8n-nodes-langchain.toolVectorStore - toolVectorStore
Config choices
Version 1

Block 13 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 14 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.1

Block 15 - Default Data Loader1

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 16 - Create collection

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 18 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 19 - Clear collection

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Search files

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 21 - Wait 5 sec.

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 22 - Insert file

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreQdrant - vectorStoreQdrant
Config choices
Version 1

Block 23 - Get files

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 24 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 34 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress
Complexity advanced
Nodes 34
Categories Support Chatbot, AI Chatbot
Author Davide
Published 17 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10924/10924.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Voice AI chatbot with OpenAI, RAG (Qdrant) & Guardrails for WordPress do?

This workflow implements a complete Voice AI Chatbot system for Wordress that integrates speech recognition, guardrails for safety, retrieval augmented generation (RAG), Qdrant vector search, and a...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.