Voice RAG Chatbot with ElevenLabs and OpenAI n8n Workflow Template

n8n workflow template · 18 nodes · Qdrant

Voice RAG Chatbot with ElevenLabs and OpenAI is a free n8n workflow template that starts when its webhook receives an HTTP request and works with Qdrant, OpenAI and Google Drive. It has 18 nodes, 11 of them AI nodes (AI Agent, Vector Store Question Answer Tool, Qdrant Vector Store and OpenAI Embeddings). The notes inside the workflow say: “Add the widget to your business website by replacing AGENT_ID with the agent id you created on ElevenLabs” To run it, you add your own credentials for Google Drive OAuth2, HTTP Header Auth, OpenAI API and Qdrant API.

At a glance

Trigger
Webhook (Listen)
Nodes
18
Apps
Qdrant, OpenAI and Google Drive
AI nodes
11
Credentials
4 types
Category
RAG, documents and vector search

Apps and integrations

  • Qdrant
  • OpenAI
  • Google Drive

Node types used

  • AI Agent
  • Vector Store Question Answer Tool
  • Qdrant Vector Store
  • OpenAI Embeddings
  • Manual Trigger
  • HTTP Request
  • Google Drive
  • Default Data Loader
  • Token Splitter
  • Respond to Webhook
  • OpenAI Chat Model
  • Webhook
  • Window Buffer Memory

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

STEP 5

Add Widget

Add the widget to your business website by replacing AGENT_ID with the agent id you created on ElevenLabs

STEP 3

Documents vectorization with Qdrant and Google Drive

STEP 2

Create Qdrant Collection

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

STEP 1

Create an Agent on ElevenLabs

  • Create an agent on ElevenLabs (eg. test_n8n)
  • Add "First message" (eg. Hi, Can I help you?)
  • Add the "System Prompt" message... eg

'You are the waiter of "Pizzeria da Michele" in Verona. If you are asked a question, use the tool "test_chatbot_elevenlabs". When you receive the answer from "test_chatbot_elevenlabs" answer the user clearly and precisely.'

  • In Tools add a Webhook called eg. "test_chatbot_elevenlabs" and add the following description

'You are the waiter. Answer the questions asked and store them in the question field.'

  • Add the n8n webhook URL (method POST)
  • Enable "Body Parameters" and insert in the description "Ask the user the question to ask the place.", then in the "Properties" add a data type string called "question", value type "LLM Prompt" and description "user question"

STEP 4

RAG System

Click on "test workflow" on n8n and "Test AI agent" on ElevenLabs. If everything is configured correctly, when you ask a question to the agent, the webhook on n8n is activated with the "question" field in the body filled with the question asked to the voice agent.

The AI Agent will extract the information from the vector database, send it to the model to create the response which will be sent via the response webhook to ElevenLabs which will transform it into voice

Nodes in this workflow

The 18 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. AI Agent (AI Agent)
  2. Vector Store Tool (Vector Store Question Answer Tool)
  3. Qdrant Vector Store (Qdrant Vector Store)
  4. Embeddings OpenAI (OpenAI Embeddings)
  5. When clicking ‘Test workflow’ (Manual Trigger)
  6. Create collection (HTTP Request)
  7. Refresh collection (HTTP Request)
  8. Get folder (Google Drive)
  9. Download Files (Google Drive)
  10. Default Data Loader (Default Data Loader)
  11. Token Splitter (Token Splitter)
  12. Qdrant Vector Store1 (Qdrant Vector Store)
  13. Embeddings OpenAI1 (OpenAI Embeddings)
  14. Respond to ElevenLabs (Respond to Webhook)
  15. OpenAI (OpenAI Chat Model)
  16. Listen (Webhook)
  17. Window Buffer Memory (Window Buffer Memory)
  18. OpenAI Chat Model (OpenAI Chat Model)

Credentials you need

  • Google Drive OAuth2 – used by Download Files and Get folder
  • HTTP Header Auth – used by Create collection and Refresh collection
  • OpenAI API – used by Embeddings OpenAI, Embeddings OpenAI1, OpenAI and OpenAI Chat Model
  • Qdrant API – used by Qdrant Vector Store and Qdrant Vector Store1

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us