Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Google Calendar connector

OAuth 2.0CommunicationCalendar

Google Calendar is Google's cloud-based calendar service that allows you to manage your events, appointments, and schedules from any computer or device...

Google Calendar connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. 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. Register your Google Calendar credentials with Scalekit so it handles the token lifecycle. You do this once per environment.

    Dashboard setup steps

    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 ConsoleAPIs & ServicesCredentials. 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 & ServicesLibrary. 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.

  4. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_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)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'googlecalendar_list_calendars',
    toolInput: {},
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Update event — Update an existing event in a connected Google Calendar account
  • List events, calendars — List events from a connected Google Calendar account with filtering options
  • Get event by id — Retrieve a specific calendar event by its ID using optional filtering and list parameters
  • Delete event — Delete an event from a connected Google Calendar account
  • Create event — Create a new event in a connected Google Calendar account
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.

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

googlecalendar_create_event#Create a new event in a connected Google Calendar account. Supports meeting links, recurrence, attendees, and more.20 params

Create a new event in a connected Google Calendar account. Supports meeting links, recurrence, attendees, and more.

NameTypeRequiredDescription
start_datetimestringrequiredEvent start time in RFC3339 format
summarystringrequiredEvent title/summary
attendees_emailsarrayoptionalAttendee email addresses
calendar_idstringoptionalCalendar ID to create the event in
create_meeting_roombooleanoptionalGenerate a Google Meet link for this event
descriptionstringoptionalOptional event description
event_duration_hourintegeroptionalDuration of event in hours
event_duration_minutesintegeroptionalDuration of event in minutes
event_typestringoptionalEvent type for display purposes
guests_can_invite_othersbooleanoptionalAllow guests to invite others
guests_can_modifybooleanoptionalAllow guests to modify the event
guests_can_see_other_guestsbooleanoptionalAllow guests to see each other
locationstringoptionalLocation of the event
recurrencearrayoptionalRecurrence rules (iCalendar RRULE format)
schema_versionstringoptionalOptional schema version to use for tool execution
send_updatesbooleanoptionalSend update notifications to attendees
timezonestringoptionalTimezone for the event (IANA time zone identifier)
tool_versionstringoptionalOptional tool version to use for execution
transparencystringoptionalCalendar transparency (free/busy)
visibilitystringoptionalVisibility of the event
googlecalendar_delete_event#Delete an event from a connected Google Calendar account. Requires the calendar ID and event ID.4 params

Delete an event from a connected Google Calendar account. Requires the calendar ID and event ID.

NameTypeRequiredDescription
event_idstringrequiredThe ID of the calendar event to delete
calendar_idstringoptionalThe ID of the calendar from which the event should be deleted
schema_versionstringoptionalOptional schema version to use for tool execution
tool_versionstringoptionalOptional tool version to use for execution
googlecalendar_get_event_by_id#Retrieve a specific calendar event by its ID using optional filtering and list parameters.11 params

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

NameTypeRequiredDescription
event_idstringrequiredThe unique identifier of the calendar event to fetch
calendar_idstringoptionalThe calendar ID to search in
event_typesarrayoptionalFilter by Google event types
querystringoptionalFree text search query
schema_versionstringoptionalOptional schema version to use for tool execution
show_deletedbooleanoptionalInclude deleted events in results
single_eventsbooleanoptionalExpand recurring events into instances
time_maxstringoptionalUpper bound for event start time (RFC3339)
time_minstringoptionalLower bound for event start time (RFC3339)
tool_versionstringoptionalOptional tool version to use for execution
updated_minstringoptionalFilter events updated after this time (RFC3339)
googlecalendar_list_calendars#List all accessible Google Calendar calendars for the authenticated user. Supports filters and pagination.8 params

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

NameTypeRequiredDescription
max_resultsintegeroptionalMaximum number of calendars to fetch
min_access_rolestringoptionalMinimum access role to include in results
page_tokenstringoptionalToken to retrieve the next page of results
schema_versionstringoptionalOptional schema version to use for tool execution
show_deletedbooleanoptionalInclude deleted calendars in the list
show_hiddenbooleanoptionalInclude calendars that are hidden from the calendar list
sync_tokenstringoptionalToken to get updates since the last sync
tool_versionstringoptionalOptional tool version to use for execution
googlecalendar_list_events#List events from a connected Google Calendar account with filtering options. Requires a valid Google Calendar OAuth2 connection.10 params

List events from a connected Google Calendar account with filtering options. Requires a valid Google Calendar OAuth2 connection.

NameTypeRequiredDescription
calendar_idstringoptionalCalendar ID to list events from
max_resultsintegeroptionalMaximum number of events to fetch
order_bystringoptionalOrder of events in the result
page_tokenstringoptionalPage token for pagination
querystringoptionalFree text search query
schema_versionstringoptionalOptional schema version to use for tool execution
single_eventsbooleanoptionalExpand recurring events into single events
time_maxstringoptionalUpper bound for event start time (RFC3339 timestamp)
time_minstringoptionalLower bound for event start time (RFC3339 timestamp)
tool_versionstringoptionalOptional tool version to use for execution
googlecalendar_update_event#Update an existing event in a connected Google Calendar account. Only provided fields will be updated. Supports updating time, attendees, location, meeting links, and more.22 params

Update an existing event in a connected Google Calendar account. Only provided fields will be updated. Supports updating time, attendees, location, meeting links, and more.

NameTypeRequiredDescription
calendar_idstringrequiredCalendar ID containing the event
event_idstringrequiredThe ID of the calendar event to update
attendees_emailsarrayoptionalAttendee email addresses
create_meeting_roombooleanoptionalGenerate a Google Meet link for this event
descriptionstringoptionalOptional event description
end_datetimestringoptionalEvent end time in RFC3339 format
event_duration_hourintegeroptionalDuration of event in hours
event_duration_minutesintegeroptionalDuration of event in minutes
event_typestringoptionalEvent type for display purposes
guests_can_invite_othersbooleanoptionalAllow guests to invite others
guests_can_modifybooleanoptionalAllow guests to modify the event
guests_can_see_other_guestsbooleanoptionalAllow guests to see each other
locationstringoptionalLocation of the event
recurrencearrayoptionalRecurrence rules (iCalendar RRULE format)
schema_versionstringoptionalOptional schema version to use for tool execution
send_updatesbooleanoptionalSend update notifications to attendees
start_datetimestringoptionalEvent start time in RFC3339 format
summarystringoptionalEvent title/summary
timezonestringoptionalTimezone for the event (IANA time zone identifier)
tool_versionstringoptionalOptional tool version to use for execution
transparencystringoptionalCalendar transparency (free/busy)
visibilitystringoptionalVisibility of the event