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

# Google Drive

> Google Drive Scenario seeding parameters, nested fields, and examples

Use `google_drive` in `twins` and put this configuration under `seed_config.google_drive`.

Google Drive with folders and files.

## Example seed

This is the complete Scenario request body for [creating a Scenario](https://docs.argalabs.com/api-reference/post-create-a-scenario.md). You can also import it with `arga test-runner scenarios import --file scenario.json`.

```json theme={null}
{
  "name": "Google Drive eval fixture",
  "twins": [
    "google_drive"
  ],
  "seed_config": {
    "google_drive": {
      "folders": [
        {
          "name": "Folder Name",
          "files": [
            {
              "name": "file.txt",
              "content": "file content",
              "mime_type": "text/plain"
            }
          ]
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.google_drive`. Required nested fields are marked in their tables. Provider-native objects can contain service-specific fields beyond the representative record shapes below.

| Parameter | Type | Description |
| - | - | - |
| `folders` | `object[]` | Folders fixtures in provider-native format. |
| `client_id` | `string` | Test OAuth client identifier. |
| `client_secret` | `string` | Test OAuth client secret. |
| `runtime_config` | `object` | Exported runtime configuration for restoring a configured baseline. |
| `redirect_uris` | `string[]` | Redirect uris fixtures in provider-native format. |
| `require_pkce` | `boolean` | Enable or set require pkce behavior. |
| `access_token_ttl_seconds` | `integer` | Access token ttl seconds, in seconds. Minimum: 1. |
| `authorization_code_ttl_seconds` | `integer` | Authorization code ttl seconds, in seconds. Minimum: 1. |
| `oidc_issuer` | `string` | Oidc issuer. |
| `base_time` | `string` | Reference clock for repeatable fixtures. Omit to use the current clock. |
| `principals` | `SeedPrincipal[]` | Shared Google file identities and their permission IDs. |
| `tokens` | `SeedToken[]` | Test credentials, identity assignments, and permission scopes. |
| `docs_gemini` | `DocsGeminiConfig` | Google Docs writing-assistant configuration. |
| `sheets_gemini` | `SheetsGeminiConfig` | Google Sheets assistant configuration. |
| `connected_sheets` | `ConnectedSheetsConfig` | Connected Sheets data-source fixtures. |

## Seeding behavior

Drive, Docs, and Sheets remain independently provisioned APIs. When selected in the same Twin Run, they share run-scoped file state. Sibling seeds must agree on OAuth configuration, principals, tokens, assistant settings, and any explicit `base_time`.

## Resource fields

These tables describe the record shapes used by the example. Keep native field names and casing. Map keys such as property names, IDs, and metadata keys are supplied by your fixture.

### `folders[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |
| `files` | `object[]` | Files fixtures in provider-native format. |

### `folders[].files[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |
| `content` | `string` | Text content. |
| `mime_type` | `string` | Mime type. |
| `mimeType` | `string` | MimeType. |

## Typed configuration objects

Named object types in the parameter table use these fields.

### ConnectedSheetsConfig

| Parameter | Type | Description |
| - | - | - |
| `results` | `DataSourceResult[]` | Results fixtures in provider-native format. |
| `refresh_delay_ms` | `integer` | Refresh delay ms. Minimum: 0. Maximum: 600000. |
| `delegated_access_enabled` | `boolean` | Enable or set delegated access enabled behavior. |
| `delegated_access_user_ids` | `string[]` | Delegated access user ids fixtures in provider-native format. |

### DataSourceResult

| Parameter | Type | Description |
| - | - | - |
| `spec` | `object` | **Required.** Spec. |
| `parameters` | `object` | Parameters. |
| `columns` | `string[]` | Columns fixtures in provider-native format. |
| `rows` | `any[][]` | Rows fixtures in provider-native format. |
| `allowed_user_ids` | `string[] or null` | Allowed user ids. |
| `error_code` | `string or null` | Error code. |
| `error_message` | `string` | Error message. |

### DocsGeminiConfig

| Parameter | Type | Description |
| - | - | - |
| `enabled` | `boolean` | Enable or set enabled behavior. |
| `response_mode` | `"scenario" / "live"` | Response mode. |
| `responses` | `GeminiResponse[]` | Responses fixtures in provider-native format. Maximum entries: 250. |
| `delay_ms` | `integer` | Delay ms. Minimum: 0. Maximum: 30000. |

### GeminiResponse

| Parameter | Type | Description |
| - | - | - |
| `document_id` | `string or null` | Document id. |
| `tab_id` | `string or null` | Tab id. |
| `prompt` | `string` | **Required.** Prompt. Minimum length: 1. Maximum length: 20000. |
| `text` | `string` | **Required.** Text content. Minimum length: 1. Maximum length: 200000. |
| `action` | `"answer" / "insert" / "replace"` | Action. |

### SeedPrincipal

| Parameter | Type | Description |
| - | - | - |
| `user_id` | `string` | **Required.** User id. |
| `display_name` | `string` | **Required.** Display name. |
| `email_address` | `string` | **Required.** Owner mailbox address. |
| `permission_id` | `string` | **Required.** Permission id. |
| `photo_link` | `string or null` | Photo link. |
| `account_type` | `"auto" / "workspace" / "consumer" / "service_account"` | Account type. |
| `organization_id` | `string or null` | Organization id. |
| `group_email_addresses` | `string[]` | Group email addresses fixtures in provider-native format. |
| `is_domain_admin` | `boolean` | Enable or set is domain admin behavior. |

### SeedToken

| Parameter | Type | Description |
| - | - | - |
| `token` | `string` | **Required.** Token. |
| `user_id` | `string` | **Required.** User id. |
| `scopes` | `string[]` | Scopes fixtures in provider-native format. |

### SheetsGeminiConfig

| Parameter | Type | Description |
| - | - | - |
| `enabled` | `boolean` | Enable or set enabled behavior. |
| `response_mode` | `"scenario" / "live"` | Response mode. |
| `responses` | `SheetsGeminiResponse[]` | Responses fixtures in provider-native format. Maximum entries: 250. |
| `delay_ms` | `integer` | Delay ms. Minimum: 0. Maximum: 30000. |

### SheetsGeminiResponse

| Parameter | Type | Description |
| - | - | - |
| `spreadsheet_id` | `string or null` | Spreadsheet id. |
| `sheet_id` | `integer or null` | Sheet id. |
| `prompt` | `string` | **Required.** Prompt. Minimum length: 1. Maximum length: 20000. |
| `text` | `string` | **Required.** Text content. Minimum length: 1. Maximum length: 50000. |
| `formula` | `string or null` | Formula. |
| `table` | `any[][] or null` | Table. |
| `action` | `SheetsGeminiAction or null` | Action. |

### SheetsGeminiAction

| Parameter | Type | Description |
| - | - | - |
| `title` | `string` | **Required.** Human-readable name. Minimum length: 1. Maximum length: 200. |
| `description` | `string` | **Required.** Description. Minimum length: 1. Maximum length: 5000. |
| `requests` | `object[]` | **Required.** Requests fixtures in provider-native format. Minimum entries: 1. Maximum entries: 100. |

## API coverage and limitations

**Twin name:** `google_drive`

**CLI quickstart:** [Use the Google Workspace CLI with Arga twins](https://docs.argalabs.com/features/google-workspace-cli)

**Supports**

* Google Drive API v3 files, permissions, revisions, comments, replies, shared drives, changes, watch channels, and simple, multipart, and resumable uploads.
* File operations such as list, get, create, update, copy, delete, export, download, labels, permissions, and generated IDs.
* Preset metadata for `google-docs-launch-notes` and `google-sheets-launch-plan`, matching the default resource IDs in the separately provisioned editor twins.
* Google API client compatibility through a Drive discovery document.
* Authorization-code OAuth, S256 PKCE, offline refresh, and signed OIDC ID tokens. See [Google OAuth and OIDC setup](https://docs.argalabs.com/features/google-oauth.md) for callback registration and token verification.
* OAuth scope enforcement, change polling, watch notifications, deterministic retries, replay, and storage tier-based quotas.

**Known limitations**

* The Drive `q` query language and `orderBy` support are intentionally a subset; unsupported clauses or keys return `400 invalidQuery`.
* Unsupported export formats return `400 cannotExportFile`; Google-native exports focus on common document, sheet, slide, form, script, site, and drawing formats.
* HMAC notification signatures are a twin-only optional approximation and are disabled by default.
* Upload MIME types are accepted broadly, but preview, thumbnail, edit, export, and search capabilities depend on the modeled MIME class.
* The Google Docs and Google Sheets editor twins are not part of this provision. Request `google_docs` and `google_sheets` separately for their APIs and UIs. People, Workspace Events, Apps Script, and Pub/Sub are under `google_workspace`.

**MCP tools:** `get_twin_catalog`, `provision_twins`, `start_url_validation`, `get_validation_results`.

See [Scenario seeding](https://docs.argalabs.com/twins/seeding.md) for saving, provisioning, and resetting fixtures.


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