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

# Google integration

> Connect Google Tasks, Calendar, and Gmail through a shared OAuth flow.

ollim-bot integrates with three Google services through a shared OAuth2
flow. A single set of credentials handles authentication for Google
Tasks, Google Calendar, and Gmail — no per-service setup needed.

All three services are available as both CLI subcommands and agent
capabilities. The agent uses CLI commands (`ollim-bot tasks`,
`ollim-bot cal`) and embed buttons to interact with Tasks and Calendar,
and a dedicated subagent for Gmail.

## Available services

<Columns cols={3}>
  <Card title="Google Tasks" icon="list-check" href="/integrations/google-tasks">
    Full task management — list, add, complete, update, and delete tasks via CLI or agent.
  </Card>

  <Card title="Google Calendar" icon="calendar" href="/integrations/google-calendar">
    Event management — list, show, add, update, and delete calendar events via CLI or agent.
  </Card>

  <Card title="Gmail" icon="envelope" href="/integrations/google-gmail">
    Read-only email access — list and read messages via CLI or the gmail-reader subagent.
  </Card>
</Columns>

## How it works

All Google services share a single OAuth2 credential. One consent
flow grants access to all three services:

| Service         | Access level |
| --------------- | ------------ |
| Google Tasks    | Read/write   |
| Google Calendar | Read/write   |
| Gmail           | Read-only    |

Run [`/google-auth`](/core-usage/slash-commands#google-auth) to connect
your Google account. The command supports both a browser-based flow and a
paste-based flow for headless servers. After granting access, the token is
cached and refreshed automatically — you only need to consent once.

If your token is revoked (password change, manual revocation), the bot
detects it automatically and prompts you to reconnect with `/google-auth`.

<Note>
  If a code update adds new scopes, delete
  `~/.ollim-bot/state/token.json` and run `/google-auth` to re-consent.
</Note>

## Credential files

| File                     | Path                                  | Purpose                              |
| ------------------------ | ------------------------------------- | ------------------------------------ |
| OAuth client credentials | `~/.ollim-bot/state/credentials.json` | Downloaded from Google Cloud Console |
| Cached token             | `~/.ollim-bot/state/token.json`       | Auto-generated after `/google-auth`  |

## Find what you need

| I want to...                                 | Go to                                                            |
| -------------------------------------------- | ---------------------------------------------------------------- |
| Connect my Google account for the first time | [Set up Google integration](/getting-started/google-integration) |
| Manage tasks with the bot or CLI             | [Google Tasks](/integrations/google-tasks)                       |
| View and manage calendar events              | [Google Calendar](/integrations/google-calendar)                 |
| Read emails via the gmail-reader subagent    | [Gmail](/integrations/google-gmail)                              |
| Trigger the bot from external services       | [Webhooks](/integrations/webhooks)                               |

## Next steps

<Columns cols={2}>
  <Card title="Set up Google integration" icon="puzzle-piece" href="/getting-started/google-integration">
    Step-by-step guide to connecting Google Tasks, Calendar, and Gmail.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/integrations/webhooks">
    Trigger background forks from external services via HTTP.
  </Card>
</Columns>
