To view the n8n flow demo and copy the JSON you need to purchase our Bundle... don't worry, it's FREE

Go to the BUNDLE

AI Voice Chatbot with ElevenLabs & OpenAI for Customer Service and Restaurants

The "Voice RAG Chatbot with ElevenLabs and OpenAI" workflow in n8n is designed to create an interactive voice-based chatbot system that leverages both text and voice inputs for providing information. Ideal for shops, commercial activities and restaurants

How it works:

Here's how it works:

  1. Webhook Activation : The process begins when a user interacts with the voice agent set up on ElevenLabs, triggering a webhook in n8n. This webhook sends a question from the user to the AI ​​Agent node.
  2. AI Agent Processing : Upon receiving the query, the AI ​​Agent node processes the input using predefined prompts and tools. It extracts relevant information from the knowledge base stored within the Qdrant vector database.
  3. Knowledge Base Retrieval : The Vector Store Tool node interfaces with the Qdrant Vector Store to retrieve relevant documents or data segments matching the user's query.
  4. Text Generation : Using the retrieved information, the OpenAI Chat Model generates a coherent response tailored to the user's question.
  5. Response Delivery : The generated response is sent back through another webhook to ElevenLabs, where it is converted into speech and delivered audibly to the user.
  6. Continuous Interaction : For ongoing conversations, the Window Buffer Memory ensures context retention by maintaining a history of interactions, enhancing the conversational flow.

Setup steps:

To configure this workflow effectively, follow these detailed setup instructions:

  1. ElevenLabs Agent Creation :

    • Begin by creating an agent on ElevenLabs (eg, named 'test_n8n').
    • Customize the first message and define the system prompt specific to your use case, such as portraying a character like a waiter at "Pizzeria da Michele".
    • Add a Webhook tool labeled 'test_chatbot_elevenlabs' configured to receive questions via POST requests.
  2. Qdrant Collection Initialization :

    • Utilize the HTTP Request nodes ('Create collection' and 'Refresh collection') to initialize and clear existing collections in Qdrant. Ensure you update placeholders QDRANTURL and COLLECTION accordingly.
  3. Document Vectorization :

    • Use Google Drive integration to fetch documents from a designated folder. These documents are then downloaded and processed for embedding.
    • Employ the Embeddings OpenAI node to generate embeddings for the downloaded files before storing them into Qdrant via the Qdrant Vector Store node.
  4. AI Agent Configuration :

    • Define the system prompt for the AI ​​Agent node which guides its behavior and responses based on the nature of queries expected (eg, product details, troubleshooting tips).
    • Link necessary models and tools including OpenAI language models and memory buffers to enhance interaction quality.
  5. Testing Workflow :

    • Execute test runs of the entire workflow by clicking 'Test workflow' in n8n alongside initiating tests on the ElevenLabs side to confirm all components interact seamlessly.
    • Monitor logs and outputs closely during testing phases to ensure accurate data flow between systems.
  6. Integration with Website :

    • Finally, integrate the chatbot widget onto your business website replacing placeholder AGENT_ID with the actual identifier created earlier on ElevenLabs.

By adhering to these comprehensive guidelines, users can successfully deploy a sophisticated voice-driven chatbot capable of delivering precise answers utilizing advanced retrieval-augmented generation techniques powered by OpenAI and ElevenLabs technologies.

Do you want to automate your business?

Let's talk about your project