Skip to main content

Scheduling Nodes

Scheduling Nodes enable your agents to check availability, book appointments, and manage calendar operations during conversations.

Overview

Scheduling Nodes can:
  • Check real-time availability
  • Book appointments
  • Reschedule existing appointments
  • Cancel appointments
  • Send confirmations and reminders

Calendar Integrations

Supported Calendars

CalendarIntegration Type
Google CalendarOAuth 2.0
Microsoft OutlookOAuth 2.0
CalendlyAPI
Custom/EMRWebhook

Connecting Calendars

1

Navigate to Integrations

Go to SettingsIntegrationsCalendars
2

Select Provider

Choose your calendar provider
3

Authorize

Complete the OAuth flow
4

Configure

Set default calendar and availability rules

Availability Check Node

Query available time slots:
{
  "type": "check_availability",
  "calendar_id": "appointments@yourcompany.com",
  "inputs": {
    "date_range": {
      "start": "{{requested_date}}",
      "days": 7
    },
    "duration_minutes": 30,
    "provider": "{{selected_provider}}"
  },
  "outputs": ["available_slots"]
}

Output Format

{
  "available_slots": [
    {
      "start": "2024-01-20T09:00:00Z",
      "end": "2024-01-20T09:30:00Z",
      "provider": "Dr. Johnson"
    },
    {
      "start": "2024-01-20T10:00:00Z",
      "end": "2024-01-20T10:30:00Z",
      "provider": "Dr. Johnson"
    }
  ]
}

Speaking Availability

The agent converts slots to natural speech:
"I have availability with Dr. Johnson on Monday the 20th. 
I can offer you 9 AM or 10 AM. Which works better for you?"

Book Appointment Node

Create a new appointment:
{
  "type": "book_appointment",
  "calendar_id": "appointments@yourcompany.com",
  "inputs": {
    "start_time": "{{selected_slot.start}}",
    "duration_minutes": 30,
    "attendee": {
      "name": "{{caller_name}}",
      "phone": "{{caller_phone}}",
      "email": "{{caller_email}}"
    },
    "title": "{{appointment_type}} - {{caller_name}}",
    "notes": "{{collected_notes}}"
  },
  "outputs": ["appointment_id", "confirmation_code"]
}

Confirmation

{
  "confirmation": {
    "send_sms": true,
    "send_email": true,
    "message_template": "appointment_confirmation"
  }
}

Reschedule Node

Modify existing appointments:
{
  "type": "reschedule_appointment",
  "inputs": {
    "appointment_id": "{{appointment_id}}",
    "new_start_time": "{{new_selected_slot.start}}"
  },
  "outputs": ["updated_appointment"]
}

Lookup by Caller

{
  "type": "find_appointment",
  "inputs": {
    "caller_phone": "{{caller_phone}}",
    "date_range": {
      "start": "now",
      "days": 30
    }
  },
  "outputs": ["appointments"]
}

Cancel Node

Cancel appointments:
{
  "type": "cancel_appointment",
  "inputs": {
    "appointment_id": "{{appointment_id}}",
    "reason": "{{cancellation_reason}}"
  },
  "options": {
    "send_notification": true,
    "offer_reschedule": true
  }
}

Availability Rules

Business Hours

{
  "availability_rules": {
    "timezone": "America/New_York",
    "business_hours": {
      "monday": { "start": "09:00", "end": "17:00" },
      "tuesday": { "start": "09:00", "end": "17:00" },
      "wednesday": { "start": "09:00", "end": "17:00" },
      "thursday": { "start": "09:00", "end": "17:00" },
      "friday": { "start": "09:00", "end": "17:00" }
    }
  }
}

Buffer Time

{
  "availability_rules": {
    "buffer_before_minutes": 15,
    "buffer_after_minutes": 15,
    "minimum_notice_hours": 24,
    "maximum_advance_days": 60
  }
}

Slot Duration

{
  "availability_rules": {
    "slot_duration_minutes": 30,
    "slot_increment_minutes": 15
  }
}

Provider-Specific

{
  "providers": [
    {
      "id": "dr_johnson",
      "name": "Dr. Johnson",
      "calendar_id": "johnson@clinic.com",
      "services": ["consultation", "follow_up"],
      "availability": {
        "monday": { "start": "09:00", "end": "12:00" },
        "wednesday": { "start": "14:00", "end": "17:00" }
      }
    }
  ]
}

Conflict Handling

Double-Booking Prevention

{
  "conflict_handling": {
    "check_before_booking": true,
    "retry_on_conflict": true,
    "offer_alternatives": 3
  }
}

Concurrent Booking Race

When multiple calls book simultaneously:
  1. Optimistic locking on slot
  2. If conflict, automatically offer next available
  3. Agent seamlessly handles: “Actually, that slot just got taken. How about 10:30 instead?”

Reminders

Automated Reminders

{
  "reminders": [
    {
      "type": "sms",
      "before_hours": 24,
      "template": "reminder_24h"
    },
    {
      "type": "sms",
      "before_hours": 2,
      "template": "reminder_2h"
    },
    {
      "type": "call",
      "before_hours": 24,
      "agent_id": "agent_reminder"
    }
  ]
}

Confirmation Requests

{
  "confirmation_request": {
    "enabled": true,
    "before_hours": 24,
    "method": "sms",
    "message": "Reply YES to confirm your appointment tomorrow at {{time}} or RESCHEDULE to change.",
    "handle_responses": {
      "yes": "mark_confirmed",
      "reschedule": "initiate_reschedule_flow"
    }
  }
}

Custom Calendar Integration

Connect to custom systems via webhook:
{
  "calendar_integration": {
    "type": "webhook",
    "endpoints": {
      "check_availability": "https://your-system.com/api/availability",
      "book_appointment": "https://your-system.com/api/appointments",
      "cancel_appointment": "https://your-system.com/api/appointments/cancel"
    },
    "auth": {
      "type": "bearer",
      "token": "{{secrets.CALENDAR_API_KEY}}"
    }
  }
}

Request Format

// Check availability request
{
  "action": "check_availability",
  "date_start": "2024-01-20",
  "date_end": "2024-01-27",
  "provider_id": "dr_johnson",
  "duration_minutes": 30
}

// Book appointment request
{
  "action": "book",
  "slot": {
    "start": "2024-01-20T09:00:00Z",
    "end": "2024-01-20T09:30:00Z"
  },
  "patient": {
    "name": "John Smith",
    "phone": "+14155551234"
  }
}

Conversation Flow

Natural Date Handling

The agent understands natural language:
User SaysInterpreted As
”next Tuesday”Next Tuesday from today
”tomorrow afternoon”Tomorrow, 12pm-5pm window
”sometime next week”7-day range starting Monday
”January 20th”2024-01-20

Time Preferences

{
  "time_preferences": {
    "morning": { "start": "09:00", "end": "12:00" },
    "afternoon": { "start": "12:00", "end": "17:00" },
    "evening": { "start": "17:00", "end": "20:00" }
  }
}

Events

Scheduling events are emitted:
EventTrigger
appointment.check_availabilityAvailability queried
appointment.createdNew appointment booked
appointment.rescheduledAppointment moved
appointment.cancelledAppointment cancelled
appointment.confirmedAppointment confirmed
appointment.reminder_sentReminder delivered

Best Practices

Read back appointment details before finalizing.
If requested time isn’t available, suggest 2-3 alternatives.
Confirm timezone when caller’s location differs from business.
Send SMS/email confirmation while still on the call.
Handle race conditions gracefully with alternative offers.

Next Steps