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

> Write rows and columns to a new tab in an existing Google Sheet, including from a running Play. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Write rows and columns to a new tab in an existing Google Sheet, including from a running Play.

> [!NOTE]
>
> Tool ID: `google_workspace_write_table`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
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 returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "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 describe 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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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