Showcase > Customer Service

AI-Powered Phone Agent

29-node n8n workflow using Retell AI, Qdrant, OpenAI, and Google Calendar for RAG-powered voice phone agent support.

ShowcaseAdvanced5 min read

A 29-node voice AI system that answers your phone, understands your callers, and takes action -- powered by three independent webhook endpoints working behind a Retell AI interface. This is not a chatbot with a phone number. This is a production-grade phone agent that processes calls, answers questions from a knowledge base using RAG, and checks calendar availability in real time. Three distinct functions, three webhook pipelines, one seamless caller experience.

Nodes Category Complexity Key Integrations
29 Customer Service / Voice AI Advanced Retell AI, OpenAI, Qdrant, Google Calendar, Telegram

Prerequisites

  • Retell AI account with API access and a configured phone agent
  • OpenAI API key for embeddings and LLM Chain processing
  • Qdrant instance (cloud or self-hosted) with a populated knowledge base collection
  • Google Calendar OAuth2 credentials for availability checking
  • Google Drive OAuth2 credentials for knowledge base document ingestion
  • Telegram Bot Token for receiving call summaries
  • Knowledge level: Advanced -- requires understanding of webhooks, vector databases, and real-time API latency constraints

Estimated Setup Time

60-90 minutes including Retell AI configuration, Qdrant setup, credential connections, and knowledge base ingestion.

What It Does

This workflow serves as the backend brain for a Retell AI phone agent. It exposes three webhook endpoints, each handling a different aspect of the phone interaction. The first endpoint processes completed calls -- filtering, extracting key points, and sending formatted summaries to Telegram. The second endpoint provides real-time RAG-powered answers by querying a Qdrant vector database during active calls. The third converts natural language date requests into calendar lookups and availability responses.

The RAG pipeline is the standout component. When a caller asks a question about your services, pricing, or policies, the phone agent hits the second webhook in real time. OpenAI Embeddings convert the question into a vector, Qdrant retrieves the most relevant knowledge base entries, and an LLM Chain synthesizes a natural-sounding answer -- all within the latency window required for a natural phone conversation.

The calendar integration handles the most common phone inquiry for service businesses: "When are you available?" The caller says something like "next Tuesday afternoon" and the system converts that natural language into a structured date query, checks Google Calendar, and returns available slots in a format the phone agent can speak naturally.

Workflow Diagram

Workflow Diagram

Node Breakdown

Triggers

  • Webhook x3

AI & Knowledge

  • LLM Chain x2
  • AI Agent
  • OpenAI x4
  • OpenAI Embeddings
  • Token Splitter
  • Qdrant Vector Store

Integrations

  • Google Calendar
  • Google Drive
  • Telegram
  • Respond to Webhook

Logic

  • Filter
  • Set

Step-by-Step Flow

  1. Webhook Reception -- Retell AI sends data to one of three webhook endpoints depending on the interaction type: post-call processing, real-time question answering, or availability checking.

  2. Call Processing Pipeline -- When a call completes, the first webhook receives the full transcript. A Filter node removes spam and non-substantive calls. The remaining calls pass through an LLM Chain that extracts key points, caller intent, action items, and sentiment. A formatted summary is sent to Telegram for immediate visibility.

  3. RAG Knowledge Retrieval -- During an active call, when the caller asks a question, Retell AI hits the second webhook with the question text. OpenAI Embeddings converts the question into a vector. Qdrant searches the knowledge base for the most relevant entries. An LLM Chain synthesizes a natural answer from the retrieved context and returns it to Retell within the required latency window.

  4. Knowledge Base Ingestion -- A separate sub-flow handles knowledge base updates. Documents from Google Drive are split by the Token Splitter, embedded via OpenAI Embeddings, and stored in Qdrant. This keeps the RAG pipeline current with your latest service information.

  5. Availability Checking -- The third webhook receives natural language date expressions from callers. The AI Agent parses "next Tuesday afternoon" or "sometime this week" into structured date ranges, queries Google Calendar for conflicts, and returns available time slots formatted for natural speech.

  6. Webhook Response -- Each pipeline returns a structured response to Retell AI within the latency requirements of live phone conversation. The RAG and calendar endpoints must respond in under two seconds to maintain natural conversational flow.

What Sets It Apart

Voice AI integration with Retell. This workflow demonstrates that n8n can serve as the backend intelligence for voice AI platforms. Retell handles the speech-to-text and text-to-speech; n8n handles everything else -- call processing, knowledge retrieval, and calendar management.

Three distinct phone functions via webhooks. Each webhook endpoint is a specialized microservice. Post-call processing handles asynchronous summarization. RAG handles synchronous knowledge retrieval. Calendar handles synchronous availability checking. This separation keeps each pipeline focused and maintainable.

RAG for real-time knowledge retrieval during calls. The Qdrant-powered RAG pipeline returns contextual answers in under two seconds during live phone calls. This is not batch processing -- it is real-time AI that answers caller questions with your actual business information, not hallucinated generalities.

Cost Considerations

  • Retell AI: Pay-per-minute pricing for phone calls (typically $0.07-0.12/min depending on plan)
  • OpenAI: Embedding costs for knowledge base ingestion plus LLM Chain calls per active call (~$0.01-0.05 per call interaction)
  • Qdrant Cloud: Free tier available (1GB); self-hosted is free with your own infrastructure
  • Google Calendar & Drive: Free with a Google Workspace or personal account
  • Telegram: Free

Ideal For

  • Service businesses (plumbers, electricians, consultants) needing 24/7 phone coverage
  • Dental and medical offices handling appointment inquiries after hours
  • Real estate agents capturing lead information when unavailable
  • Any business wanting AI phone support without a call center

Tip: Key Techniques

Multi-Webhook Architecture -- Exposing multiple webhook endpoints from a single n8n workflow creates a microservice-like architecture. Each endpoint handles a specific function with its own processing pipeline, keeping logic clean and maintainable.

Low-Latency RAG -- For real-time voice applications, RAG retrieval must complete in under two seconds. This requires pre-embedded knowledge bases, efficient vector search (Qdrant), and minimal post-processing. Test latency under load before deploying to production.

Natural Language Date Parsing -- Using an AI agent to convert spoken date expressions ("next Tuesday afternoon") into structured calendar queries. This handles the ambiguity and variety of how people express dates in conversation far better than regex or rule-based parsers.

Download

The workflow.json file in this folder can be imported directly into your n8n instance via Settings > Import Workflow.

Want this running in your stack?

I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.