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

# Get calendar busy times

> Retrieves busy intervals from selected connected calendars.

`calcom.getCalendarBusyTimes` retrieves busy intervals from selected connected calendars.

```ts automations/get-calendar-busy-times.automation.ts theme={null}
import { automation, markSignificant } from "automate.ax"
import { calcom } from "automate.ax/calcom"

export default automation("Get calendar busy times", () => {
  markSignificant(
    calcom.getCalendarBusyTimes({
      calendarsToLoad: [{ credentialId: 4, externalId: "primary" }],
      dateFrom: "2026-09-10T00:00:00.000Z",
      dateTo: "2026-09-11T00:00:00.000Z",
      timeZone: "UTC",
    }),
  )
})
```

## Input

Pass these fields:

| Field             | Type                 | Required | Description       |
| ----------------- | -------------------- | -------- | ----------------- |
| `calendarsToLoad` | `object[]`           | Yes      | Minimum items: 1. |
| `dateFrom`        | `string (date-time)` | Yes      | —                 |
| `dateTo`          | `string (date-time)` | Yes      | —                 |
| `timeZone`        | `string`             | No       | —                 |

## Output

Returns an array. Each item has these fields:

| Field    | Type                 | Required | Description |
| -------- | -------------------- | -------- | ----------- |
| `start`  | `string (date-time)` | Yes      | —           |
| `end`    | `string (date-time)` | Yes      | —           |
| `source` | `string \| null`     | No       | —           |

Cal.com enforces account role, plan, and availability requirements. Provider rejections surface as structured action failures with the HTTP status and any `Retry-After` delay.
