This n8n workflow integrates with Retell AI to create an intelligent real estate agent that can handle appointment booking, checking, cancellation, and rescheduling through voice interactions. The system automatically manages calendar events, sends confirmation emails, and maintains a database of all interactions.
The workflow consists of two main entry points:
- Tool Call Webhook - Handles real-time appointment management during active calls
- Call Ended Webhook - Logs call summaries and analytics after calls complete
- Purpose: Receives real-time function calls from Retell AI during active conversations
- Method: POST
- Handles: Appointment booking, checking, cancellation, and rescheduling requests
- Purpose: Receives call completion data for logging and analytics
- Method: POST
- Handles: Call summaries, sentiment analysis, and conversation logs
The workflow uses a Switch node to route different actions based on the action parameter:
- check - Verify existing appointments
- book - Create new appointments
- cancel - Cancel existing appointments
- reschedule - Modify appointment times
The workflow integrates with NocoDB to manage appointment data with the following fields:
- Client Name
- Phone Number
- Email Address
- Appointment Time
- Status (Booked/Confirmed/Cancelled/Call Log)
- Meeting Link
- Calendar Event ID
- Summary (for call logs)
Google Calendar Integration handles:
- Creating calendar events with Google Meet links
- Updating appointment times for rescheduling
- Deleting events for cancellations
- 30-minute default duration for all appointments
Gmail Integration sends automated emails for:
- Booking Confirmations: Include meeting links and joining instructions
- Cancellation Notices: Confirm appointment cancellation
- Rescheduling Updates: Notify about time changes
graph TD
A[Retell AI Tool Call] --> B{Action Router}
B -->|check| C[Check Existing Appointments]
B -->|book| D[Book New Meeting]
B -->|cancel| E[Find Row to Cancel]
B -->|reschedule| F[Get Reschedule Data]
C --> G[Create Calendar Event]
D --> H[Response: Book Success]
D --> G
G --> I[Update Database with Meeting Link]
I --> J[Send Confirmation Email]
I --> K[Response: Check Complete]
E --> L[Delete Calendar Event]
L --> M[Update Status to Cancelled]
M --> N[Send Cancellation Email]
N --> O[Response: Cancel Success]
F --> P[Update Calendar Event]
P --> Q[Update Database Row]
Q --> R[Get Email Message]
S[Call Ended Webhook] --> T[Log Call Summary to Database]
style A fill:#e1f5fe
style S fill:#e1f5fe
style B fill:#fff3e0
style G fill:#e8f5e8
style J fill:#fce4ec
style N fill:#fce4ec
- Receive phone number from Retell AI
- Query NocoDB for existing appointments
- Create calendar event if appointment exists
- Update database with meeting link and confirmation status
- Send confirmation email with meeting details
- Return appointment details to Retell AI
- Receive customer details (name, phone, email, time)
- Create new record in NocoDB
- Generate Google Calendar event with Meet link
- Update database with meeting link and event ID
- Send confirmation email to customer
- Return success response to Retell AI
- Find existing appointment by phone number
- Delete corresponding Google Calendar event
- Update database status to "Cancelled"
- Send cancellation confirmation email
- Return cancellation success to Retell AI
- Retrieve appointment details by ID
- Update Google Calendar event with new time
- Update database with new schedule information
- Process email notifications
- Return reschedule confirmation
The workflow receives structured data from Retell AI including:
- Action type (check/book/cancel/reschedule)
- Customer information (name, phone, email)
- Appointment details (time, preferences)
- Call metadata (sentiment, summary)
Table: Appointments
- Id (Primary Key)
- ClientName (Text)
- PhoneNumber (Text)
- Email (Text)
- AppointmentTime (DateTime)
- Status (Text: Booked/Confirmed/Cancelled/Call Log)
- MeetingLink (Text)
- CalendarEventId (Text)
- Summary (Text)
- Language/Sentiment (Text)
- StartTime (DateTime)
- EndTime (DateTime)
- EmailSent (Boolean)
- Google Calendar API: Event management and Meet link generation
- Gmail API: Automated email communications
When calls end, the workflow automatically:
- Extracts caller information and sentiment
- Stores call summary and analysis
- Logs conversation metadata
- Tracks customer interaction patterns
- n8n instance (cloud or self-hosted)
- Retell AI account with webhook configuration
- NocoDB database setup
- Google Workspace account with API access
- Gmail account for sending notifications
Configure these webhook URLs in your Retell AI dashboard:
- Tool calls:
https://your-n8n-instance.com/webhook/retell-tool - Call ended:
https://your-n8n-instance.com/webhook/retell-summary
For local development, use ngrok or similar tunneling service to expose your n8n webhooks to Retell AI.
{
"result": "success",
"message": "Appointment booked successfully for [Customer Name]"
}{
"result": "Found 1 existing appointment(s)",
"appointment_details": {
"Id": "123",
"ClientName": "John Doe",
"AppointmentTime": "2024-01-20T10:00:00Z",
"Status": "Confirmed"
}
}The workflow includes robust error handling for:
- Invalid phone numbers or email addresses
- Calendar conflicts and availability issues
- Database connection failures
- Email delivery problems
- Missing or malformed webhook data
- All webhook endpoints use HTTPS
- Database credentials are stored securely in n8n
- Email templates sanitize user input
- Phone numbers are validated before database queries
The workflow provides comprehensive logging through:
- Call summary storage for conversation analysis
- Appointment status tracking
- Email delivery confirmation
- Calendar event synchronization status
This automation streamlines the entire real estate appointment process, from initial customer contact through final confirmation, while maintaining detailed records for business analytics and customer relationship management.





