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

# Delete calendar

> Permanently delete an owned secondary Google Calendar.

`deleteCalendar` deletes a secondary calendar owned by the connected account.

## Example

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

export default automation("Delete an obsolete calendar", () => {
  onHttpRequest({ scope: "automation" })

  deleteCalendar({ calendar: "Obsolete project" })
})
```

## Inputs

`calendar: string` is required and accepts an exact title or ID. `account`
selects the Google account.

## Output

Returns the immutable deleted calendar ID. The primary calendar cannot be
deleted. To stop displaying a shared calendar without destroying it, use
[Remove calendar from list](/reference/integrations/google-calendar/actions/remove-calendar-from-list).
