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

# Update calendar access rule

> Change the role of an existing Google Calendar access rule.

`updateCalendarAccessRule` changes a rule's role while preserving its scope.

## Example

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

export default automation("Make a calendar read-only", () => {
  onHttpRequest({ scope: "automation" })

  updateCalendarAccessRule({
    calendar: "Team Calendar",
    ruleId: "group:launch@example.com",
    role: "reader",
    sendNotifications: true,
  })
})
```

## Inputs

`ruleId` and `role` are required. Roles are `none`, `freeBusyReader`, `reader`,
`writer`, or `owner`. `calendar` defaults to primary, `sendNotifications` is
optional, and `account` selects the Google account.

## Output

Returns the updated `{ id, role, scope }`. The action first reads the existing
rule so its principal cannot accidentally change; create a new rule to change
scope.
