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

# Add calendar to list

> Subscribe the connected Google account to an accessible calendar.

`addCalendarToList` adds an existing accessible calendar to the connected
user's Calendar list and can set initial display preferences.

## Example

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

export default automation("Subscribe to a team calendar", () => {
  onHttpRequest({ scope: "automation" })

  addCalendarToList({
    calendar: "team@example.com",
    selected: true,
    summaryOverride: "Launch team",
    backgroundColor: "#1A73E8",
  })
})
```

## Inputs

`calendar` is the accessible calendar ID and is required even if the calendar
is not already in the user's list. Optional `backgroundColor` and
`foregroundColor` require `#RRGGBB`; `hidden`, `selected`, and `summaryOverride`
set user preferences. `notifications` is an array of `{ type }` where type is
`eventCreation`, `eventChange`, `eventCancellation`, `eventResponse`, or
`agenda`. `account` selects the Google account.

## Output

Returns the new calendar-list `Calendar`; see [Get calendar-list entry](/reference/integrations/google-calendar/actions/get-calendar-list-entry#output). The action subscribes to an existing calendar; it does not create or share one.
