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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On event changed

> Run an automation for any Google Calendar event lifecycle change.

`googleCalendar.onEventChanged` is the broad Google Calendar event trigger. Use it when one automation handles created, updated, and deleted events.

## Example

```ts automations/audit-calendar.automation.ts theme={null}
import { automation } from "automate.ax"
import { googleCalendar } from "automate.ax/google-calendar"

export default automation("Audit calendar changes", () => {
  const change = googleCalendar.onEventChanged({ calendarId: "primary" })

  // Route the Google Calendar change by type.
})
```

## Options

`calendarId?: string` is a static immutable calendar ID and defaults to `"primary"`. Unlike action calendar references, triggers don't resolve display titles. `account` is a static Google Account binding and defaults to the project binding. Signals can't select either value at runtime.

## Trigger data

```ts theme={null}
type GoogleCalendarEventChange =
  | { changeType: "created" | "updated"; event: CalendarEvent }
  | {
      changeType: "deleted"
      calendarId: string
      event?: CalendarEvent
      eventId: string
    }
```

`CalendarEvent` matches [Get event](/reference/integrations/google-calendar/actions/get-event#output). A deletion includes the last synchronized event when available.

Google's webhook contains no event body. Automate.ax incrementally synchronizes the calendar, classifies each lifecycle against its durable baseline, and deduplicates unchanged provider state. Existing events establish the initial baseline and aren't replayed.
