logo_smallAxellero.io

Google Calendar - Setup Guide

Setup and configuration guide for Google Calendar integration

Google Calendar API integration for automated calendar and event management with Axellero.

For detailed instructions on managing credentials, connectors, and triggers in Axellero Studio, see the Integration Guide.

Step 1: Create Credential

Getting OAuth 2.0 Credentials from Google Cloud

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Navigate to APIs & Services --> Library
  4. Search for "Google Calendar API" and click Enable
  5. Go to APIs & Services --> OAuth consent screen
    • Select User Type (Internal or External)
    • Fill in required fields (App name, Support email)
    • Add the required scopes (see table below)
  6. Go to APIs & Services --> Credentials
  7. Click Create Credentials --> OAuth client ID
  8. Select Web application
  9. Add your OAuth callback URL to Authorized redirect URIs
  10. Click Create and save the Client ID and Client Secret

Required Scopes:

ScopePermissionUse Case
https://www.googleapis.com/auth/calendarFull accessAll calendar operations including create, update, delete
https://www.googleapis.com/auth/calendar.readonlyRead onlyList and get calendars/events without modifications
https://www.googleapis.com/auth/calendar.eventsEvents onlyManage events without access to calendar settings
https://www.googleapis.com/auth/calendar.events.readonlyRead eventsRead events without modification access

Adding Credential to Axellero

  1. Navigate to Application > Integrations > Credentials
  2. Click "Add Credential"
  3. Select OAuth 2.0
  4. Enter:
    • Name: "Google Calendar - Production"
    • Client ID: From Google Cloud Console
    • Client Secret: From Google Cloud Console
    • Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
    • Token URL: https://oauth2.googleapis.com/token
    • Scopes: Add the required scopes
  5. Click Save, then click "Authorize"
  6. Complete the Google sign-in and grant permissions

Axellero automatically handles token refresh and secure storage.


Step 2: Create Connector

  1. Navigate to Application > Integrations > Connectors
  2. Click "Add Connector"
  3. Select Google Calendar from the list
  4. Configure:
    • Name: "Google Calendar - Production"
    • Credential: Select the OAuth 2.0 credential you created
  5. Click Save
  6. Test the connection using the "Test" button

The connector is now available in any workflow or agentflow.


Step 3: Create Trigger

For supported events and payload examples, see main documentation.

3.1 Create Trigger

  1. Navigate to Integrations > Triggers
  2. Click "Add Trigger" (+) button
  3. Select your Google Calendar connector
  4. Configure:
    • Calendar ID: Calendar to watch (default: "primary")
    • Verification Token: (Optional) Secret for webhook verification
    • Events: Select event types to receive
  5. Click Save

Available Event Types:

EventDescription
syncInitial sync notification when webhook is registered
event_createdA new event was created in the calendar
event_updatedAn existing event was modified
event_deletedAn event was deleted from the calendar

Configuration Options:

OptionTypeRequiredDescription
calendarIdTEXTNoCalendar to watch (default: "primary")
secretTEXT (PASSWORD)NoSecret token for webhook verification (X-Goog-Channel-Token header)
eventsTEXTNoEvent types to receive

How it works: Axellero automatically registers a push notification channel with Google Calendar API. No manual webhook setup required.

3.2 Add Trigger to Workflow

  1. Open Workflow Builder
  2. Find your trigger in the Triggers section
  3. Drag to canvas as starting node
  4. Build workflow logic after the trigger

3.3 Test the Trigger

  1. Create, update, or delete an event in the watched calendar
  2. Check workflow execution logs in Axellero
  3. Verify trigger data via {{ctx.nodes.gcalendar_trigger.outputs.data}}

Workflow Examples

Example 1: Daily Agenda Email

Send a daily summary of upcoming events via Gmail.

Workflow Steps:

  1. Schedule Trigger: Daily at 7:00 AM
  2. Google Calendar - listEvents: Get today's events
  3. Gmail - sendMessage: Email the agenda

Configuration (listEvents):

{
  "calendarId": "primary",
  "timeMin": "{{ctx.vars.todayStart}}",
  "timeMax": "{{ctx.vars.todayEnd}}",
  "singleEvents": true,
  "orderBy": "startTime"
}

Example 2: Meeting Scheduling via Telegram

Create calendar events from Telegram messages using natural language.

Workflow Steps:

  1. Telegram Trigger: Watch for incoming messages
  2. Google Calendar - quickAddEvent: Create event from text
  3. Telegram - sendMessage: Confirm event created

Configuration (quickAddEvent):

{
  "text": "{{ctx.nodes.telegram_trigger.outputs.data.message.text}}"
}

Example 3: Calendar-to-Task Sync

Sync calendar events with Linear for project tracking.

Workflow Steps:

  1. Schedule Trigger: Hourly
  2. Google Calendar - listEvents: Get recent events
  3. Linear - createIssue: Create task from event

Configuration (createIssue):

{
  "title": "Meeting: {{ctx.nodes.gcalendar.outputs.data.events[0].summary}}",
  "description": "Calendar event link: {{ctx.nodes.gcalendar.outputs.data.events[0].htmlLink}}",
  "teamId": "{{ctx.vars.linearTeamId}}"
}

Example 4: Event Cleanup

Automatically remove cancelled events periodically.

Workflow Steps:

  1. Schedule Trigger: Daily at midnight
  2. Google Calendar - listEvents: Get events with showDeleted: true
  3. Loop: Iterate over cancelled events
  4. Google Calendar - deleteEvent: Remove each cancelled event

Troubleshooting

ErrorCauseSolution
401 UnauthorizedInvalid or expired tokenRe-authorize in credential settings
403 ForbiddenMissing required scopesAdd scopes and re-authorize
400 Invalid GrantRefresh token revokedRe-authorize from scratch
403 Access Not ConfiguredCalendar API not enabledEnable Google Calendar API in Cloud Console
404 Not FoundCalendar or event doesn't existVerify calendar/event ID
429 Rate LimitedToo many requestsCheck quotas in Cloud Console

Common Issues

Token expires frequently

  • Axellero handles token refresh automatically
  • If still failing, re-authorize the credential

Events not appearing in queries

  • Use singleEvents: true to expand recurring events
  • Check time range includes the expected events (timeMin/timeMax)
  • Verify calendar ID is correct (use "primary" for main calendar)

Cannot delete primary calendar

  • The primary calendar cannot be deleted, only secondary calendars
  • Use clearCalendar to remove all events from primary calendar

Security Best Practices

  • Use Axellero Credential Manager for encrypted storage
  • Axellero handles token refresh automatically
  • Use minimum required scopes for your use case
  • Monitor API usage in Google Cloud Console
  • Review OAuth app permissions periodically

Resources