# Google Calendar

Blocks for creating and reading events from Google Calendar.

## Google Calendar Create Event

### What it is

This block creates a new event in Google Calendar with customizable parameters.

### How it works

This block creates events in Google Calendar via the Google Calendar API. It handles various event parameters including timing, location, guest invitations, Google Meet links, and recurring schedules. The block authenticates using your connected Google account credentials.

When you specify guests, they receive email invitations (if notifications are enabled). The Google Meet option adds a video conference link to the event automatically.

### Inputs

| Input               | Description                                        | Type       | Required |
| ------------------- | -------------------------------------------------- | ---------- | -------- |
| event\_title        | Title of the event                                 | str        | Yes      |
| location            | Location of the event                              | str        | No       |
| description         | Description of the event                           | str        | No       |
| timing              | Specify when the event starts and ends             | Timing     | No       |
| calendar\_id        | Calendar ID (use 'primary' for your main calendar) | str        | No       |
| guest\_emails       | Email addresses of guests to invite                | List\[str] | No       |
| send\_notifications | Send email notifications to guests                 | bool       | No       |
| add\_google\_meet   | Include a Google Meet video conference link        | bool       | No       |
| recurrence          | Whether the event repeats                          | Recurrence | No       |
| reminder\_minutes   | When to send reminders before the event            | List\[int] | No       |

### Outputs

| Output      | Description                               | Type |
| ----------- | ----------------------------------------- | ---- |
| error       | Error message if the operation failed     | str  |
| event\_id   | ID of the created event                   | str  |
| event\_link | Link to view the event in Google Calendar | str  |

### Possible use case

**Automated Meeting Scheduling**: Create calendar events when appointments are booked through a form or scheduling system.

**Event Reminders**: Schedule events with custom reminder notifications for team deadlines or milestones.

**Team Coordination**: Create recurring meetings with Google Meet links when onboarding new team members.

***

## Google Calendar Read Events

### What it is

Retrieves upcoming events from a Google Calendar with filtering options

### How it works

This block fetches upcoming events from Google Calendar using the Calendar API. It retrieves events within a specified time range, with options to filter by search term or exclude declined events. Pagination support allows handling large numbers of events.

Events are returned with details like title, time, location, and attendees. Use 'primary' as the calendar\_id to access your main calendar.

### Inputs

| Input                     | Description                                                                                                                                 | Type            | Required |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------- |
| calendar\_id              | Calendar ID (use 'primary' for your main calendar)                                                                                          | str             | No       |
| max\_events               | Maximum number of events to retrieve                                                                                                        | int             | No       |
| start\_time               | Retrieve events starting from this time                                                                                                     | str (date-time) | No       |
| time\_range\_days         | Number of days to look ahead for events                                                                                                     | int             | No       |
| search\_term              | Optional search term to filter events by                                                                                                    | str             | No       |
| page\_token               | Page token from previous request to get the next batch of events. You can use this if you have lots of events you want to process in a loop | str             | No       |
| include\_declined\_events | Include events you've declined                                                                                                              | bool            | No       |

### Outputs

| Output            | Description                                                | Type                 |
| ----------------- | ---------------------------------------------------------- | -------------------- |
| error             | Error message if the request failed                        | str                  |
| events            | List of calendar events in the requested time range        | List\[CalendarEvent] |
| event             | One of the calendar events in the requested time range     | CalendarEvent        |
| next\_page\_token | Token for retrieving the next page of events if more exist | str                  |

### Possible use case

**Daily Briefings**: Fetch today's events to generate a morning summary or prepare for upcoming meetings.

**Schedule Conflicts**: Check for overlapping events before scheduling new appointments.

**Meeting Preparation**: Retrieve upcoming meetings to pre-load relevant documents or send reminders.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://agpt.co/docs/integrations/block-integrations/calendar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
