# Google Calendar

{% hint style="info" %}
The following documentation is for **Google Calendar v2.0.1** *(BDK)*.
{% endhint %}

## Overview

Google Calendar provides intelligent scheduling and calendar management with smart automation features. This integration enables automated event creation, scheduling workflows, and calendar synchronization processes. Improve time management and automate scheduling coordination across teams and organizations.

## Prerequisites

### 1. Required Books

The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:

* **Google Calendar**

#### How to Add the Book(s)

1. Go to **Books** → **All Books**.
2. Search for the name of the book and click on it.
3. Click on <kbd>**Install**</kbd> or <kbd>**Add Connection**</kbd> to add the book to your agent.
4. If adding a connection, you'll be prompted for [**connectivity**](#connectivity) details.

## Connectivity

This section outlines the available methods for connecting to the Book, along with the required configuration details for each.

## Procedures

### to create an (event)

Create a new Google Calendar event.

**Input Concepts**

| Concept                           | Description                                                 | Type                    | Required | Default Value |
| --------------------------------- | ----------------------------------------------------------- | ----------------------- | -------- | ------------- |
| [`event`](#google-calendar-event) | The event details to create                                 | `google calendar event` | Yes      | (no default)  |
| `calendar id`                     | The calendar ID to create the event in (default: "primary") | `text`                  | No       | primary       |

**Output Concepts**

| Concept                           | Description                                                           | Type                    |
| --------------------------------- | --------------------------------------------------------------------- | ----------------------- |
| [`event`](#google-calendar-event) | The created event with its ID and other fields set by Google Calendar | `google calendar event` |

**Examples**

```generic
the string is '{"summary": "New event", "start": "07/23/2025T08:00", "end": "07/23/2025T09:00", "attendees": ["someone@kognitos.com"], "confirmed_attendees": [], "potential_attendees": []}'
get the string as json
use the above as the new event
create the new event where
  the calendar id is "primary"
```

### to get some (events)

Get events from Google Calendar, optionally filtered by time range.

**Input Concepts**

| Concept       | Description                                             | Type       | Required | Default Value |
| ------------- | ------------------------------------------------------- | ---------- | -------- | ------------- |
| `start time`  | Optional start time to filter events                    | `datetime` | No       | (no default)  |
| `end time`    | Optional end time to filter events                      | `datetime` | No       | (no default)  |
| `calendar id` | The calendar ID to get events from (default: "primary") | `text`     | No       | primary       |
| `max results` | Maximum number of events to retrieve (default: 100)     | `number`   | No       | 100           |

**Output Concepts**

| Concept                            | Description               | Type                    |
| ---------------------------------- | ------------------------- | ----------------------- |
| [`events`](#google-calendar-event) | A list of calendar events | `google calendar event` |

**Examples**

Get calendar events

```generic
get some events with
... the start time is "2023-06-01T00:00:00"
... the end time is "2023-06-30T23:59:59"
```

## Concepts

### Google calendar event

A Google Calendar event representation.

| Field Name            | Description                                                             | Type                     |
| --------------------- | ----------------------------------------------------------------------- | ------------------------ |
| `summary`             | The title/summary of the event                                          | `text`                   |
| `start`               | The start time of the event                                             | `datetime`               |
| `end`                 | The end time of the event                                               | `datetime`               |
| `id`                  | The unique identifier for the event (set by Google Calendar)            | `optional[text]`         |
| `description`         | Optional description of the event                                       | `optional[text]`         |
| `location`            | Optional location of the event                                          | `optional[text]`         |
| `attendees`           | Optional list of all invited email addresses                            | `optional[list of text]` |
| `confirmed_attendees` | Optional list of confirmed attendee email addresses                     | `optional[list of text]` |
| `potential_attendees` | Optional list of potential attendee email addresses (not yet confirmed) | `optional[list of text]` |
| `creator`             | Optional email of the event creator                                     | `optional[text]`         |
| `created`             | Optional creation timestamp                                             | `optional[datetime]`     |
| `updated`             | Optional last update timestamp                                          | `optional[datetime]`     |
| `status`              | Optional status of the event (confirmed, tentative, cancelled)          | `optional[text]`         |
| `html_link`           | Optional URL to the event in Google Calendar                            | `optional[text]`         |
