This guide walks you through creating a voice-based AI system using Retell AI, with a focus on voice selection, tone, prompt design, setting up a knowledge base, managing bookings and FAQs, handling call transfers, designing dynamic prompt trees, and integrating with Google Sheets and n8n for real-time updates. Let’s dive in!
Retell AI lets you build conversational voice agents for customer service, bookings, and more. Sign up at retell.ai and grab your API keys from the dashboard to get started.
Retell AI offers a range of voices to match your brand. For this guide, we’ll pick a clear, professional US English voice with a friendly tone.
voice_us_english_female_001) and note it for your agent setup.{
"voice_id": "voice_us_english_female_001",
"tone": {
"pitch": 1.0,
"speed": 0.9,
"warmth": 0.8
}
}
A knowledge base helps your voice agent answer common questions accurately and quickly.
{
"faqs": [
{
"question": "What are your business hours?",
"answer": "We’re open Monday through Friday, 9 AM to 5 PM."
},
{
"question": "How do I cancel a booking?",
"answer": "You can cancel by calling us or using our online portal."
}
]
}
Set up a webhook in Retell AI to process incoming queries and match them to your knowledge base using natural language processing (NLP).
Your voice agent can handle bookings, answer FAQs, and transfer calls to human agents when needed.
transfer_call API to redirect calls to a human agent’s number.if (userQuery.includes("speak to a person")) {
retellClient.transferCall({
call_id: callId,
to_number: "+1234567890"
});
}
Dynamic prompt trees guide the conversation, making it feel natural and responsive.
const promptTree = {
greeting: {
response: "Hello! Thanks for calling. How can I help you today?",
next: {
"book appointment": {
response: "Great! What date and time would you like?",
collect: ["date", "time", "name"]
},
"question": {
response: "Please ask your question, and I’ll do my best to help.",
action: "query_knowledge_base"
},
"human": {
action: "transfer_call"
}
}
}
};
Google Sheets is a simple way to store and manage booking data or FAQs with real-time updates.
googleapis in Node.js to read and write data.const { google } = require('googleapis');
const sheets = google.sheets('v4');
async function addBooking(auth, bookingData) {
const request = {
spreadsheetId: 'YOUR_SPREADSHEET_ID',
range: 'Sheet1!A:C',
valueInputOption: 'RAW',
insertDataOption: 'INSERT_ROWS',
resource: {
values: [[bookingData.name, bookingData.date, bookingData.time]]
},
auth: auth
};
await sheets.spreadsheets.values.append(request);
}n8n is a powerful tool for automating tasks like updating Google Sheets or sending confirmation emails.
{
"endpoint": "https://your-n8n-instance/webhook/retell",
"method": "POST",
"data": {
"call_id": "{{callId}}",
"booking": "{{bookingData}}"
}
}
Here’s how the system works:
With Retell AI, Google Sheets, and n8n, you can create a robust voice AI system that handles customer interactions, bookings, and automation with ease. For more details, visit retell.ai. Now you’re ready to build a system that’s as reliable as it is user-friendly!
Thank you! First, set the necessary Accounts: N8N Open AI Great, here's the prompt for…
This website uses cookies.