šŸ’¬ Schedule appointments from AI voice calls with VAPI, OpenAI, and Google Calendar

⚔ 15 views Ā· šŸ’¬ Support Chatbots

Description

DESCRIPTION

Automate appointment booking through voice calls by integrating VAPI voice agent with AI-powered calendar management. This workflow receives scheduling requests via webhook, uses OpenAI to intelligently check availability, books appointments in Google Calendar, and responds in real-time during the phone call.


KEY FEATURES

Real-time voice scheduling: Processes appointment requests during live phone calls with instant confirmation, eliminating callback delays and manual scheduling

AI-powered decision making: OpenAI GPT-4.1 Mini intelligently interprets caller requests, checks calendar availability, and determines optimal booking slots automatically

Google Calendar integration: Seamlessly connects to Google Calendar with two specialized tools - availability checker and appointment booking - for automated calendar management

Webhook-based communication: Receives structured data from VAPI voice agent including name, phone, service type, address, priority level, and scheduling status

Eastern timezone support: All appointments are automatically timestamped using America/New_York timezone for accurate scheduling across regions

Tool-use AI architecture: AI agent has direct access to calendar tools, allowing it to make intelligent decisions based on real availability data


WHAT THIS WORKFLOW DOES

This workflow acts as an intelligent backend for voice-based appointment scheduling. When a customer calls your business and speaks to a VAPI voice agent about booking an appointment, the voice agent sends the scheduling details to this n8n workflow via webhook. The AI assistant powered by OpenAI GPT-4.1 Mini receives the request, checks your Google Calendar for availability during the requested time slot, and automatically books the appointment if available. The workflow then sends a confirmation response back to the voice agent, which can immediately confirm the booking to the caller while they’re still on the phone.

Perfect for service businesses, medical offices, consultation services, and any organization using VAPI for phone automation who want to eliminate manual appointment scheduling and provide instant booking confirmations to customers.


INPUT


PROCESSING

Step 1: Receive scheduling request The workflow receives a webhook POST request from the VAPI voice agent containing structured JSON data with customer details, service type, requested time, address, and priority level.

Step 2: AI processes the request OpenAI GPT-4.1 Mini AI agent analyzes the scheduling request and determines the appropriate action based on business rules, priority levels, and calendar availability.

Step 3: Check calendar availability The AI uses the ā€œCheck Calendar Availabilityā€ tool to query Google Calendar and verify if the requested time slot is available for booking.

Step 4: Book the appointment If the slot is available, the AI uses the ā€œBook Appointment in Calendarā€ tool to create a new calendar entry with a 3-hour default duration and all customer details.

Step 5: Send real-time response The workflow immediately responds to the VAPI voice agent with booking confirmation or alternative availability, allowing the agent to inform the caller during the same phone call.


OUTPUT


SETUP INSTRUCTIONS

Prerequisites


Step 1: Import the Workflow

  1. Download or copy the workflow JSON
  2. In n8n, go to Workflows → Import from file / JSON
  3. Import the workflow
  4. Review the imported nodes and connections

Step 2: Configure Credentials

Set up the required credentials inside n8n’s credential manager:

Important: No credentials are hardcoded. All must be connected via n8n’s credential manager.


Step 3: Configure Google Calendar

  1. Open both calendar tool nodes:
    • ā€œCheck Calendar Availabilityā€
    • ā€œBook Appointment in Calendarā€
  2. Update the calendar email address to your target calendar
  3. Verify OAuth2 connection is active
  4. Test calendar access by running a manual test

Step 4: Configure VAPI Webhook Integration

  1. Copy the webhook URL from the ā€œReceive Scheduling Request from VAPIā€ node
  2. Log into your VAPI dashboard
  3. Navigate to your voice agent’s tool configuration
  4. Add a new webhook tool called scheduling_tool
  5. Paste the n8n webhook URL
  6. Configure the webhook to send POST requests with JSON data
  7. Map voice agent variables to webhook payload:
    • name: Customer name from call
    • phone: Customer phone number
    • service: Service type requested
    • address: Customer address
    • priority: Priority level (P1, P2, etc.)
    • status: Call status (Regular, AfterHours, etc.)

Step 5: Customize AI System Prompt

  1. Open ā€œProcess Scheduling with AI Assistantā€ node
  2. Review the system message in options
  3. Customize business rules:
    • Service types offered
    • Priority handling logic
    • After-hours scheduling rules
    • Default appointment duration
  4. Adjust timezone if not using Eastern time
  5. Add specific instructions for your business

Step 6: Configure Appointment Duration

  1. Open ā€œBook Appointment in Calendarā€ tool node
  2. Review the timeMax field (default: 3 hours after start time)
  3. Adjust duration based on your service requirements
  4. Use $fromAI() function to let AI determine duration dynamically
  5. Test with different service types

Step 7: Test the Workflow

Test with webhook simulator:

  1. Use a tool like Postman or curl
  2. Send a POST request to your webhook URL
  3. Use this test payload:
{
  "name": "Test Customer",
  "phone": "919-555-0123",
  "service": "Consultation",
  "address": "123 Main St, Raleigh, NC 27601",
  "priority": "P2",
  "status": "Regular",
  "source": "SchedulingAgent"
}
  1. Verify the workflow executes successfully
  2. Check Google Calendar for the new appointment
  3. Review the webhook response

Test with VAPI voice call:

  1. Call your VAPI-enabled phone number
  2. Request an appointment naturally (e.g., ā€œI need to book a repair service for tomorrow at 2 PMā€)
  3. Verify the voice agent sends data to n8n
  4. Confirm the appointment is created in Google Calendar
  5. Ensure the voice agent confirms booking to you during the call

Step 8: Activate & Monitor

  1. Activate the workflow in n8n
  2. Monitor execution logs for the first few real calls
  3. Review calendar entries for accuracy
  4. Adjust AI prompts based on actual performance
  5. Set up error notifications if needed

WORKFLOW NODE BREAKDOWN

Receive Scheduling Request from VAPI

Type: Webhook Trigger

Purpose: Receives POST requests from VAPI voice agent containing customer scheduling details

Configuration:

Expected Input:

{
  "name": "string",
  "phone": "string",
  "service": "string",
  "address": "string",
  "priority": "string",
  "status": "string",
  "source": "SchedulingAgent"
}

Process Scheduling with AI Assistant

Type: AI Agent (LangChain)

Purpose: Intelligent processing of scheduling requests with access to Google Calendar tools

AI Model: OpenAI GPT-4.1 Mini

System Role:

Key Features:

Tool Access: The AI can autonomously decide when to:

  1. Check availability first
  2. Book appointment if available
  3. Return alternative suggestions if unavailable

OpenAI GPT-4.1 Mini Model

Type: Language Model (Chat)

Purpose: Powers the AI agent with natural language understanding and decision-making

Configuration:

Why GPT-4.1 Mini:


Check Calendar Availability

Type: Google Calendar Tool (AI-accessible)

Purpose: AI tool for querying calendar availability

Configuration:

How AI Uses It: The AI agent calls this tool first to verify if the requested time slot is free before attempting to book. It receives availability data and makes decisions based on the response.


Book Appointment in Calendar

Type: Google Calendar Tool (AI-accessible)

Purpose: AI tool for creating calendar appointments

Configuration:

Dynamic Fields: Uses $fromAI() function to extract:

AI Logic: The AI determines when to call this tool based on availability check results and business rules defined in the system prompt.


Send Response to Voice Agent

Type: Respond to Webhook

Purpose: Sends booking confirmation or status back to VAPI voice agent

Response Format: Returns JSON with booking status, allowing the voice agent to:

Timing: Responds immediately after AI processing completes, ensuring the caller receives feedback during the same phone call.


USE CASES

HVAC & Plumbing Services: Customers call to schedule repairs or maintenance. The voice agent books appointments instantly without putting callers on hold or requiring callbacks.

Medical & Dental Offices: Patients call to book appointments. The AI checks doctor availability and books the appointment while the patient is still on the line, reducing no-shows.

Consulting & Coaching: Professionals using VAPI can automate their booking process. Clients get instant confirmation for consultation slots without email back-and-forth.

Home Services (Cleaning, Repairs, Installations): Service businesses receive booking calls 24/7. The AI handles after-hours calls and books next-day appointments automatically.

Beauty & Wellness (Salons, Spas, Fitness): Customers book appointments via phone. The voice agent accesses real-time availability and confirms bookings immediately.

Legal & Financial Services: Law firms and financial advisors using VAPI can automate client meeting scheduling with priority handling for urgent matters.

Real Estate Showings: Agents using VAPI for property inquiries can automatically schedule showing appointments based on availability.


CUSTOMIZATION OPTIONS

Modify Appointment Duration

Default: 3 hours for all appointments

Customization:

  1. Open ā€œBook Appointment in Calendarā€ node
  2. Edit the timeMax formula
  3. Options:
    • Fixed duration: {{ $now.plus(2, 'hours') }}
    • Service-based: Add conditional logic based on service type
    • AI-determined: Use $fromAI("Duration", "Appointment duration in hours")

Add Google Sheets Logging

Current State: Not implemented System Prompt Mentions: Logging to Peachtree_Scheduling_Log sheet

Implementation:

  1. Add Google Sheets node after AI agent
  2. Connect to your logging sheet
  3. Map fields:
    • Name, phone, service, address
    • Priority, status, timestamp
    • Booking confirmation status
    • Calendar event ID
  4. Use {{ $now.format('America/New_York') }} for timestamp

Add Slack/Email Notifications

Current State: Optional, mentioned in system prompt

Implementation for Slack:

  1. Add Slack node after booking success
  2. Send to scheduling team channel
  3. Include: Customer name, service, time, priority

Implementation for Email:

  1. Add Gmail/Email node after booking
  2. Send to scheduling coordinator
  3. Attach booking details and calendar link

Handle Multiple Service Types

Customize in AI system prompt:

Service Types & Durations:
- Consultation: 1 hour
- Repair: 3 hours
- Installation: 4 hours
- Maintenance: 2 hours

Priority Levels:
- P1: Urgent, book within 24 hours
- P2: Standard, book within 3 days
- P3: Flexible, book within week

Update the AI agent’s system message with your specific service catalog.


Add Conditional Routing

Example: Different calendars for different services

  1. Add Switch node before AI agent
  2. Route based on service type
  3. Use separate Google Calendar tools for each service category
  4. Different technicians/departments get their own calendars

Implement After-Hours Logic

Customize AI prompt:

After-Hours Rules:
- If status = "AfterHours" and time < 8 AM:
  - Book for next available 8 AM slot
- If status = "AfterHours" and time > 6 PM:
  - Book for next business day 9 AM
- If priority = "P1" and after hours:
  - Book emergency slot regardless of time

Multi-Calendar Support

For larger organizations:

  1. Clone calendar tool nodes
  2. Create separate tools for each calendar:
    • Technician 1 calendar
    • Technician 2 calendar
    • Manager calendar
  3. AI can choose appropriate calendar based on:
    • Service type
    • Availability
    • Priority level

TROUBLESHOOTING

Webhook not receiving data

Calendar availability check fails

Appointments not being created

AI not using calendar tools

Wrong timezone on appointments

VAPI not receiving response

Duplicate bookings created


IMPORTANT NOTES

VAPI integration: This workflow is specifically designed for VAPI voice agent platform. It expects structured JSON data from VAPI’s webhook system. Other voice platforms may require webhook format adjustments.

Real-time requirement: The workflow must respond quickly (under 5 seconds) to maintain natural phone conversation flow. Avoid adding heavy processing nodes that could slow response time.

Tool-use architecture: This workflow uses n8n’s AI agent with tool-use capabilities. The AI autonomously decides when to check availability and when to book appointments based on the conversation context.

Cost considerations: OpenAI GPT-4.1 Mini API calls cost approximately $0.001-0.003 per scheduling request. Google Calendar API is free for normal usage but has rate limits.

Timezone handling: All timestamps use America/New_York timezone by default. Adjust the timezone in the system prompt if your business operates in a different region.

Default appointment duration: Appointments are set to 3 hours by default. Customize this in the ā€œBook Appointment in Calendarā€ node or let AI determine duration dynamically.

Priority levels: The system prompt mentions priority handling (P1, P2) but doesn’t implement specific logic. Customize the AI prompt to add priority-based scheduling rules.

After-hours scheduling: The workflow receives ā€œAfterHoursā€ status but doesn’t implement special handling. Add conditional logic or AI instructions for after-hours booking rules.

Google Sheets logging: The system prompt mentions logging to a Google Sheet named Peachtree_Scheduling_Log, but this functionality is not implemented. Add a Google Sheets node if you need appointment logging.

Notification system: Optional Slack/Email notifications are mentioned in the system prompt but not implemented. Add notification nodes for internal team alerts.

No error handling: The current workflow doesn’t include explicit error nodes. Consider adding error handling for failed bookings or API timeouts.

Single calendar only: The workflow currently supports one Google Calendar. For multi-technician scheduling, clone the workflow or add calendar routing logic.


RESOURCES


SUPPORT

Need help or custom development?

šŸ“§ Email: info@incrementors.com
🌐 Contact Form: https://www.incrementors.com/contact-us/


šŸ”— Nodes Used

Google Sheets, Webhook, Google Calendar, AI Agent, OpenAI Chat Model, Structured Output Parser

šŸ“„ Import

Download workflow.json and import into n8n: Workflow menu → Import from File

šŸ“– Importing guide Ā· šŸ”‘ Credential setup