All projects · AI Agents & RAG
Voice Booking — BOOK (Vapi + Google Calendar)
An n8n webhook backend for a Vapi voice AI agent that books appointments during a phone call.
An n8n webhook backend for a Vapi voice AI agent that books appointments during a phone call. When the caller asks to book, the agent fires a tool call to this webhook, which creates a Google Calendar event and returns a single spoken confirmation sentence.
- Defensive parsing of the Vapi tool-call payload (handles toolCallList / toolWithToolCallList / toolCalls shapes) so the flow survives minor structure changes
- Creates a 30-minute event (end = start + 30 min via Luxon DateTime) and adds the caller's email as an attendee
- Builds a single-line spoken confirmation (strips line breaks because Vapi rejects them) and branches the wording on calendar success vs failure
- onError: continueRegularOutput on the calendar node so a booking failure still returns a graceful spoken message instead of erroring the call
Built with: n8n, Vapi (voice AI tool-calling webhook), Google Calendar OAuth2, n8n Code node (JavaScript), Respond to Webhook