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

# Google Docs

> Let your UnleashX agent create Google Docs, read content, and update text automatically.

# Google Docs

> **In one line:** Connect Google Docs so your UnleashX agent can create documents, read them, and append or replace text for you.

|                    |                                                                                        |
| ------------------ | -------------------------------------------------------------------------------------- |
| **Category**       | Productivity                                                                           |
| **Authentication** | OAuth (Google sign-in)                                                                 |
| **Setup time**     | \~2 minutes                                                                            |
| **Difficulty**     | Easy                                                                                   |
| **Best for**       | Generating and updating documents from AI output and building repeatable doc workflows |

## 1. Overview

Google Docs is Google's word-processing service for creating and editing text documents stored in Drive.

Once connected, your UnleashX agent can list drives, folders, and documents, create new documents in a folder, read a document's content, replace matching text, append text, generate an AI image into a doc, and watch for newly created documents.

Connecting Google Docs to UnleashX makes document work conversational: ask "draft a project brief in the Projects folder" or "append today's summary to the standup doc," and the agent creates or updates the right document automatically.

## 2. What you'll need

<Steps>
  <Step title="A Google account with Docs">
    Any personal Google account or a Google Workspace account with Docs enabled.
  </Step>

  <Step title="Permission to grant access">
    You must be able to complete the Google sign-in and approve the requested permissions.
  </Step>

  <Step title="An UnleashX agent">
    An agent in your UnleashX workspace where you'll add the Docs connector.
  </Step>
</Steps>

<Note>
  No admin access? On a managed Google Workspace account, your admin may need to allow UnleashX before authorization succeeds.
</Note>

## 3. Get your credentials

Google Docs uses **Google OAuth 2.0**. You do **not** create or paste an API key. UnleashX redirects you to Google, you sign in once, and Google issues an access token to UnleashX automatically.

<Steps>
  <Step title="Start the connection in UnleashX">
    In your agent's **Data Connectors**, find **Google Docs** and click **Connect** (see Section 4).
  </Step>

  <Step title="Sign in with Google">
    Choose the Google account whose documents you want to connect.
  </Step>

  <Step title="Review and approve the requested scopes">
    Click **Allow** to grant access and return to UnleashX.
  </Step>
</Steps>

<Info>
  There is no key to copy. Access is granted by your Google sign-in and can be revoked anytime at your [Google Account permissions page](https://myaccount.google.com/permissions).
</Info>

**Scopes UnleashX requests for Google Docs:**

| Scope                                            | Why UnleashX needs it                                              |
| ------------------------------------------------ | ------------------------------------------------------------------ |
| `https://www.googleapis.com/auth/documents`      | Read and edit document content (replace/append text).              |
| `https://www.googleapis.com/auth/drive`          | List drives/folders/documents and create or delete document files. |
| `https://www.googleapis.com/auth/userinfo.email` | Identify which account is connected.                               |

## 4. Connect on UnleashX

<Steps>
  <Step title="Open your agent">
    Sign in at [https://www.tryunleashx.com](https://www.tryunleashx.com) and open your agent.
  </Step>

  <Step title="Go to Data Connectors">
    In the agent, open **Data Connectors**.
  </Step>

  <Step title="Find Google Docs and connect">
    Locate **Google Docs** and click **Connect** / **Add** / **Configure**.
  </Step>

  <Step title="Authorize with Google">
    Click **Authorize**, sign in with Google, and approve the requested permissions.
  </Step>

  <Step title="Confirm success">
    You'll return to UnleashX and the connector status will show a **Connected** badge.
  </Step>
</Steps>

### Use Google Docs in a Workflow

Once connected, you can add **Google Docs** to any automation from the **Workflows** builder. Its triggers and tools appear in the Apps panel, marked with an **MCP** badge.

<Steps>
  <Step title="Add a trigger or action node">
    Open **Workflows → New Workflow**. On the canvas, click **+ Add Trigger** (or the **+** below any node) to add a step.

    <img src="https://mintcdn.com/unleashx/LXZeho1M8XzFkz0k/images/mcp/workflows/05-add-trigger.png?fit=max&auto=format&n=LXZeho1M8XzFkz0k&q=85&s=449a0c03b0c7b40e571ec02373a85259" alt="Add a trigger on the workflow canvas" width="1390" height="722" data-path="images/mcp/workflows/05-add-trigger.png" />
  </Step>

  <Step title="Pick Google Docs from the Apps panel">
    In the **Paths** panel, open the **Apps** tab and select **Google Docs**. Use the search box if you have many connectors.

    <img src="https://mintcdn.com/unleashx/LXZeho1M8XzFkz0k/images/mcp/workflows/06-apps-list.png?fit=max&auto=format&n=LXZeho1M8XzFkz0k&q=85&s=bbb8bb6e668c4f8e1f6fd5e4955a45f0" alt="Choose your app from the Apps list" width="2446" height="1550" data-path="images/mcp/workflows/06-apps-list.png" />
  </Step>

  <Step title="Choose a trigger or tool">
    Pick the trigger or action you want. Configure its fields — required fields are marked with a red asterisk (\*).
  </Step>

  <Step title="Add or select your account">
    Under **Selected account**, choose an already-connected account, or click **Add Account** to connect one now.
  </Step>

  <Step title="Save and test">
    Fill in the remaining fields and click **Save**. Use **Test** to verify the step, then toggle **Publish** when the workflow is ready.
  </Step>
</Steps>

<Note>
  The steps are the same for every connector. For the full workflow builder guide, see [Using MCP in Workflows](/mcp/workflows).
</Note>

## 5. Available tools

| Tool                    | What it does                                    | Changes data? |
| ----------------------- | ----------------------------------------------- | ------------- |
| List Drives             | List available Google Drives.                   | No            |
| Folder List             | List folders in a specific drive.               | No            |
| List Document           | List documents in a specific folder.            | No            |
| Create Document         | Create a new Google Document in a folder.       | ✏️ Yes        |
| Delete Document         | Delete a Google Document.                       | ⚠️ Yes        |
| Get Content Document    | Read a document's content.                      | No            |
| Replace Text            | Replace all occurrences of text in a document.  | ✏️ Yes        |
| Append Text             | Append text to the end of a document.           | ✏️ Yes        |
| On New Document Created | Trigger: return documents added since last run. | No            |
| Generate AI Image       | Generate an AI image (for use in a document).   | ✏️ Yes        |

## 6. Example usage

> **"Create a doc called 'Kickoff Notes' in the Projects folder and add today's agenda."**
>
> Runs **Create Document**, then **Append Text**.

> **"In the contract doc, replace 'Acme Inc.' with 'Acme Corporation'."**
>
> Runs **Replace Text** on the target document.

## 7. Permissions & data access

**UnleashX can:**

* List drives, folders, and documents.
* Create and delete documents.
* Read document content, replace text, and append text.
* Generate AI images for documents.

**UnleashX cannot:**

* Access Gmail, Calendar, or other Google services unless connected separately.
* Change your Google account settings or password.
* Edit documents you don't have access to.

**To disconnect:** In UnleashX, open **Data Connectors → Google Docs → Disconnect**, or revoke at [https://myaccount.google.com/permissions](https://myaccount.google.com/permissions). Revoking takes effect immediately.

The connection authenticates each request with your Google OAuth access token (resolved from an `access-token` header, a `google_docs_access_token` header, or an `Authorization: Bearer` header, falling back to your UnleashX session), refreshed automatically when it expires.

## 8. Troubleshooting

| Problem             | What it means                                              | How to fix it                                           |
| ------------------- | ---------------------------------------------------------- | ------------------------------------------------------- |
| `401 Unauthorized`  | The access token is missing or expired.                    | Reconnect Google Docs in **Data Connectors**.           |
| `403 Forbidden`     | Missing scope, or you lack edit rights on the document.    | Re-authorize all scopes; confirm you can edit the file. |
| `404 Not Found`     | The document or folder ID is wrong or not shared with you. | Verify the `document_id`/`folder_id` and your access.   |
| Replace did nothing | The search text didn't match (case sensitivity).           | Check exact text and the `match_case` setting.          |

For general connector issues, see [/mcp/integrations](/mcp/integrations).

## 9. Frequently asked questions

**Does UnleashX store my documents?**
No. It reads and writes through Google's API in real time to fulfill your requests.

**Can multiple team members connect Docs?**
Yes. Each person authorizes their own Google account.

**Can it format text, not just insert it?**
The tools focus on creating documents and inserting/replacing text. Rich formatting beyond that isn't exposed by these tools.

## 10. References

* [Google Docs API documentation](https://developers.google.com/docs/api)
* [Google Docs API OAuth scopes](https://developers.google.com/docs/api/concepts/scopes)
* [Google Cloud Console](https://console.cloud.google.com/)
* [Manage third-party access to your Google Account](https://myaccount.google.com/permissions)
