Google Calendar
OAuth 2.0 communicationGoogle Calendar
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Update update — Update an existing event in a connected Google Calendar account
- List list — List events from a connected Google Calendar account with filtering options
- Get get — Retrieve a specific calendar event by its ID using optional filtering and list parameters
- Delete delete — Delete an event from a connected Google Calendar account
- Create create — Create a new event in a connected Google Calendar account
Authentication
Section titled “Authentication”This connector uses OAuth 2.0. Scalekit acts as the OAuth client: it redirects your user to Google Calendar, obtains an access token, and automatically refreshes it before it expires. Your agent code never handles tokens directly — you only pass a connectionName and a user identifier.
You supply your Google Calendar Connected App credentials (Client ID + Secret) once per environment in the Scalekit dashboard.
Before calling this connector from your code, create the Google Calendar connection in AgentKit > Connections and copy the exact Connection name from that connection into your code. The value in code must match the dashboard exactly.
Set up the connector
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:
-
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.
-
Navigate to Google Cloud Console → APIs & Services → Credentials. Select + Create Credentials, then OAuth client ID. Choose Web application from the Application type menu.

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

-
-
Enable the Google Calendar API
- In Google Cloud Console, go to APIs & Services → Library. Search for “Google Calendar API” and click Enable.
-
Get client credentials
- Google provides your Client ID and Client Secret after you create the OAuth client ID in step 1.
-
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_nameorconnectionName. It may be something likemeeting-prep-agent-googlecalendar, notgooglecalendar. -
Enter your credentials:
- Client ID (from above)
- Client Secret (from above)
- Permissions (scopes — see Google API Scopes reference)

-
Click Save.
-
Code examples
Connect a user’s Google Calendar account and make API calls on their behalf — Scalekit handles OAuth and token management automatically.
Before running this code, create the Google Calendar connection in AgentKit > Connections in the Scalekit dashboard and copy its exact Connection name into the connection_name or connectionName variable below.
Discover tool names
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 this Google Calendar connection first.
import { ScalekitClient } from '@scalekit-sdk/node';import 'dotenv/config';
const connectionName = 'meeting-prep-agent-googlecalendar'; // copy the exact Connection name from AgentKit > Connectionsconst identifier = 'user_123'; // your unique user identifier
const scalekit = new ScalekitClient( process.env.SCALEKIT_ENV_URL, process.env.SCALEKIT_CLIENT_ID, process.env.SCALEKIT_CLIENT_SECRET);
const { tools } = await scalekit.tools.listScopedTools(identifier, { filter: { connectionNames: [connectionName] }, pageSize: 100,});
for (const scopedTool of tools) { console.log('Available tool:', scopedTool.tool?.definition?.name);}import osimport scalekit.clientfrom dotenv import load_dotenvfrom google.protobuf.json_format import MessageToDictfrom scalekit.v1.tools.tools_pb2 import ScopedToolFilter
load_dotenv()
connection_name = "meeting-prep-agent-googlecalendar" # copy the exact Connection name from AgentKit > Connectionsidentifier = "user_123" # your unique user identifier
scalekit_client = scalekit.client.ScalekitClient( client_id=os.getenv("SCALEKIT_CLIENT_ID"), client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"), env_url=os.getenv("SCALEKIT_ENV_URL"),)actions = scalekit_client.actions
scoped_response, _ = actions.tools.list_scoped_tools( identifier=identifier, filter=ScopedToolFilter(connection_names=[connection_name]), page_size=100,)
for scoped_tool in scoped_response.tools: definition = MessageToDict(scoped_tool.tool).get("definition", {}) print("Available tool:", definition.get("name"))Execute tools
After the Google Calendar connected account is active, call the exact tool name and read the tool payload from response.data. For googlecalendar_list_events, the events array is inside response.data["events"]; the top-level response object is only the SDK wrapper.
const accountResponse = await actions.getOrCreateConnectedAccount({ connectionName, identifier,});const connectedAccountId = accountResponse.connectedAccount?.id;
if (!connectedAccountId) { throw new Error('Authorize the Google Calendar connection before listing events.');}
const response = await actions.executeTool({ toolName: 'googlecalendar_list_events', connectedAccountId, 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);account_response = actions.get_or_create_connected_account( connection_name=connection_name, identifier=identifier,)connected_account = account_response.connected_account
if not connected_account.id: raise RuntimeError("Authorize the Google Calendar connection before listing events.")
response = actions.execute_tool( tool_name="googlecalendar_list_events", connected_account_id=connected_account.id, tool_input={ "calendar_id": "primary", "max_results": 10, },)
data = response.data or {}events = data.get("events", [])next_page_token = data.get("next_page_token", "")
print("Events returned:", len(events))print("Next page token:", next_page_token)Proxy API Calls
import { ScalekitClient } from '@scalekit-sdk/node';import { ConnectorStatus } from '@scalekit-sdk/node/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb';import 'dotenv/config';
const connectionName = 'meeting-prep-agent-googlecalendar'; // copy the exact Connection name from AgentKit > Connectionsconst identifier = 'user_123'; // your unique user identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentialsconst scalekit = new ScalekitClient( process.env.SCALEKIT_ENV_URL, process.env.SCALEKIT_CLIENT_ID, process.env.SCALEKIT_CLIENT_SECRET);const actions = scalekit.actions;
// Create or fetch the connected account firstconst response = await actions.getOrCreateConnectedAccount({ connectionName, identifier,});const connectedAccount = response.connectedAccount;
if (connectedAccount?.status !== ConnectorStatus.ACTIVE) { const { link } = await actions.getAuthorizationLink({ connectionName, identifier, }); console.log('🔗 Authorize Google Calendar:', link); // present this link to your user for authorization, or click it yourself for testing process.stdout.write('Press Enter after authorizing...'); await new Promise(r => process.stdin.once('data', r));}
// Make a request via Scalekit proxyconst result = await actions.request({ connectionName, identifier, path: '/calendar/v3/users/me/calendarList', method: 'GET',});console.log(result);import scalekit.client, osfrom dotenv import load_dotenvload_dotenv()
connection_name = "meeting-prep-agent-googlecalendar" # copy the exact Connection name from AgentKit > Connectionsidentifier = "user_123" # your unique user identifier
# Get your credentials from app.scalekit.com → Developers → Settings → API Credentialsscalekit_client = scalekit.client.ScalekitClient( client_id=os.getenv("SCALEKIT_CLIENT_ID"), client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"), env_url=os.getenv("SCALEKIT_ENV_URL"),)actions = scalekit_client.actions
# Create or fetch the connected account firstresponse = actions.get_or_create_connected_account( connection_name=connection_name, identifier=identifier)connected_account = response.connected_account
if connected_account.status != "ACTIVE": link_response = actions.get_authorization_link( connection_name=connection_name, identifier=identifier ) # present this link to your user for authorization, or click it yourself for testing print("🔗 Authorize Google Calendar:", link_response.link) input("Press Enter after authorizing...")
# Make a request via Scalekit proxyresult = actions.request( connection_name=connection_name, identifier=identifier, path="/calendar/v3/users/me/calendarList", method="GET")print(result)Tool list
Section titled “Tool list”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.
start_datetime string required Event start time in RFC3339 format summary string required Event title/summary attendees_emails array optional Attendee email addresses calendar_id string optional Calendar ID to create the event in create_meeting_room boolean optional Generate a Google Meet link for this event description string optional Optional event description event_duration_hour integer optional Duration of event in hours event_duration_minutes integer optional Duration of event in minutes event_type string optional Event type for display purposes guests_can_invite_others boolean optional Allow guests to invite others guests_can_modify boolean optional Allow guests to modify the event guests_can_see_other_guests boolean optional Allow guests to see each other location string optional Location of the event recurrence array optional Recurrence rules (iCalendar RRULE format) schema_version string optional Optional schema version to use for tool execution send_updates boolean optional Send update notifications to attendees timezone string optional Timezone for the event (IANA time zone identifier) tool_version string optional Optional tool version to use for execution transparency string optional Calendar transparency (free/busy) visibility string optional Visibility 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.
event_id string required The ID of the calendar event to delete calendar_id string optional The ID of the calendar from which the event should be deleted schema_version string optional Optional schema version to use for tool execution tool_version string optional Optional 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.
event_id string required The unique identifier of the calendar event to fetch calendar_id string optional The calendar ID to search in event_types array optional Filter by Google event types query string optional Free text search query schema_version string optional Optional schema version to use for tool execution show_deleted boolean optional Include deleted events in results single_events boolean optional Expand recurring events into instances time_max string optional Upper bound for event start time (RFC3339) time_min string optional Lower bound for event start time (RFC3339) tool_version string optional Optional tool version to use for execution updated_min string optional Filter 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.
max_results integer optional Maximum number of calendars to fetch min_access_role string optional Minimum access role to include in results page_token string optional Token to retrieve the next page of results schema_version string optional Optional schema version to use for tool execution show_deleted boolean optional Include deleted calendars in the list show_hidden boolean optional Include calendars that are hidden from the calendar list sync_token string optional Token to get updates since the last sync tool_version string optional Optional 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.
calendar_id string optional Calendar ID to list events from max_results integer optional Maximum number of events to fetch order_by string optional Order of events in the result page_token string optional Page token for pagination query string optional Free text search query schema_version string optional Optional schema version to use for tool execution single_events boolean optional Expand recurring events into single events time_max string optional Upper bound for event start time (RFC3339 timestamp) time_min string optional Lower bound for event start time (RFC3339 timestamp) tool_version string optional Optional 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.
calendar_id string required Calendar ID containing the event event_id string required The ID of the calendar event to update attendees_emails array optional Attendee email addresses create_meeting_room boolean optional Generate a Google Meet link for this event description string optional Optional event description end_datetime string optional Event end time in RFC3339 format event_duration_hour integer optional Duration of event in hours event_duration_minutes integer optional Duration of event in minutes event_type string optional Event type for display purposes guests_can_invite_others boolean optional Allow guests to invite others guests_can_modify boolean optional Allow guests to modify the event guests_can_see_other_guests boolean optional Allow guests to see each other location string optional Location of the event recurrence array optional Recurrence rules (iCalendar RRULE format) schema_version string optional Optional schema version to use for tool execution send_updates boolean optional Send update notifications to attendees start_datetime string optional Event start time in RFC3339 format summary string optional Event title/summary timezone string optional Timezone for the event (IANA time zone identifier) tool_version string optional Optional tool version to use for execution transparency string optional Calendar transparency (free/busy) visibility string optional Visibility of the event