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

# Google Drive

> Integration details and setup guide for the Google Drive connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                                                                                                                                                    |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Authentication**                  | OAuth 2.0 (Authorization Code with refresh tokens)                                                                                                         |
| **Two-Way Sync**                    | No                                                                                                                                                         |
| **Events Supported**                | No                                                                                                                                                         |
| **Realtime**                        | Yes                                                                                                                                                        |
| **Supports Rate Limiting**          | Yes (Google API quotas & 429 handling)                                                                                                                     |
| **Authentication Scopes Supported** | `https://www.googleapis.com/auth/drive` (read-write), `https://www.googleapis.com/auth/userinfo.email`, `https://www.googleapis.com/auth/userinfo.profile` |

***

## Objects Supported

Alloy Automation supports syncing the following objects from **Google Drive**:

* **File**
* **Folder**
* **Drive**
* **Drive List**

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                                                                                                                                   |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Offers free trial?**                             | Yes. Create a free Google account at [https://accounts.google.com/signup](https://accounts.google.com/signup) and set up a Google Cloud project at [https://console.cloud.google.com](https://console.cloud.google.com). |
| **Requires requires paid sandbox**                 | No paid sandbox required.                                                                                                                                                                                                |
| **Requires partnership to obtain authentication?** | No. However, Google App Verification may be required in production for sensitive scopes, which can add review time.                                                                                                      |

***

### Authentication (OAuth 2.0)

For customers who want to completely whitelabel their OAuth experience, you can provide your own developer keys instead of using Alloy Automation's.

#### Create your OAuth app (Google Cloud Console)

1. Go to **Google Cloud Console** ([https://console.cloud.google.com](https://console.cloud.google.com)) → **APIs & Services** → **Credentials**.
2. Create an **OAuth client ID** (application type: *Web application*).
3. Add the redirect URI: [https://api.runalloy.com/api/strategy/connector/googleDrive/callback](https://api.runalloy.com/api/strategy/connector/googleDrive/callback)
4. Enable the **Google Drive API** for your project (APIs & Services → Library).
5. Configure the scopes you intend to request:
   * `https://www.googleapis.com/auth/drive`
   * `https://www.googleapis.com/auth/userinfo.email`
   * `https://www.googleapis.com/auth/userinfo.profile`
6. Copy your **Client ID** and **Client Secret** into Alloy Automation.

#### Consent screen & verification

* Set up the **OAuth consent screen** with your app details and domain.
* For production use or external users, complete **Google app verification** (may require demo video, privacy policy, and domain ownership).

***

## Use Cases

### 1) Embedded file picker & uploader

Allow your users to browse their Google Drive, select files/folders, and upload new versions—directly inside your app's UI—while Alloy Automation handles OAuth, permissions, and token refresh.

### 2) Automated document ingestion

Ingest new files from specific folders or shared drives on a schedule or via webhook notifications, normalize metadata, and route content into your product (e.g., knowledge bases, underwriting pipelines).

### 3) Cross-tenant provisioning for shared drives

Programmatically create and manage Shared Drives per customer account, apply folder structures, and set initial permissions as part of onboarding flows.

### 4) Compliance & lifecycle workflows

Detect updated or deleted files and trigger downstream policies—e.g., archive, quarantine, classify by MIME type, or sync file metadata to your system of record.

***

## API Gotchas

* ⚠️ **Partial responses & fields selection:** Google Drive’s API often benefits from specifying `fields` to limit payload size. If you fetch large lists without `fields`, responses can be slower and quota-heavier.
* ⚠️ **App verification (production):** Using broad scopes like `drive` may trigger a stricter Google review. If you only need limited access, prefer narrower scopes (e.g., `drive.file`) to ease verification.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
