> ## 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 Docs

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

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

Google Docs documents with titled, editable body content.

## 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 Docs eval fixture",
  "twins": [
    "google_docs"
  ],
  "seed_config": {
    "google_docs": {
      "docs_gemini": {
        "enabled": true,
        "response_mode": "scenario",
        "responses": [
          {
            "prompt": "Draft a short status update",
            "text": "The project is ready for review.",
            "action": "insert"
          }
        ]
      },
      "documents": [
        {
          "title": "Launch notes",
          "content": "The launch is ready for final review."
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.google_docs`. 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 |
| - | - | - |
| `docs_gemini` | `DocsGeminiConfig` | Google Docs writing-assistant configuration. |
| `documents` | `object[]` | Documents fixtures in provider-native format. |
| `client_id` | `string` | Test OAuth client identifier. |
| `client_secret` | `string` | Test OAuth client secret. |
| `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. |
| `sheets_gemini` | `SheetsGeminiConfig` | Google Sheets assistant configuration. |
| `connected_sheets` | `ConnectedSheetsConfig` | Connected Sheets data-source fixtures. |

## Seeding behavior

Provision `google_docs` explicitly to use the Docs API. Drive and Sheets remain separate APIs; selected siblings share file state only within the same Twin Run. Document seeds accept `title` and `content` (alias `body`).

## 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.

### `documents[]`

| Parameter | Type | Description |
| - | - | - |
| `title` | `string` | Human-readable name. |
| `content` | `string` | Text content. |
| `body` | `string` | Text content. |

## 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_docs`

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

**Supports**

* Google Docs v1 document create, get, and atomic `batchUpdate` operations.
* UTF-16 document indexes, text insertion and deletion, replace-all, text and paragraph styling, and named ranges.
* A Docs v1 Discovery document rewritten to the provisioned twin URL.
* A browsable Docs-style home and document editor with blank-document creation, autosave, bold, italic, underline, sharing, and document export.
* The preset document ID `google-docs-launch-notes`, which matches the corresponding file metadata in the default Drive twin.

**Known limitations**

* This provision contains the Docs API and editor UI only. Provision `google_drive` for Drive metadata and file operations, and `google_sheets` for spreadsheet editing.
* The editor focuses on common document workflows. It does not model real-time multi-user cursors, full version history, or every consumer Docs command.

**Provision**

```bash theme={null}
arga twin-runs create --twins google_docs --ttl 60 --wait
```

**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.