Webhook tool

Google Calendar AI voice agents that book into open slots

The agent checks when you are free and books the event through a small service of yours that holds the Google OAuth session.

Appointment agent

Offers free times and books events.

Instructions

Ask what the appointment is for. Offer two free times from the availability tool and book the one the caller picks. Read the date and time back before ending the call. If the caller asks for a person, transfer to the office.

Handoff
Office

Connected tools

  • Get free timesWebhook
  • Create eventWebhook
  • Transfer to officeTransfer

What a Google Calendar AI voice agent can do

Open one to watch a call. The grey lines are the tools the agent calls mid-sentence.

The agent asks your service for free times in a window on the calendar, and offers the caller two of them on the call.

Tool definitions

Webhook tools go to POST /v1/agents/tools. Transfers are a system tool on the agent. Replace the placeholder values in capitals with your own.

Webhook

Get free times

Returns free windows on a calendar.

Show the JSON definition
get_free_times
{
  "type": "webhook",
  "name": "get_free_times",
  "description": "Lists free windows on the calendar for a date.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-company.com/google/freebusy",
    "method": "GET",
    "query_params_schema": {
      "properties": {
        "date": {
          "type": "string",
          "description": "Date to check, YYYY-MM-DD."
        },
        "duration_minutes": {
          "type": "string",
          "description": "Length of the appointment in minutes."
        },
        "calendar_id": {
          "type": "string",
          "constant_value": "YOUR_CALENDAR_ID"
        }
      },
      "required": [
        "date",
        "duration_minutes"
      ]
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  }
}

Webhook

Create event

Creates the event.

Show the JSON definition
create_event
{
  "type": "webhook",
  "name": "create_event",
  "description": "Creates the appointment on the calendar.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-company.com/google/events",
    "method": "POST",
    "request_body_schema": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "description": "Start time, ISO 8601 with offset."
        },
        "duration_minutes": {
          "type": "string",
          "description": "Length in minutes."
        },
        "attendee_name": {
          "type": "string",
          "description": "Caller's name."
        },
        "reason": {
          "type": "string",
          "description": "Reason for the appointment."
        },
        "caller_phone": {
          "type": "string",
          "dynamic_variable": "system__caller_id"
        },
        "calendar_id": {
          "type": "string",
          "constant_value": "YOUR_CALENDAR_ID"
        }
      },
      "required": [
        "start",
        "duration_minutes",
        "attendee_name",
        "reason"
      ]
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  }
}

Transfer

Transfer to office

Cold transfer to your office.

Show the JSON definition
transfer_to_office
{
  "config": {
    "system_tools": {
      "transfer_to_number": {
        "description": null,
        "pre_tool_speech": "auto",
        "transfers": [
          {
            "destination": {
              "type": "phone",
              "phone_number": "+14155550122"
            },
            "condition": "The caller asks for a person, or no free time works."
          }
        ]
      }
    }
  }
}

Set it up

No native connector. Webhook tools call a service of yours, which uses the Google Calendar API with your OAuth consent. Vendor details read in October 2026.

  1. Create OAuth credentials

    In Google Cloud, enable the Calendar API and create credentials, then complete consent for the calendar owner.

  2. Run the two endpoints

    Your service calls the freeBusy and events endpoints and refreshes the access token.

  3. Add the tools

    Configure both webhooks with a bearer secret for your service, and replace YOUR_CALENDAR_ID with the calendar's ID.

  4. Test in two time zones

    Check an event that crosses midnight or a daylight saving change.

Before you build

Why not call Google directly

Google access tokens last about an hour, and a webhook tool cannot refresh one. A service of yours can.

Time zones

Have your service return times in the calendar's time zone, and tell the agent how to say them to the caller.

Enterprise-grade security

  • HIPAA compliant badge

    HIPAA compliant

  • SOC 2 Type 2 badge

    SOC 2 Type 2

  • GDPR badge

    GDPR

Google Calendar AI voice agent FAQs

Can an AI receptionist book appointments in Google Calendar?

Yes. A Cartesia agent checks free times and creates the event through a small service of yours that calls the Google Calendar API's freeBusy and events endpoints. The event holds the caller's name, phone and reason in its description. There is no native Google Calendar connector, so you run the service.

Why can't the voice agent call the Google Calendar API directly?

Google access tokens last about an hour, and a webhook tool sends the value you stored without refreshing it. Your service holds the OAuth consent, refreshes the token, and exposes two endpoints the agent calls with a bearer secret.

What Google Cloud setup does a calendar voice agent need?

In Google Cloud, enable the Calendar API, create OAuth credentials, and complete consent as the calendar owner. Your service then calls freeBusy and events with that consent and keeps the access token fresh. The agent itself only holds a secret for your service.

How does the agent handle time zones in Google Calendar?

Your service returns free times in the calendar's time zone, and the agent's instructions say how to read them to the caller. The agent reads the date and time back before the call ends. Test an event that crosses midnight or a daylight saving change before you go live.

What does a Google Calendar voice agent cost to run?

Agents run at $0.03/min, plus LLM usage and telephony. You host the small service that holds the Google OAuth session. Transfers work only on Twilio and SIP trunk numbers, not on Cartesia numbers, so put the number on Twilio or a SIP trunk if the agent hands callers to staff.

Get started today

Talk to an expert.

Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.

Contact Sales

Start building.

Access our models via API and bring a voice agent into production in minutes.

Try Cartesia