Quick Overview
This workflow lets a Vapi voice assistant manage appointments by checking and updating Google Calendar, sending confirmations via Twilio SMS, and logging callback messages to Google Sheets, while also sending missed-call follow-ups and auto-replying to inbound SMS.
How it works
- Receives Vapi tool-call webhook requests during a call, normalizes the caller phone number, and routes the request by tool name.
- For availability checks, reads the selected day’s events from Google Calendar and returns a list of open time slots based on clinic hours and slot length.
- For bookings, creates a Google Calendar event, sends a Twilio SMS confirmation to the caller, and returns the booking outcome to Vapi.
- For lookup, searches Google Calendar for upcoming events matching the caller’s phone number and returns a formatted list that includes event IDs for follow-up actions.
- For rescheduling or cancellation, updates or deletes the specified Google Calendar event, sends a Twilio SMS update to the caller, and returns the result to Vapi.
- For message taking or unknown requests, appends the caller’s details to Google Sheets or returns an error message, and then responds to Vapi with the tool result.
- Separately, processes Vapi end-of-call-report events to detect missed calls and sends a Twilio SMS follow-up, and answers inbound Twilio SMS replies with a fixed TwiML message via a webhook.
Setup
- Add credentials for Google Calendar OAuth2, Google Sheets OAuth2, and Twilio.
- Replace placeholders like YOUR_GOOGLE_CALENDAR_ID, YOUR_GOOGLE_SHEET_ID, YOUR_TWILIO_PHONE_NUMBER, and update [YOUR_CLINIC_NAME] in the SMS message texts.
- Create a Google Sheet with columns named Time, Name, Phone, and Reason, and ensure the workflow’s Google Sheets node points to the correct document and sheet.
- In Vapi, configure tools named check_availability, book_appointment, find_booking, reschedule_booking, cancel_booking, and take_message to use the workflow’s Vapi Tools webhook URL, and send end-of-call-report events to the Vapi Events webhook URL.
- In Twilio, set your phone number’s incoming SMS webhook to the workflow’s SMS Reply webhook URL.
- Set the workflow timezone (and optionally the default phone country code and clinic hours/slot length in the code blocks) to match your local scheduling rules.