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

# Google Workspace: Actions/write Table

> Writing ordered table rows to a new workspace-owned Sheet tab during a running Play, with atomic safe retries. Includes SDK V2 examples, schemas, and cost.

Writing ordered table rows to a new workspace-owned Sheet tab during a running Play, with atomic safe retries.

<Info>
  Tool ID: `google_workspace_write_table`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'google_workspace_write_table',
  {
    "spreadsheet_id": "spreadsheet_123",
    "tab_name": "Example",
    "columns": [
      "example"
    ],
    "rows": [
      [
        "example"
      ]
    ],
    "operation_key": "examplex"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute google_workspace_write_table --input '{
  "spreadsheet_id": "spreadsheet_123",
  "tab_name": "Example",
  "columns": [
    "example"
  ],
  "rows": [
    [
      "example"
    ]
  ],
  "operation_key": "examplex"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "spreadsheet_id": "spreadsheet_123",
  "spreadsheet_url": "https://example.com",
  "tab_id": 123,
  "tab_name": "Example",
  "row_count": 123,
  "column_count": 123,
  "operation_key": "example",
  "replayed": true
}
```

Use `deepline tools get google_workspace_write_table --json` for the latest machine-readable contract.

## Input reference

Write ordered columns and rows to a new tab in an existing workspace-owned spreadsheet, including during a running Play. Up to 10,000 data rows, 200 columns, 250,000 cells including headers, and an 8 MiB Google request. Strings are literal. Tab creation, values, and retry receipt commit atomically. Reuse an operation key only for the identical table; retries never overwrite collaborator edits.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.spreadsheet_id` | `string` | Yes | — | Minimum length: 1. Pattern: `\S`. |
| `payload.tab_name` | `string` | Yes | — | Minimum length: 1. Maximum length: 100. Pattern: `\S`. |
| `payload.columns` | `array` | Yes | — | Minimum items: 1. Maximum items: 200. Items must be unique. |
| `payload.rows` | `array` | Yes | — | Maximum items: 10000. |
| `payload.operation_key` | `string` | Yes | — | Minimum length: 8. Pattern: `\S`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Write ordered columns and rows to a new tab in an existing workspace-owned spreadsheet, including during a running Play. Up to 10,000 data rows, 200 columns, 250,000 cells including headers, and an 8 MiB Google request. Strings are literal. Tab creation, values, and retry receipt commit atomically. Reuse an operation key only for the identical table; retries never overwrite collaborator edits.",
    "properties": {
      "spreadsheet_id": {
        "type": "string",
        "minLength": 1,
        "pattern": "\\S"
      },
      "tab_name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "\\S"
      },
      "columns": {
        "type": "array",
        "minItems": 1,
        "maxItems": 200,
        "uniqueItems": true,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50000,
          "pattern": "\\S"
        }
      },
      "rows": {
        "type": "array",
        "maxItems": 10000,
        "items": {
          "type": "array",
          "maxItems": 200,
          "items": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50000
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "operation_key": {
        "type": "string",
        "minLength": 8,
        "pattern": "\\S"
      }
    },
    "required": [
      "spreadsheet_id",
      "tab_name",
      "columns",
      "rows",
      "operation_key"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.spreadsheet_id` | `string` | Yes | — | — |
| `result.spreadsheet_url` | `string` | Yes | — | — |
| `result.tab_id` | `integer` | Yes | — | — |
| `result.tab_name` | `string` | Yes | — | — |
| `result.row_count` | `integer` | Yes | — | — |
| `result.column_count` | `integer` | Yes | — | — |
| `result.operation_key` | `string` | Yes | — | — |
| `result.replayed` | `boolean` | Yes | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "spreadsheet_id": {
        "type": "string"
      },
      "spreadsheet_url": {
        "type": "string"
      },
      "tab_id": {
        "type": "integer"
      },
      "tab_name": {
        "type": "string"
      },
      "row_count": {
        "type": "integer"
      },
      "column_count": {
        "type": "integer"
      },
      "operation_key": {
        "type": "string"
      },
      "replayed": {
        "type": "boolean"
      }
    },
    "required": [
      "spreadsheet_id",
      "spreadsheet_url",
      "tab_id",
      "tab_name",
      "row_count",
      "column_count",
      "operation_key",
      "replayed"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
