> ## 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 deleted

> Start an automation when a Google Calendar event is deleted or cancelled.

`onCalendarEventDeleted` emits an event identity when incremental synchronization
reports it as cancelled or deleted.

## Example

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

export default automation("Handle cancelled events", () => {
  const deletion = onCalendarEventDeleted({ calendarId: "primary" })

  deletion.eventId
})
```

## Options

`calendarId` defaults to `"primary"` and must be a static calendar ID.
`account` is an optional static Google account binding.

## Trigger data

Returns:

```ts theme={null}
interface CalendarEventDeleted {
  calendarId: string
  eventId: string
  event?: CalendarEvent
}
```

`event` is the last normalized representation when the event existed in the
synchronization baseline; it can be absent. Use top-level `eventId` and
`calendarId` as the reliable deletion identity.
