> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowyte.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Calendar

> Let an agent check availability and book appointments on a connected calendar.

Connect Google Calendar once, then provision its actions as [skills](/concepts/skills) so an
agent can **check open times** and **book an appointment** mid-conversation — the agent collects
the details from the caller in natural language and writes the event for you.

## Connect

Google Calendar uses OAuth. Start the connect, then finish consent in a browser.

<Steps>
  <Step title="Begin the connection">
    `POST /integrations/google_calendar/connect` returns an `oauthUrl`.
  </Step>

  <Step title="Grant access in a browser">
    Open the `oauthUrl` while signed in to your dashboard. The browser-only callback finishes the
    connection — it cannot be completed with an API key.
  </Step>

  <Step title="Confirm">
    `GET /integrations` now lists `google_calendar` with `status: connected` and an `accountLabel`.
  </Step>
</Steps>

```bash theme={null}
curl -X POST https://builder.flowyte.com/api/v1/integrations/google_calendar/connect \
  -H "Authorization: Bearer flowyte_sk_…"
# → { "data": { "oauthUrl": "https://…" } }   # open this in a browser
```

## Provision actions as skills

List the actions, then provision the ones you want onto an agent.

<CodeGroup>
  ```bash curl theme={null}
  # See what's available
  curl https://builder.flowyte.com/api/v1/integrations/google_calendar/actions \
    -H "Authorization: Bearer flowyte_sk_…"

  # Provision the important actions (omit "actions" to take all of them)
  curl -X POST \
    https://builder.flowyte.com/api/v1/agents/AGENT_ID/integrations/google_calendar/provision \
    -H "Authorization: Bearer flowyte_sk_…" \
    -H "Content-Type: application/json" \
    -d '{ "actions": ["check_availability", "book_appointment"] }'
  ```

  ```js Node theme={null}
  const res = await fetch(
    "https://builder.flowyte.com/api/v1/agents/AGENT_ID/integrations/google_calendar/provision",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer flowyte_sk_…",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ actions: ["check_availability", "book_appointment"] }),
    },
  );
  const { data } = await res.json(); // [{ skill, created }]
  ```

  ```python Python theme={null}
  import requests

  res = requests.post(
      "https://builder.flowyte.com/api/v1/agents/AGENT_ID/integrations/google_calendar/provision",
      headers={"Authorization": "Bearer flowyte_sk_…"},
      json={"actions": ["check_availability", "book_appointment"]},
  )
  data = res.json()["data"]  # [{ "skill": …, "created": true }]
  ```
</CodeGroup>

Each returned item carries `created: false` when the skill already existed — provisioning is an
idempotent no-op, so it is safe to re-run. Actions that still need operator config land **disabled**
as drafts; open them in the dashboard to finish setup.

<Tip>
  Action slugs come from `GET /integrations/{kind}/actions` — read that catalog rather than guessing
  names, since available actions can grow over time.
</Tip>

## In the API

| Action           | Endpoint                                                          | Scope                |
| ---------------- | ----------------------------------------------------------------- | -------------------- |
| Connect          | `POST /integrations/google_calendar/connect`                      | `integrations:write` |
| List actions     | `GET /integrations/google_calendar/actions`                       | `integrations:read`  |
| Provision skills | `POST /agents/{agentId}/integrations/google_calendar/provision`   | `skills:write`       |
| Remove skills    | `DELETE /agents/{agentId}/integrations/google_calendar/provision` | `skills:write`       |
| Disconnect       | `DELETE /integrations/google_calendar`                            | `integrations:write` |

<Warning>
  Provisioning edits the agent **draft**. [Publish](/concepts/agents) before phone or chat callers
  can book.
</Warning>
