> ## Documentation Index
> Fetch the complete documentation index at: https://explore.airia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Calendar

> Create, update, read, and list Google Calendar events from inside an agent workflow.

Google Calendar actions let an agent work with calendar events directly in a flow. An agent can create and update events, read a single event, and list events from a calendar, then pass the results to later steps.

## Supported actions

| Group      | Actions                      |
| ---------- | ---------------------------- |
| **Events** | Create, Update, Get, Get All |

## Prerequisites

<AccordionGroup>
  <Accordion title="Create a Google credential" icon="key">
    Connect a **Google OAuth** credential in [Credential Management](/admin-hub/account_settings/credential-management), then select it on every Google Calendar action. To set up the OAuth client, follow the [Google Cloud Console setup guide](/integrations/oauth-setup/google-cloud-console). These actions also support end user authentication, so a step can act on each user's own calendar.
  </Accordion>
</AccordionGroup>

## How to use these actions

* **Map text inputs from earlier steps.** Inputs such as **Summary**, **Description**, **Location**, and **Event ID** accept a value mapped from a previous step.
* **Max Results takes a fixed value.** Type the number directly rather than mapping it from a previous step.
* **Use `primary` for the main calendar.** The **Calendar ID** input defaults to `primary`, which targets the authenticated user's main calendar.
* **Dates use RFC3339 format.** Date and time inputs such as **Start Date Time** and **End Date Time** use RFC3339 format, for example `2024-01-15T09:00:00-05:00`.
* **Attendees is a comma separated list.** The **Attendees** input takes a comma separated list of email addresses.

## Actions

### Events

#### Google Calendar Event Create

Creates a new calendar event.

| Input               | Required | Description                                                                              |
| ------------------- | -------- | ---------------------------------------------------------------------------------------- |
| **Calendar ID**     | Yes      | The calendar to create the event in. Defaults to `primary` for the user's main calendar. |
| **Summary**         | Yes      | The event title.                                                                         |
| **Description**     | No       | A longer description of the event.                                                       |
| **Location**        | No       | The event location.                                                                      |
| **Start Date Time** | Yes      | The event start in RFC3339 format, for example `2024-01-15T09:00:00-05:00`.              |
| **End Date Time**   | Yes      | The event end in RFC3339 format, for example `2024-01-15T10:00:00-05:00`.                |
| **Time Zone**       | No       | The event time zone, such as `America/New_York`. Defaults to the calendar time zone.     |
| **Attendees**       | No       | A comma separated list of attendee email addresses.                                      |

#### Google Calendar Event Update

Updates an existing calendar event.

| Input               | Required | Description                                                                            |
| ------------------- | -------- | -------------------------------------------------------------------------------------- |
| **Calendar ID**     | Yes      | The calendar that holds the event. Defaults to `primary` for the user's main calendar. |
| **Event ID**        | Yes      | The unique identifier of the event to update.                                          |
| **Summary**         | No       | The new event title.                                                                   |
| **Description**     | No       | The new description of the event.                                                      |
| **Location**        | No       | The new event location.                                                                |
| **Start Date Time** | No       | The new event start in RFC3339 format, for example `2024-01-15T09:00:00-05:00`.        |
| **End Date Time**   | No       | The new event end in RFC3339 format, for example `2024-01-15T10:00:00-05:00`.          |
| **Time Zone**       | No       | The event time zone, such as `America/New_York`.                                       |

#### Google Calendar Event Get

Retrieves a single calendar event.

| Input           | Required | Description                                                                            |
| --------------- | -------- | -------------------------------------------------------------------------------------- |
| **Calendar ID** | Yes      | The calendar that holds the event. Defaults to `primary` for the user's main calendar. |
| **Event ID**    | Yes      | The unique identifier of the event to retrieve.                                        |

#### Google Calendar Event Get All

Lists events from a calendar.

| Input           | Required | Description                                                                                                          |
| --------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
| **Calendar ID** | Yes      | The calendar to read events from. Defaults to `primary` for the user's main calendar.                                |
| **Max Results** | No       | Maximum number of events to return, entered as a fixed number. Google returns up to 250 by default and 2500 at most. |
| **Time Min**    | No       | RFC3339 lower bound for an event's start time, for example `2024-01-15T00:00:00-05:00`.                              |
| **Time Max**    | No       | RFC3339 upper bound for an event's start time, for example `2024-01-31T23:59:59-05:00`.                              |
| **Query**       | No       | Free text search across event fields.                                                                                |

## Example

An agent that schedules a follow up meeting after a request:

<Steps>
  <Step title="Check availability">
    A **Google Calendar Event Get All** action lists events on `primary` between a **Time Min** and **Time Max** so a model step can find an open slot.
  </Step>

  <Step title="Create the event">
    A **Google Calendar Event Create** action sets **Summary** to the meeting title, maps **Start Date Time** and **End Date Time** to the chosen slot, and adds the requester's email to **Attendees**.
  </Step>

  <Step title="Confirm">
    A model step summarizes the created event, including the returned event ID, for the activity log.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Invalid time format" icon="clock">
    **Start Date Time** and **End Date Time** must use RFC3339 format, for example `2024-01-15T09:00:00-05:00`. Include the time zone offset.
  </Accordion>

  <Accordion title="Event or calendar not found" icon="circle-question">
    The **Event ID** or **Calendar ID** does not exist or the connected account cannot see it. Confirm the calendar is shared with the authenticated user and use `primary` for the main calendar.
  </Accordion>

  <Accordion title="Authentication failed" icon="lock">
    The Google OAuth credential expired or was revoked. Reconnect the credential and confirm the OAuth client grants calendar access.
  </Accordion>
</AccordionGroup>

For issues common to every vendor, see the [Actions overview](/building-and-deploying-agents/agent-basics/actions/overview#troubleshooting).
