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

# Query free/busy

> Query busy periods across up to 50 Google calendars or groups.

`queryFreeBusy` returns provider busy intervals without exposing event details.
Use it to check scheduling conflicts across people, rooms, or Google Groups.

## Example

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

export default automation("Check team conflicts", () => {
  onHttpRequest({ scope: "automation" })

  queryFreeBusy({
    calendars: ["Team Calendar", "room-1@example.com"],
    timeMin: "2026-08-10T09:00:00-07:00",
    timeMax: "2026-08-10T17:00:00-07:00",
    timeZone: "America/Los_Angeles",
  })
})
```

## Inputs

`calendars` is a required array of 1–50 exact calendar titles, IDs, or Google
Group IDs. RFC 3339 `timeMin` and `timeMax` are required and the end must follow
the start. `timeZone` optionally controls the response timezone; `account`
selects the Google account.

## Output

```ts theme={null}
interface FreeBusyResult {
  timeMin: string
  timeMax: string
  calendars: Array<{
    calendarId: string
    busy: Array<{ start: string; end: string }>
    errors: Array<{ domain?: string; reason?: string }>
  }>
}
```

Busy starts are inclusive and ends are exclusive. Inspect each calendar's
`errors`; Google can return partial results when a calendar is inaccessible or
a group cannot be expanded.
