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

# Google Docs

> Connect Google Docs to xpander and give agents its 3 actions: how to sign in and connect it, and which actions to hold for approval.

<Badge color="blue">HTTP API connector</Badge>

An HTTP API described by an OpenAPI spec, not an MCP server. Calls go to `https://docs.googleapis.com/` and carry an OAuth 2.0 token obtained with **Sign in with Google** on the cloud edition, or an API key or custom header on a self-hosted installation, which offers no sign-in flow.

## What the skill can do

API connector: 3 actions, as they appear in the skill panel. 2 of them create, change or delete something in Google Docs; mark those under **These actions need approval** when you add the skill to an agent.

* **Document retrieval** (2): Create Blank Document, Get Latest Document Version
* **Document management** (1): Apply Multiple Document Updates

## Authentication Options

<Tabs>
  <Tab title="Built-in xpander Auth">
    The simplest way to connect Google Docs is by using xpander's built-in authentication:

    1. In Xpander Chat, open the agent's settings and click **Add skill**.
    2. Search for **Google Docs** and select it.
    3. Click **Sign in with Google Docs**.
    4. Grant xpander permission to access your account.
    5. Your Google Docs integration is now ready to use.

    <Note>
      This method is recommended for most users. xpander securely manages your OAuth tokens without exposing any credentials.
    </Note>
  </Tab>

  <Tab title="API Access">
    ### Generate a Google Docs API Key

    1. Log in to your [Google Cloud Console](https://console.cloud.google.com/).

    2. Create a new project or select an existing one.\\
           <img src="https://mintcdn.com/xpanderai-099931d1/pzRhrv6nqUySeaGz/images/connectors/google-docs/img_1.png?fit=max&auto=format&n=pzRhrv6nqUySeaGz&q=85&s=0d4c0a7e8707fde0150a14131e3b5d1c" alt="Img 1" width="3120" height="1570" data-path="images/connectors/google-docs/img_1.png" />

    3. Go to the [Google Cloud API Library](https://console.cloud.google.com/apis/library).\\
           <img src="https://mintcdn.com/xpanderai-099931d1/pzRhrv6nqUySeaGz/images/connectors/google-docs/img_2.png?fit=max&auto=format&n=pzRhrv6nqUySeaGz&q=85&s=b5593a2234bb4bde5269f62c442520bf" alt="Img 2" width="3120" height="1585" data-path="images/connectors/google-docs/img_2.png" />

    4. Search for and select **Google Docs API**, then click **Enable**.

    5. In the sidebar, go to **Credentials**.

    6. Click **Create credentials**, and select **API key**.\\
           <img src="https://mintcdn.com/xpanderai-099931d1/pzRhrv6nqUySeaGz/images/connectors/google-docs/img_3.png?fit=max&auto=format&n=pzRhrv6nqUySeaGz&q=85&s=805a13d39f5e3154cd59d95fcdcba509" alt="Img 3" width="3122" height="1580" data-path="images/connectors/google-docs/img_3.png" />

    7. Restrict the API key to Google Docs API only (optional but recommended).\\
           <img src="https://mintcdn.com/xpanderai-099931d1/pzRhrv6nqUySeaGz/images/connectors/google-docs/img_4.png?fit=max&auto=format&n=pzRhrv6nqUySeaGz&q=85&s=a9f537237bad22f3c6513432acdde094" alt="Img 4" width="3124" height="1589" data-path="images/connectors/google-docs/img_4.png" />

    ### Connect Google Docs in xpander

    1. In Xpander Chat, open the agent's settings and click **Add skill**.
    2. Search for **Google Docs** and select it.
    3. Click **Other auth options**.
    4. Enter a **connection name**, e.g., "xpander-google-docs".
    5. Choose **Organization** access (one shared account) or **Personal** (your own account, so the agent acts with your permissions where systems allow). On an agent other people use, a personal connection runs their requests as you unless the binding requires each person's own sign-in; see [whose credential a shared agent uses](/use/agents/permissions#whose-credential-a-shared-agent-uses).
    6. Select **API Key** as the authentication method.
    7. Paste the Google Docs API key into the provided field.
    8. Choose **Basic** as the **Type**.
    9. Click **Connect**.

    <Warning>
      API keys provide limited functionality and are best for read-only operations on public files. For full access, use OAuth methods.
    </Warning>
  </Tab>
</Tabs>

## Give an agent the Google Docs skill

Once Google Docs is connected, any agent you can edit may be given the skill: open the agent's settings, click **Add skill**, and choose **Google Docs**. The skill panel lists the Google Docs actions by group. Enable only the groups the agent needs, and mark the actions that should wait for a named person's sign-off under **These actions need approval**. Which skills exist for your organization, and who may add them, is decided by your admins; see [Skills](/use/skills).

## Related Resources

* [Skills](/use/skills)
* [Google Docs API Documentation](https://developers.google.com/workspace/docs/api/reference/rest)


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