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

# Google Workspace

> Gmail, Calendar, Drive, Sheets, and Contacts.

Google Workspace is included in Archal's environment catalog. Use it in a sandbox for Gmail, Calendar, Drive, Sheets, and Contacts.

|                 |                                                         |
| --------------- | ------------------------------------------------------- |
| Environment ID  | `google-workspace`                                      |
| Transport       | REST and MCP                                            |
| State           | JSON                                                    |
| Contract        | `archal.environment-state.google-workspace` version `1` |
| Channel         | Preview                                                 |
| Curated samples | 5                                                       |

Preview means the environment is included for testing, but its upstream coverage is incomplete. Verify the operations your test depends on.

## Compatibility boundary

**Local catalog validation:** All five published samples passed. Checks cover the state contract, relationships, artifact hash, secret scan, and size limit.

<Note>
  Local catalog validation is not hosted proof. Archal checks current certification, reset, and isolation evidence before admitting new sandboxes. Use the authenticated environment catalog for live availability.
</Note>

* Cross-product and permission semantics are bounded to published routes.

## Curated starting states

List the five samples with `archal sample list google-workspace`. Each sample is a versioned starting state with a representative read, mutation, expected diff, reset expectation, and verified artifact hash.

<AccordionGroup>
  <Accordion title="Google Workspace draft-send baseline">
    Read labels for one account with one thread, message, and draft before creating a label.

    **Sample ID:** `google-workspace.draft-send-baseline.v1`

    **Category:** `minimal`

    **Starting state:** 6 records across `accounts`: 1, `calendars`: 1, `gmailDrafts`: 1, `gmailMessages`: 1, `gmailThreads`: 1, `googleAuthTokens`: 1

    **Supported surface:** Stateful Gmail, Calendar, Drive, Sheets, Contacts, and selected account settings.

    **Required capabilities:** `state.read`, `state.load`, `state.reset`, `rest.gmail-labels`

    **First read:** `GET /gmail/v1/users/me/labels`. Expected result: HTTP 200.

    **Representative mutation:** `POST /gmail/v1/users/me/labels`. Expected result: HTTP 200, 201, 204.

    **Mutation input**

    ```json theme={null}
    {
      "labelListVisibility": "labelShow",
      "messageListVisibility": "show",
      "name": "Integration Escalations"
    }
    ```

    **Expected diff:** changes include `_googleWorkspaceGmailRuntime.labels`. Exact match required: no. Hosted promotion must observe every listed path after the provider-native mutation; dynamic provider ids and timestamps are excluded from exact matching.

    **Expected reset:** restores loaded sample.

    **Known limits**

    * Cross-product and permission semantics are bounded to published routes.

    **Start this sample**

    ```bash theme={null}
    archal sample show google-workspace.draft-send-baseline.v1 --raw > archal-google-workspace-draft-send-baseline.json
    archal state validate google-workspace archal-google-workspace-draft-send-baseline.json
    archal session create google-workspace \
      --state google-workspace=archal-google-workspace-draft-send-baseline.json
    ```

    **Inspect the raw state**

    ```bash theme={null}
    archal sample show google-workspace.draft-send-baseline.v1 --raw
    ```

    The packaged JSON artifact is `samples/states/google-workspace/draft-send-baseline/state.json` and is 2,703 bytes. The CLI verifies SHA-256 `358a7158a24d70f11a10c229d566f80e97cf5ffa95b520ac9b7c081294a35836` before printing it.

    Catalog validation: **Passed**. Hosted availability is determined by Archal's live certification and admission system, not this static page.
  </Accordion>

  <Accordion title="Google Workspace email-to-ticket team">
    Exercise six support threads and fifteen messages feeding a small-team ticket workflow.

    **Sample ID:** `google-workspace.email-to-ticket-pipeline.v1`

    **Category:** `small-team`

    **Starting state:** 23 records across `accounts`: 1, `calendars`: 1, `gmailMessages`: 15, `gmailThreads`: 6

    **Supported surface:** Stateful Gmail, Calendar, Drive, Sheets, Contacts, and selected account settings.

    **Required capabilities:** `state.read`, `state.load`, `state.reset`, `rest.gmail-labels`

    **First read:** `GET /gmail/v1/users/me/labels`. Expected result: HTTP 200.

    **Representative mutation:** `POST /gmail/v1/users/me/labels`. Expected result: HTTP 200, 201, 204.

    **Mutation input**

    ```json theme={null}
    {
      "labelListVisibility": "labelShow",
      "messageListVisibility": "show",
      "name": "Integration Escalations"
    }
    ```

    **Expected diff:** changes include `_googleWorkspaceGmailRuntime.labels`. Exact match required: no. Hosted promotion must observe every listed path after the provider-native mutation; dynamic provider ids and timestamps are excluded from exact matching.

    **Expected reset:** restores loaded sample.

    **Known limits**

    * Cross-product and permission semantics are bounded to published routes.

    **Start this sample**

    ```bash theme={null}
    archal sample show google-workspace.email-to-ticket-pipeline.v1 --raw > archal-google-workspace-email-to-ticket-pipeline.json
    archal state validate google-workspace archal-google-workspace-email-to-ticket-pipeline.json
    archal session create google-workspace \
      --state google-workspace=archal-google-workspace-email-to-ticket-pipeline.json
    ```

    **Inspect the raw state**

    ```bash theme={null}
    archal sample show google-workspace.email-to-ticket-pipeline.v1 --raw
    ```

    The packaged JSON artifact is `samples/states/google-workspace/email-to-ticket-pipeline/state.json` and is 21,156 bytes. The CLI verifies SHA-256 `50f830d66dc864b784091ddf7d9c7765299a80cbc126a7ba2e37d583c7c3aa65` before printing it.

    Catalog validation: **Passed**. Hosted availability is determined by Archal's live certification and admission system, not this static page.
  </Accordion>

  <Accordion title="Google Workspace busy inbox">
    Cover a dense two-account inbox plus calendars, contacts, Drive, Sheets, drafts, and attachments.

    **Sample ID:** `google-workspace.busy-inbox.v1`

    **Category:** `populated`

    **Starting state:** 130 records across `accounts`: 2, `calendarEvents`: 8, `calendars`: 2, `contacts`: 15, `driveFiles`: 3, `drivePermissions`: 3, `gmailAttachments`: 2, `gmailDrafts`: 3, `gmailMessages`: 66, `gmailThreads`: 22, `googleAuthTokens`: 2, `spreadsheets`: 1, `spreadsheetSheets`: 1

    **Supported surface:** Stateful Gmail, Calendar, Drive, Sheets, Contacts, and selected account settings.

    **Required capabilities:** `state.read`, `state.load`, `state.reset`, `rest.gmail-labels`

    **First read:** `GET /gmail/v1/users/me/labels`. Expected result: HTTP 200.

    **Representative mutation:** `POST /gmail/v1/users/me/labels`. Expected result: HTTP 200, 201, 204.

    **Mutation input**

    ```json theme={null}
    {
      "labelListVisibility": "labelShow",
      "messageListVisibility": "show",
      "name": "Integration Escalations"
    }
    ```

    **Expected diff:** changes include `_googleWorkspaceGmailRuntime.labels`. Exact match required: no. Hosted promotion must observe every listed path after the provider-native mutation; dynamic provider ids and timestamps are excluded from exact matching.

    **Expected reset:** restores loaded sample.

    **Known limits**

    * Cross-product and permission semantics are bounded to published routes.

    **Start this sample**

    ```bash theme={null}
    archal sample show google-workspace.busy-inbox.v1 --raw > archal-google-workspace-busy-inbox.json
    archal state validate google-workspace archal-google-workspace-busy-inbox.json
    archal session create google-workspace \
      --state google-workspace=archal-google-workspace-busy-inbox.json
    ```

    **Inspect the raw state**

    ```bash theme={null}
    archal sample show google-workspace.busy-inbox.v1 --raw
    ```

    The packaged JSON artifact is `samples/states/google-workspace/busy-inbox/state.json` and is 107,539 bytes. The CLI verifies SHA-256 `a5089955fc0846cb130fd5b0cba3617065eee02f696d09d383a0f46ac8804d2e` before printing it.

    Catalog validation: **Passed**. Hosted availability is determined by Archal's live certification and admission system, not this static page.
  </Accordion>

  <Accordion title="Google Workspace calendar conflict">
    Verify overlapping calendar events and conflict-resolution reads across two calendars.

    **Sample ID:** `google-workspace.calendar-conflict.v1`

    **Category:** `edge-case`

    **Starting state:** 12 records across `accounts`: 1, `calendarEvents`: 9, `calendars`: 2

    **Supported surface:** Stateful Gmail, Calendar, Drive, Sheets, Contacts, and selected account settings.

    **Required capabilities:** `state.read`, `state.load`, `state.reset`, `rest.gmail-labels`

    **First read:** `GET /calendar/v3/calendars/primary/events?timeMin=2026-04-01T16%3A00%3A00.000Z&timeMax=2026-04-01T22%3A30%3A00.000Z&singleEvents=true&orderBy=startTime`. Expected result: HTTP 200.

    **Representative mutation:** `PATCH /calendar/v3/calendars/primary/events/evt_arch_review`. Expected result: HTTP 200.

    **Mutation input**

    ```json theme={null}
    {
      "end": {
        "dateTime": "2026-04-01T20:00:00.000Z",
        "timeZone": "UTC"
      },
      "start": {
        "dateTime": "2026-04-01T19:00:00.000Z",
        "timeZone": "UTC"
      }
    }
    ```

    **Expected diff:** changes include `calendarEvents`. Exact match required: no. Hosted promotion must observe every listed path after the provider-native mutation; dynamic provider ids and timestamps are excluded from exact matching.

    **Expected reset:** restores loaded sample.

    **Known limits**

    * Cross-product and permission semantics are bounded to published routes.

    **Start this sample**

    ```bash theme={null}
    archal sample show google-workspace.calendar-conflict.v1 --raw > archal-google-workspace-calendar-conflict.json
    archal state validate google-workspace archal-google-workspace-calendar-conflict.json
    archal session create google-workspace \
      --state google-workspace=archal-google-workspace-calendar-conflict.json
    ```

    **Inspect the raw state**

    ```bash theme={null}
    archal sample show google-workspace.calendar-conflict.v1 --raw
    ```

    The packaged JSON artifact is `samples/states/google-workspace/calendar-conflict/state.json` and is 7,669 bytes. The CLI verifies SHA-256 `6c699424740097aa3712417e18a6154d70a5ec61ec956ea0ae2f375eecadb464` before printing it.

    Catalog validation: **Passed**. Hosted availability is determined by Archal's live certification and admission system, not this static page.
  </Accordion>

  <Accordion title="Google Workspace cross-product assistant">
    Start from a two-account workspace spanning Gmail, Calendar, Drive, Sheets, Contacts, and shared drives, then create and reset one Gmail label.

    **Sample ID:** `google-workspace.cross-product-assistant.v1`

    **Category:** `workflow`

    **Starting state:** 76 records across `accounts`: 2, `calendarAclRules`: 2, `calendarEvents`: 3, `calendars`: 2, `contactGroups`: 8, `contacts`: 3, `driveFiles`: 1, `drivePermissions`: 1, `gmailAttachments`: 1, `gmailDrafts`: 1, `gmailMessages`: 23, `gmailThreads`: 20, `googleAuthTokens`: 2, `sharedDrives`: 5, `spreadsheets`: 1, `spreadsheetSheets`: 1

    **Supported surface:** Stateful Gmail, Calendar, Drive, Sheets, Contacts, and selected account settings.

    **Required capabilities:** `state.read`, `state.load`, `state.reset`, `rest.gmail-labels`

    **First read:** `GET /gmail/v1/users/me/labels`. Expected result: HTTP 200.

    **Representative mutation:** `POST /gmail/v1/users/me/labels`. Expected result: HTTP 200, 201, 204.

    **Mutation input**

    ```json theme={null}
    {
      "labelListVisibility": "labelShow",
      "messageListVisibility": "show",
      "name": "Integration Escalations"
    }
    ```

    **Expected diff:** changes include `_googleWorkspaceGmailRuntime.labels`. Exact match required: no. Hosted promotion must observe every listed path after the provider-native mutation; dynamic provider ids and timestamps are excluded from exact matching.

    **Expected reset:** restores loaded sample.

    **Known limits**

    * Cross-product and permission semantics are bounded to published routes.

    **Start this sample**

    ```bash theme={null}
    archal sample show google-workspace.cross-product-assistant.v1 --raw > archal-google-workspace-cross-product-assistant.json
    archal state validate google-workspace archal-google-workspace-cross-product-assistant.json
    archal session create google-workspace \
      --state google-workspace=archal-google-workspace-cross-product-assistant.json
    ```

    **Inspect the raw state**

    ```bash theme={null}
    archal sample show google-workspace.cross-product-assistant.v1 --raw
    ```

    The packaged JSON artifact is `samples/states/google-workspace/cross-product-assistant/state.json` and is 36,021 bytes. The CLI verifies SHA-256 `43cc0be79d805f654a6c0f726d80e917d0e6b49883d0b46157e788ea6319fbb5` before printing it.

    Catalog validation: **Passed**. Hosted availability is determined by Archal's live certification and admission system, not this static page.
  </Accordion>
</AccordionGroup>

## Use custom state

Start from a sample when possible. For custom state, inspect the contract with `archal environment describe google-workspace`, then validate the file before creating a sandbox:

```bash theme={null}
archal state validate google-workspace state.json
```

Loading state replaces the current collections and establishes a new reset baseline. See [Starting state](/sandboxes/starting-state) before replacing state in an existing sandbox.
