Google Calendar

Google Calendar scheduling and availability management for AI agents

16 tools available · OAuth authentication

SDK Usage #

// Import typed helpers for full type safety
import { Hotglue } from "@hotglue/sdk";
import { toolName } from "@hotglue/sdk/google_calendar";
const client = new Hotglue({ apiKey: "hg_live_xxx" });
const result = await client.execute({
...toolName({ /* typed input */ }),
userId: "user_123",
});
// result is fully typed!
import { Hotglue } from "@hotglue/sdk";
const client = new Hotglue({ apiKey: "hg_live_xxx" });
const result = await client.execute({
integration: "google_calendar",
tool: "tool_name",
userId: "user_123",
input: { /* ... */ },
});
import { createHotglueTools } from "@hotglue/sdk";
import { Agent } from "@mastra/core/agent";
const hotglueTools = createHotglueTools({ apiKey: "hg_live_xxx" });
const agent = new Agent({
name: "Google Calendar Agent",
model: "anthropic/claude-sonnet-4-0",
tools: () => hotglueTools({
integrations: ["google_calendar"],
userId: "user_123",
}),
});

Authentication Setup #

Create OAuth credentials in Google Cloud Console to get a Client ID and Client Secret for authentication.

1. Create a Google Cloud Project

  1. Go to console.cloud.google.com
  2. Click the project selector dropdown at the top
  3. Click New Project
  4. Enter a project name and click Create
  5. Select your new project once created

2. Enable Google Calendar API

  1. Go to APIs & Services → Library
  2. Search for "Google Calendar API"
  3. Click on Google Calendar API
  4. Click Enable

3. Configure OAuth Consent Screen

  1. Go to APIs & Services → OAuth consent screen
  2. Select External user type (or Internal for Workspace)
  3. Fill in app information
App name
Your application name
User support email
Your support email address
Developer contact
Your developer email address

4. Add Scopes

Add the following Google Calendar API scopes based on your needs:

calendar
Full access to calendars and events
calendar.readonly
View calendars (read-only)
calendar.events
View and edit events
calendar.events.readonly
View events (read-only)

// Full scope URLs: https://www.googleapis.com/auth/calendar.*

5. Create OAuth Credentials

  1. Go to APIs & Services → Credentials
  2. Click Create CredentialsOAuth client ID
  3. Select Web application as application type
  4. Enter a name for your OAuth client
Authorized redirect URIs
https://hotglue.tech/api/auth/callback

// Click Create to generate your credentials.

6. Get OAuth Credentials

Client ID — copy from the credentials page
Client Secret — copy from the credentials page

// Store these credentials securely — you'll need them for OAuth flow.

Scope Reference

Each scope enables specific actions:

calendar_full — full access to all calendar operations
calendar_readonly — view calendars, colors, settings
events — create, update, delete events
events_readonly — view events, query free/busy

Publishing Status

While in Testing status, only test users you explicitly add can use the OAuth flow. To allow any Google user, submit your app for verification and publish it. Apps using sensitive scopes require Google's review process.

Scopes #

When users connect their Google Calendar account, they'll be asked to grant some of these permissions, depending on which tools you configured for connection:

https://www.googleapis.com/auth/calendar Full access to calendars and events
https://www.googleapis.com/auth/calendar.readonly Read-only access to calendars
https://www.googleapis.com/auth/calendar.events View and edit events on all calendars
https://www.googleapis.com/auth/calendar.events.readonly View events on all calendars