Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Google Calendar

Scalekit connector
Open markdown

The Google Calendar connector lets your AI agent act in each user's Google Calendar account. Each user signs in to Google Calendar once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 30 tools.

Tools
30
What they doRead · write · destructive
13 · 11 · 613 read11 write6 destructive
Users sign in with
OAuth app
Your own Google app

What you can do

  • Read events: list and retrieve calendar events across any of the user’s calendars
  • Create and update events: schedule meetings, set attendees, and modify existing events
  • Delete events: cancel and remove events from the user’s calendar
  • List calendars: enumerate all calendars the user has access to

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Google Calendar connection

    In AgentKit > Connections, create a Google Calendar connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register a Google OAuth app

    Google Calendar connections use your own OAuth app. Register one with Google and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Google Calendar connection.

    Console steps with screenshots

    Register your Scalekit environment with the Google Calendar connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

    1. Set up auth redirects

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find Google Calendar and click Create. Click Use your own credentials and copy the redirect URI. It looks like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.

        Copy redirect URI from Scalekit dashboard

      • Navigate to Google Cloud Console → APIs & Services → Credentials. Select + Create Credentials, then OAuth client ID. Choose Web application from the Application type menu.

        Select Web Application in Google OAuth settings

      • Under Authorized redirect URIs, click + Add URI, paste the redirect URI, and click Create.

        Add authorized redirect URI in Google Cloud Console

    2. Enable the Google Calendar API

      • In Google Cloud Console, go to APIs & Services → Library. Search for “Google Calendar API” and click Enable.
    3. Get client credentials

      • Google provides your Client ID and Client Secret after you create the OAuth client ID in step 1.
    4. Add credentials in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections and open the connection you created.

      • Copy the Connection name shown on that connection and use that exact value in your code as connection_name or connectionName. It may be something like meeting-prep-agent-googlecalendar, not googlecalendar.

      • Enter your credentials:

        Add credentials in Scalekit dashboard

      • Click Save.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'googlecalendar'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Google Calendar:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'googlecalendar_get_colors',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • googlecalendar_get_acl_ruleRetrieve a single access control rule for a calendar in a connected Google Calendar account by its rule ID.Read-only

    Get Calendar ACL Rule

    Retrieve a single access control rule for a calendar in a connected Google Calendar account by its rule ID. Requires a valid Google Calendar OAuth2 connection.

    Inputs

    calendar_idstringrequired
    Calendar ID the ACL rule belongs to
    rule_idstringrequired
    The ID of the ACL rule to fetch
  • googlecalendar_get_calendarRetrieve metadata for a calendar in a connected Google Calendar account, including its summary, description, and timezone.Read-only

    Get Calendar

    Retrieve metadata for a calendar in a connected Google Calendar account, including its summary, description, and timezone. Requires a valid Google Calendar OAuth2 connection.

    Inputs

    calendar_idstringrequired
    Calendar ID to retrieve

    Also accepts schema_version and tool_version to pin a version.

  • googlecalendar_get_calendar_list_entryRetrieve a calendar from the authenticated user's calendar list, including their personal settings for it (color, visibility, notifications, default reminders).Read-only

    Get Calendar List Entry

    Retrieve a calendar from the authenticated user's calendar list, including their personal settings for it (color, visibility, notifications, default reminders). Requires a valid Google Calendar OAuth2 connection.

    Inputs

    calendar_idstringrequired
    Calendar ID to fetch from the user's calendar list
  • googlecalendar_get_colorsRetrieve the color definitions Google Calendar uses for calendars and events, including each color ID's background and foreground hex values.Read-only

    Get Colors

    Retrieve the color definitions Google Calendar uses for calendars and events, including each color ID's background and foreground hex values. Requires a valid Google Calendar OAuth2 connection.

    Inputs

    This tool takes no inputs.

  • googlecalendar_get_event_by_idRetrieve a specific calendar event by its ID using optional filtering and list parameters.Read-only

    Get Calendar Event by ID

    Retrieve a specific calendar event by its ID using optional filtering and list parameters.

    Inputs

    event_idstringrequired
    The unique identifier of the calendar event to fetch
    calendar_idstring
    The calendar ID to search indefault primary
    event_typesarray
    Filter by Google event types
    querystring
    Free text search query
    show_deletedboolean
    Include deleted events in resultsdefault false
    single_eventsboolean
    Expand recurring events into instancesdefault true
    time_maxstring
    Upper bound for event start time (RFC3339)
    time_minstring
    Lower bound for event start time (RFC3339)
    updated_minstring
    Filter events updated after this time (RFC3339)

    Also accepts schema_version and tool_version to pin a version.

  • googlecalendar_get_settingRetrieve a single user preference setting from a connected Google Calendar account, such as the user's timezone or week start day.Read-only

    Get User Setting

    Retrieve a single user preference setting from a connected Google Calendar account, such as the user's timezone or week start day. Requires a valid Google Calendar OAuth2 connection.

    Inputs

    settingstringrequired
    The ID of the user setting to fetchone of autoAddHangoutsdateFieldOrderdefaultEventLengthformat24HourTimehideInvitationshideWeekendslocaleremindOnRespondedEventsOnlyshowDeclinedEventstimezoneuseKeyboardShortcutsweekStart
  • googlecalendar_list_acl_rulesList the access control rules for a calendar in a connected Google Calendar account, showing who has access and their permission level.Read-only

    List Calendar ACL Rules

    List the access control rules for a calendar in a connected Google Calendar account, showing who has access and their permission level. Requires a valid Google Calendar OAuth2 connection.

    Inputs

    calendar_idstringrequired
    Calendar ID to list ACL rules for
    max_resultsinteger
    Maximum number of ACL rules to fetch
    page_tokenstring
    Page token for pagination

    Also accepts schema_version and tool_version to pin a version.

  • googlecalendar_list_calendarsList all accessible Google Calendar calendars for the authenticated user.Read-only

    List Calendars

    List all accessible Google Calendar calendars for the authenticated user. Supports filters and pagination.

    Inputs

    max_resultsinteger
    Maximum number of calendars to fetchdefault 10
    min_access_rolestring
    Minimum access role to include in resultsone of freeBusyReaderreaderwriterowner
    page_tokenstring
    Token to retrieve the next page of results
    show_deletedboolean
    Include deleted calendars in the listdefault false
    show_hiddenboolean
    Include calendars that are hidden from the calendar listdefault false
    sync_tokenstring
    Token to get updates since the last sync

    Also accepts schema_version and tool_version to pin a version.

Workflows

Execute a tool
const accountResponse = await actions.getOrCreateConnectedAccount({
connectionName: 'googlecalendar',
identifier: 'user_123',
});
const connectedAccountId = accountResponse.connectedAccount?.id;
if (!connectedAccountId) {
throw new Error('Authorize the Google Calendar connection before listing events.');
}
const response = await actions.executeTool({
connector: 'googlecalendar',
identifier: 'user_123',
toolName: 'googlecalendar_list_events',
toolInput: {
calendar_id: 'primary',
max_results: 10,
},
});
const events = Array.isArray(response.data?.events) ? response.data.events : [];
const nextPageToken =
typeof response.data?.next_page_token === 'string' ? response.data.next_page_token : '';
console.log('Events returned:', events.length);
console.log('Next page token:', nextPageToken);
Proxy API call
const result = await actions.request({
connectionName: 'googlecalendar',
identifier: 'user_123',
path: '/calendar/v3/users/me/calendarList',
method: 'GET',
});
console.log(result);
Google OAuth consent screen verification

Before you use your own Google OAuth credentials in production, understand what end users see on Google’s consent screen when they authorize a connected account.

Audience typeConsent screen behaviorWhen to use
InternalShows your App Name and logo from Branding settingsOnly users in your Google Workspace or Cloud Identity organization can authorize the connector
ExternalShows {env_name}.scalekit.dev until Google verifies your appAny user with a Google account can authorize the connector

Why External is required for most AgentKit connectors:

  • Internal restricts authorization to users in your Google Workspace or Cloud Identity organization. Users with @gmail.com or other Google accounts outside your organization cannot complete OAuth.
  • External is required when end users outside your organization authorize tool access through connected accounts.
  • Organization-managed OAuth clients follow the same rules as personal or developer OAuth clients. Switching to an org-owned client does not bypass Google verification.
  • Until Google completes verification of your External app, users see scalekit.dev on the consent screen. After verification, your App Name and logo appear.

During development:

  • Add Test users under APIs & Services → OAuth consent screen while publishing status is Testing.
  • On unverified apps, users can click Advanced → Go to app (unsafe) to proceed during testing.
  • Google Workspace admins may need to allowlist your OAuth client.

For Google’s verification requirements and timeline, refer to Google’s OAuth consent screen verification guide.