DEV

Google Calendar

Google Calendar Connection

Put Google Calendar to Work with @Human Automations and @Human Agents

The Google Calendar Connection documents all Triggers, Actions and Query Operations available for creating automations via the Google Calendar API.

What can you do with the Google Calendar Connection?

  • Connect to the Google Calendar API in a few clicks

  • Use the related Google Calendar Operations (see below) in @Human Automations or @Human Agents

Trigger Operations

Event Created

Triggers on: events/eventCreated

Triggered when a new event is created in the connected Google Calendar.

Event Updated

Triggers on: events/eventUpdated

Triggered when an existing event is updated in the connected Google Calendar.

Event Deleted

Triggers on: events/eventDeleted

Triggered when an event is deleted from the connected Google Calendar.

Action Operations

https://github.com/crusttech/human-docs/blob/main/google/google-calendar-individual/action-add-attendees-to-event.md

Action: Delete Event

Action: Quick Add Event

Action: Update Event

Action: Create Detailed Event

Action: Move Event to Another Calendar

Action: API Request

Query Operations

Example link

Example link

Obtaining Access Credentials

Note: @Human can access all Calendars the service account has access to. Use Domain-Wide Delegation to grant access to calendars across your Google Workspace organization.

1. Create a Google Cloud project

2. Enable required APIs

  • Navigate to APIs & Services → Library.

  • Enable the Google Calendar API.

3. Create a Service Account

  • Under Google Calendar API, go to the Credentials tab and add a new Service Account.

4. Configure Domain-Wide Delegation (DWD)

  • Go to Google Admin ConsoleSecurity → Access and data control → API controls.

  • Click Manage domain-wide delegationAdd new.

  • Enter the Client ID (Service Account ID) and set the scope to https://www.googleapis.com/auth/calendar.

  • Click Authorize.

5. Download the JSON key

  • Open the newly created service account and go to the Keys tab.

  • Click Create new key, select JSON, and click Create.

Configuring Webhooks

  1. Verify Domain Ownership

    • Navigate to the Google Search Console.

    • Add the domain where your webhook endpoint is hosted and complete the verification process.

  2. Register the Domain in Google Cloud

    • Open the Google Cloud Console and select your project.

    • Navigate to APIs & Services > Domain Verification.

    • Click Add domain, enter your verified domain, and confirm the addition.

  3. Set Up an HTTPS Endpoint

    • Deploy a publicly accessible server that uses a valid SSL certificate (self-signed certificates are not supported).

    • Ensure your endpoint can receive POST notifications and responds with a 200 OK status code.

  4. Subscribe to Notification Channels

    • Send a POST request to the watch endpoint for the resource you want to monitor (e.g., https://www.googleapis.com/calendar/v3/calendars/primary/events/watch).

    • In the request body, include a unique id for the channel, set type to web_hook, and provide your endpoint URL in the address field.

Code (Apache v2.0): Service Connectivity and Metadata

Note on discovery: At connection enable time the server fetches the impersonated user's calendar list (calendarList) and injects the calendars as dropdown options on the calendarId parameter of every registered operation. Requires Domain-Wide Delegation with dwdSubject set to the target user's email. To refresh, call POST /api/system/configured-connections/{id}/refresh-discovery.

Code (Apache v2.0): List of External Resources and Internal Mapping

Last updated