Google Calendar integration

Google Calendar AI agents: schedule and reschedule from chat

The Calendar API is a REST API authenticated with an OAuth access token. Use a stored token for a shared calendar, or forward the signed-in end user's own token so the agent books on their calendar and nobody else's.

Tool type
HTTP API
Auth type
oauth2 or end_user_token
Safety level
safe_read for availability, write_safe for events

What you can build

A scheduling assistant that checks free/busy for a shared calendar and proposes slots.

A customer-facing agent that books a call on the visitor's own calendar once they sign in.

An internal assistant that reschedules an event after the user confirms the new time.

How to connect Google Calendar

  1. 01Obtain an OAuth access token with the calendar scopes you need. For per-user booking, issue the token in your backend and include it in the identity token so end user token tools can forward it.
  2. 02Create an HTTP API tool for free/busy (POST https://www.googleapis.com/calendar/v3/freeBusy) with safe_read.
  3. 03Create a second tool for event creation (POST /calendar/v3/calendars/{{calendar_id}}/events) with write_safe and a body template for summary, start and end.
  4. 04Restrict allowed domains to www.googleapis.com and set a short timeout.
  5. 05Attach the tools, ask the test chat to find a slot and book it, and read both calls in the trace.

Example tool definition

The shape a tool takes in the AgentRow builder API. Credentials are stored on the tool's auth settings, not in its configuration, so they never reach a prompt. Placeholders in double braces are filled by the model from the input schema.

{
  "name": "calendar_create_event",
  "type": "http_api",
  "description": "Create a calendar event. Use only after the user confirmed the title, start and end time.",
  "auth_type": "end_user_token",
  "safety_level": "write_safe",
  "config": {
    "method": "POST",
    "url": "https://www.googleapis.com/calendar/v3/calendars/primary/events",
    "headers": { "Content-Type": "application/json" },
    "body_template": {
      "summary": "{{summary}}",
      "start": { "dateTime": "{{start}}" },
      "end": { "dateTime": "{{end}}" }
    },
    "allowed_domains": ["www.googleapis.com"]
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "summary": { "type": "string" },
      "start": { "type": "string", "description": "RFC 3339 timestamp" },
      "end": { "type": "string", "description": "RFC 3339 timestamp" }
    },
    "required": ["summary", "start", "end"]
  }
}

What the run trace shows

Every call appears in the run trace with the rendered request, the response status and body, timing, retries and errors, plus what the model was shown of the result. If the model never called the tool, the toolbox step shows whether it was bound for that model call and why.

Frequently asked questions

Can the agent book on a visitor's calendar without a login?

No. End user token tools bind only when the run has a signed-in user, so anonymous visitors can ask about availability on a shared calendar but cannot create events on their own.

How do I stop the agent from double-booking?

Give the free/busy tool a description that says to check availability first, and keep the event tool's description explicit about confirmation. The trace shows the order of calls so you can verify the behaviour.

Is there a typed calendar connector?

A calendar tool type exists but is not executable yet; HTTP API tools are the supported path today.

Connect Google Calendar to your first agent

Join the waitlist for early access. Tell us which systems you need to connect and we will point you at the right tool definitions.