Skip to main content
This example is a booking product you run: a website or clinic backend that offers times, an AI agent that negotiates a slot on the phone, and a calendar that actually holds the event. Trikon Voice supplies the phone call and (when you connect it) Google Calendar tools on the agent. Your app supplies the booking record, reminders, and UI.

Architecture

Two complementary designs. You can use both. Most clinic and demo-booking apps start with A.

Shared setup

  1. Create an outbound agent (and optionally an inbound agent on your number) with booking instructions. See Create your first bot.
  2. On that agent, Integrations → Google Calendar → Authorize so get_availability and create_event work on the live call.
  3. Put calendar keywords in the system script (google calendar, get_availability, create_event) as described in the Google Calendar guide.
  4. Copy API key, workspace slug, agent ID, and from UUID. Set the webhook to your booking service.

Design A — the agent books during the call

System instructions (copy into the agent)

Pass known facts so the agent does not re-ask them:
Use {{clinic_name}}, {{visit_type}}, and {{patient_email}} in the greeting and script.

Your booking table

The calendar event is created on the call by the agent. Your webhook still records it so the website can show “You’re booked”:
Parse date/time from summary or transcript if you need slot_start in SQL. Instruct the agent to always say the booking in a fixed shape, e.g. Confirmed: 12 October 2026 15:00 IST. Webhook fields: Webhooks.

Design B — your system holds the slot, the agent confirms

Use this when slots live in your scheduler (not only Google Calendar).
1

Customer picks a time on your site

Insert appointments with status = pending. Do not mark booked yet.
2

Trigger the confirmation call

POST /api/outbound-call with metadata:
3

Agent script

“You are confirming an existing hold. Tell them the time in {{slot_start}}. If they say yes, thank them. If they want another time, note the new preference; do not invent a calendar event unless Google Calendar tools are enabled.”
4

Webhook

Map intent to booked vs cancelled vs reschedule_requested and update your scheduler (release the hold, create the real appointment, or open a new slot picker).

Inbound: they call you to book

Put the same booking agent on an inbound number (Phone numbers). No outbound-call is required. The webhook still fires when the call ends, so your appointments table stays in sync.

End-to-end checks

1

Playground

Test the script in the browser first (Test your bot).
2

Calendar

Call yourself, ask for a real slot, confirm a Google Calendar event and invite appear.
3

Your app

After hangup, analysis.completed should set appointments.status = booked (design A) or confirm the hold (design B).
Calendar tools run only if that agent is connected to Google Calendar. Connecting a calendar on a different agent does not apply. Timezone for spoken times defaults to IST.