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

# Google Contacts Integration: Contacts & Directory for AI Agents

> Agents can search and read Google Contacts and your Workspace directory, and create or update contacts. Connect with your Google OAuth client.

## Overview

OneCLI connects AI agents to Google Contacts through Google's OAuth flow. Agents can search contacts and your Workspace directory, and create, update, or delete contacts. The gateway injects the token into every request, so your agent never sees it.

Google Contacts uses **your own Google OAuth client**, on OneCLI Cloud and self-hosted alike. One client covers every Google app in OneCLI, so if you've already set one up for another Google app, skip to step 2.

<a id="self-hosted" style={{ scrollMarginTop: "8rem" }} />

## Connect Google Contacts

<Steps>
  <Step title="Set up your Google client">
    Follow the [Google setup guide](/docs/integrations/google) once. Enable the **People API** in your Google Cloud project as part of it.
  </Step>

  <Step title="Connect">
    In the OneCLI dashboard, open **Connections** > **Google Contacts** and click **Connect Google Contacts**. Pick your Google account and click **Allow**.

    <Frame caption="The Google Contacts connect window in OneCLI before a Google client is set up.">
      <img src="https://mintcdn.com/chartdbinc/L4k9tYUENUtEpMY8/images/integrations/google-contacts/onecli-connect-google-contacts.png?fit=max&auto=format&n=L4k9tYUENUtEpMY8&q=85&s=3304825e99366d62a77b4f41455eff87" alt="OneCLI connect window for Google Contacts showing Configuration required, the setup guide link, and the Configure credentials button." width="1056" height="1084" data-path="images/integrations/google-contacts/onecli-connect-google-contacts.png" />
    </Frame>
  </Step>
</Steps>

## What agents can do

| Area | What agents can do |
| - | - |
| **Contacts** | List, search, and read contacts. Create, update, and delete contacts |
| **Other contacts** | List and search people you've emailed but not saved |
| **Directory** | List and search people in your Google Workspace directory |

## Controlling access

[Grant](/docs/guides/agent-access) the connection to each agent that needs it, and choose per tool what runs freely, what needs approval, and what's blocked. Put **Delete contact** behind approval. Organization [rules](/docs/guides/rules) add guardrails on top. A blocked request never reaches Google.

To disconnect, remove the connection in **Connections** > **Google Contacts**, then revoke OneCLI at [myaccount.google.com/permissions](https://myaccount.google.com/permissions).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.