# List Events — Google Calendar

> List or search the events on a Google Calendar. Use this for "what's on my calendar", "what's my schedule/agenda", "what's coming up", "am I busy/free", or any question about the events in a date range: set timeMin/timeMax for the window…

- Key: `google_calendar-list-events`
- Type: Action (Read-only)
- Version: 0.1.1
- App: Google Calendar (`google_calendar`) — https://pipedream.com/apps/google-calendar.md
- This page (HTML): https://pipedream.com/apps/google-calendar/actions/list-events
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/google_calendar/actions/list-events/list-events.mjs

## Description

List or search the events on a Google Calendar. Use this for "what's on my calendar", "what's my schedule/agenda", "what's coming up", "am I busy/free", or any question about the events in a date range: set `timeMin`/`timeMax` for the window, `q` to search event text, and `singleEvents` to `true` to expand recurring events into individual occurrences. **Response size matters here:** by default every field of every matching event is returned, which runs 2-10 KB per event (long descriptions, full attendee lists, HTML links), so one busy week can exceed 100 KB and overflow an AI agent's context window. Request only what the question needs — `fields: "compact"` (equivalently `fields: "summary,start,end"`) answers a schedule question in a fraction of the bytes, and `maxAttendees: 1` drops guest lists when the question is not about who is attending. [See the documentation](https://developers.google.com/calendar/api/v3/reference/events/list)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `calendarId` | `string` | No | Optionally select the calendar, defaults to the primary calendar for the logged-in user Options are loaded from the connected account. |
| `fields` | `string` | No | Which fields to return for each event, as a comma-separated list (e.g. summary,start,end) — use this to keep the response small enough to work with. Shorthand: compact returns summary,start,end,status,location, which is what a "what's on my calendar" / schedule question needs. Add attendees only when the question is about who is invited, description only when the event's notes are needed, and htmlLink only when a link back to Google Calendar is requested — those three are what make responses large. The event's id is always returned, so the event can still be updated, deleted, or responded to without listing again. Leave blank to return the complete event resource (the default, and the largest possible response). |
| `iCalUID` | `string` | No | Specifies event ID in the iCalendar format to be included in the response. Optional. |
| `maxAttendees` | `integer` | No | The maximum number of attendees to include per event. Leave unset and EVERY attendee of every event is returned — on events with large invite lists this is usually the single largest part of the response. Set to 1 when the question isn't about who is attending (only the authenticated user is returned). |
| `maxResults` | `integer` | No | Maximum number of events returned on one result page. The number of events in the resulting page may be less than this value, or none at all, even if there are more events matching the query. Incomplete pages can be detected by a non-empty nextPageToken field in the response. By default the value is 250 events. The page size can never be larger than 2500 events. Optional. |
| `orderBy` | `string` | No | The order of the events returned in the result. Optional. The default is an unspecified, stable order. Must set Single Events to true to order by startTime. |
| `privateExtendedProperty` | `string` | No | Extended properties constraint specified as propertyName=value. Matches only private properties. This parameter might be repeated multiple times to return events that match all given constraints. |
| `q` | `string` | No | Free text search terms to find events that match these terms in any field, except for extended properties. Optional. |
| `sharedExtendedProperty` | `string` | No | Extended properties constraint specified as propertyName=value. Matches only shared properties. This parameter might be repeated multiple times to return events that match all given constraints. |
| `showDeleted` | `boolean` | No | Whether to include deleted events (with status equals "cancelled") in the result. Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. Optional. The default is False. |
| `showHiddenInvitations` | `boolean` | No | Whether to include hidden invitations in the result. Optional. The default is False. |
| `singleEvents` | `boolean` | No | Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False. |
| `timeMax` | `string` | No | Upper bound (exclusive) for an event's time to filter by. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. Must be greater than Min Time. |
| `timeMin` | `string` | No | Lower bound (exclusive) for an event's time to filter by. Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. Must be smaller than Max Time. |
| `timeZone` | `string` | No | Time zone used in the response. Optional. The default is the time zone of the calendar. Options are loaded from the connected account. |
| `updatedMin` | `string` | No | Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. When specified, entries deleted since this time will always be included regardless of showDeleted. Optional. The default is not to filter by last modification time. |
| `eventTypes` | `string[]` | No | Filter events by event type |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "google_calendar",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "google_calendar-list-events",
  arguments: {
    calendarId: "Calendar",
    fields: "Fields",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_calendar-list-events",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_calendar: { authProvisionId: "apn_xxxxxxx" },
    calendarId: "Calendar",
    fields: "Fields",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "google_calendar-list-events",
    "configured_props": {
      "google_calendar": { "authProvisionId": "apn_xxxxxxx" },
      "calendarId": "Calendar",
      "fields": "Fields"
    }
  }'
```

---

- App: https://pipedream.com/apps/google-calendar.md · All apps: https://pipedream.com/apps
