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

# Google Workspace

> Connect Google Drive, Docs, and Sheets to Adapt

![Google Workspace integration](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=5b2b0cfe49259db884c8be7f926a7cc2)

Connect Google Workspace to let Adapt access Google Drive, Docs, Sheets,
and Slides on behalf of your organization using a service account with
domain-wide delegation.

## Prerequisites

Before setting up, you'll need:

* **A Google Cloud account** -- if your organization doesn't have one yet, [create a Google Cloud account](https://cloud.google.com/free) first. You'll need this to access the Google Cloud Console and create a service account. If your organization already uses GCP with Adapt, see the [GCP integration guide](https://v1-docs.adapt.com/docs/integrations/gcp.md) for details.
* **Google Workspace admin access** to configure domain-wide delegation
* **Google Cloud Console access** to create a service account
* A user email that the service account will impersonate

## Setup

### Step 1: Create a Google Cloud Project

**1. Open Google Cloud Console**

Go to [console.cloud.google.com](https://console.cloud.google.com) and sign in with your Google Workspace admin account.

**2. Create a new project**

Click the project dropdown at the top, then **New Project**. Name it something like "Adapt Integration".

![Create a new Google Cloud project](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/create-project.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=f305da764288dc4726943cb156aa171f)

**3. Select the project**

Make sure your new project is selected in the project dropdown before continuing.

### Step 2: Enable Required APIs

**1. Navigate to APIs & Services**

In the left sidebar, go to **APIs & Services > Library**.

![Google Cloud API Library](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/api-library.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=38221c5e91251ef4bfa7f501ce8a0eb5)

**2. Enable the following APIs**

Search for and enable each of these APIs:

| API | Purpose |
| - | - |
| **Google Drive API** | Access files and folders |
| **Google Docs API** | Read and write documents |
| **Google Sheets API** | Read and write spreadsheets |
| **Google Slides API** | Read and write presentations |

![Enable an API in Google Cloud](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/enable-api.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=db90f25aea397a7696720e920c3c9396)

### Step 3: Create a Service Account

**1. Go to Service Accounts**

Navigate to **IAM & Admin > Service Accounts** in the left sidebar.

![Service Accounts page](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/service-accounts.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=6ef9bf0d144c029fcd7539070cef6ce8)

**2. Create service account**

Click **Create Service Account** at the top.

* **Name**: `adapt-integration`
* **Description**: "Service account for Adapt integration with Google Workspace"

![Create service account form](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/create-service-account.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=8b6f4bca59ec9fb7f362204b5714b197)

**3. Skip optional steps**

You can skip the "Grant this service account access" and "Grant users access" steps. Click **Done**.

**4. Create a key**

Click on your new service account, go to the **Keys** tab, and click **Add Key > Create new key**.

* Select **JSON** format
* Click **Create**

![Create service account key](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/create-key.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=a60d1678034dfdb66acbb4083febbaf2)

> [!WARNING]
>
> Save this JSON file securely. You'll need it to connect Adapt, and it cannot be downloaded again.

### Step 4: Configure Domain-Wide Delegation

**1. Enable delegation on the service account**

In the service account details, click **Advanced Settings**, and note the
**Client ID** of the service account.

![Enable domain-wide delegation](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/enable-delegation.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=7ad2ef36694441262688baaad8eb97cb)

**2. Open Google Workspace Admin Console**

Go to [admin.google.com](https://admin.google.com) and navigate to **Security > Access and data control > API controls**.

**3. Manage Domain-wide Delegation**

Click **Manage Domain Wide Delegation**, then **Add new**.

**4. Add the Client ID and scopes**

Enter the **Client ID** for the service account, then add the OAuth scopes matching the access level you'll choose in Adapt (comma-separated):

**For read & write access:**

```
https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/presentations
```

**For read-only access:**

```
https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/spreadsheets.readonly,https://www.googleapis.com/auth/documents.readonly,https://www.googleapis.com/auth/presentations.readonly
```

![Add OAuth scopes](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/add-scopes.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=b2a9df44a74029a9086534d1509e6205)

**5. Authorize**

Click **Authorize** to complete domain-wide delegation setup.

### Step 5: Connect to Adapt

**1. Go to Integrations**

In Adapt, navigate to **Settings > Integrations > Google Workspace**.

**2. Add Google Workspace**

Click **Add Google Workspace** to open the connection dialog.

**3. Enter credentials**

* **Service Account JSON**: Paste the entire contents of the JSON key file
  for your service account.
* **Fixed User Email**: Enter the email of a user in your domain that Adapt should impersonate (e.g., `adapt@yourdomain.com`)
* **Access Level**: Choose **Read & Write** or **Read-only** -- this must match the scopes you configured in Step 4.

![Connect Google Workspace dialog](https://mintcdn.com/adapt-fa4ae803/D2qeipLO8OyXaFS0/images/integrations/google-workspace/connect-modal.png?fit=max\&auto=format\&n=D2qeipLO8OyXaFS0\&q=85\&s=8950b58f411e8eabf7fee993c19b6eeb)

**4. Connect**

Click **Connect** to complete the setup.

## Permissions

Depending on the access level you chose during setup, Adapt will have:

| Permission | Read-Only | Read & Write |
| - | :-: | :-: |
| Drive - Read files | ✓ | ✓ |
| Drive - Create/edit files | | ✓ |

> [!NOTE]
>
> All access is performed by impersonating the **Fixed User Email** you specified during setup. Adapt will have the same access as that user within the authorized scopes.

## Capabilities

With Google Workspace connected, Adapt can help you work with your organization's documents and communications.

### Examples

Read and analyze documents:

```
Summarize the product roadmap doc in our Drive
```

Create content:

```
Draft a project proposal doc based on our discussion and create a Google doc for it.
```

## Troubleshooting

### "Unauthorized" or "Access denied" errors

* Check that the OAuth scopes in Admin Console match what Adapt needs
* Ensure the Fixed User Email is a valid user in your domain

### "API not enabled" errors

* Return to the Google Cloud Console and verify all required APIs are enabled
* Make sure you're in the correct project

### Changes not appearing

* Domain-wide delegation can take a few minutes to propagate
* Try disconnecting and reconnecting the integration

## Security Considerations

* **Anyone in your organization can access what Adapt can access.** The organization connection impersonates a single Fixed User Email, so any document that user can open is reachable by everyone in your organization through Adapt. If content should stay scoped to a single person, use a [personal connection](https://v1-docs.adapt.com/docs/integrations/overview.md#personal-connections) instead.
* The service account JSON contains sensitive credentials. Never share it publicly.
* Use **read-only** scopes if Adapt doesn't need to create or modify content.
* Consider creating a dedicated admin user for the Fixed User Email to audit Adapt's activity.
* You can revoke access at any time by deleting the domain-wide delegation entry in Admin Console.


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