> ## 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: Export Dataset

> Export a finished Play's results to a new Google Sheet or a new tab in an existing spreadsheet. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Export a finished Play's results to a new Google Sheet or a new tab in an existing spreadsheet.

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

## 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_export_dataset',
  {
    "dataset": {
      "run_id": "run_123"
    },
    "destination": {
      "tab_name": "Example"
    },
    "operation_key": "examplex"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute google_workspace_export_dataset --input '{
  "dataset": {
    "run_id": "run_123"
  },
  "destination": {
    "tab_name": "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"]}}
{
  "shared_drive_id": "shared_drive_123",
  "shared_drive_name": "Example",
  "shared_drive_url": "https://example.com",
  "folder_id": "folder_123",
  "folder_name": "Example",
  "folder_url": "https://example.com",
  "spreadsheet_id": "spreadsheet_123",
  "spreadsheet_url": "https://example.com",
  "tab_id": 123,
  "tab_name": "Example",
  "row_count": 123,
  "column_count": 123,
  "created_spreadsheet": true,
  "operation_key": "example"
}
```

Use `deepline describe google_workspace_export_dataset --json` for the latest machine-readable contract.

## Input reference

Export a completed Play Dataset Handle to a Google Sheet. The tool owns dataset resolution, workspace containment, tab creation, and conflict safety. presentation can retain the compatibility review preset or apply policy-bounded native Sheets formatting requests. New result tabs are inserted at the left and include the run ID. summary\_tab refreshes a stable summary with the latest dataset metadata and source-column fill rates. Omit spreadsheet\_id to create a spreadsheet, or supply it to add a new tab to the same spreadsheet.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.dataset` | `object` | Yes | — | — |
| `payload.destination` | `object` | Yes | — | — |
| `payload.presentation` | `object` | No | — | — |
| `payload.operation_key` | `string` | Yes | — | Stable caller-supplied idempotency key for this export attempt. 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": "Export a completed Play Dataset Handle to a Google Sheet. The tool owns dataset resolution, workspace containment, tab creation, and conflict safety. presentation can retain the compatibility review preset or apply policy-bounded native Sheets formatting requests. New result tabs are inserted at the left and include the run ID. summary_tab refreshes a stable summary with the latest dataset metadata and source-column fill rates. Omit spreadsheet_id to create a spreadsheet, or supply it to add a new tab to the same spreadsheet.",
    "properties": {
      "dataset": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          },
          "dataset_id": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          }
        },
        "required": [
          "run_id"
        ],
        "additionalProperties": false
      },
      "destination": {
        "type": "object",
        "properties": {
          "spreadsheet_id": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          },
          "spreadsheet_title": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S"
          },
          "tab_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "mode": {
            "type": "string",
            "const": "new_tab"
          }
        },
        "required": [
          "tab_name"
        ],
        "additionalProperties": false
      },
      "presentation": {
        "type": "object",
        "properties": {
          "preset": {
            "type": "string",
            "description": "Use \"review\" for the compatibility presentation defaults or \"none\" when the caller supplies presentation requests.",
            "enum": [
              "review",
              "none"
            ]
          },
          "include_notes_column": {
            "type": "boolean",
            "description": "Append an empty notes column. Defaults to true for the review preset and false for none."
          },
          "auto_fit_columns": {
            "type": "boolean"
          },
          "freeze_header": {
            "type": "boolean"
          },
          "add_filter": {
            "type": "boolean",
            "description": "Add a basic filter to the exported range. Defaults to false."
          },
          "wrap_header": {
            "type": "boolean"
          },
          "summary_tab": {
            "type": "boolean"
          },
          "summary_tab_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "requests": {
            "type": "array",
            "description": "Policy-bounded Google Sheets batchUpdate presentation requests, applied after built-in presentation and auto-fit. Supported operations: repeatCell for userEnteredFormat only, updateSheetProperties for frozen row/column counts, autoResizeDimensions, updateDimensionProperties for pixelSize/hiddenByUser, setBasicFilter, and clearBasicFilter. Sheet IDs must be $results_sheet_id or $summary_sheet_id. Ranges can use $result_row_count, $result_column_count, $notes_column_index, $summary_row_count, and $summary_column_count. Requests cannot write cell values, add/delete tabs, or change Drive permissions.",
            "maxItems": 50,
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          }
        },
        "additionalProperties": false
      },
      "operation_key": {
        "type": "string",
        "description": "Stable caller-supplied idempotency key for this export attempt.",
        "minLength": 8,
        "pattern": "\\S"
      }
    },
    "required": [
      "dataset",
      "destination",
      "operation_key"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.shared_drive_id` | `string` | Yes | — | — |
| `result.shared_drive_name` | `string` | Yes | — | — |
| `result.shared_drive_url` | `string` | Yes | — | — |
| `result.folder_id` | `string` | Yes | — | — |
| `result.folder_name` | `string` | Yes | — | — |
| `result.folder_url` | `string` | Yes | — | — |
| `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.created_spreadsheet` | `boolean` | Yes | — | — |
| `result.operation_key` | `string` | Yes | — | — |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "shared_drive_id": {
        "type": "string"
      },
      "shared_drive_name": {
        "type": "string"
      },
      "shared_drive_url": {
        "type": "string"
      },
      "folder_id": {
        "type": "string"
      },
      "folder_name": {
        "type": [
          "string",
          "null"
        ]
      },
      "folder_url": {
        "type": "string"
      },
      "spreadsheet_id": {
        "type": "string"
      },
      "spreadsheet_url": {
        "type": "string"
      },
      "tab_id": {
        "type": "integer"
      },
      "tab_name": {
        "type": "string"
      },
      "row_count": {
        "type": "integer"
      },
      "column_count": {
        "type": "integer"
      },
      "created_spreadsheet": {
        "type": "boolean"
      },
      "operation_key": {
        "type": "string"
      }
    },
    "required": [
      "shared_drive_id",
      "shared_drive_name",
      "shared_drive_url",
      "folder_id",
      "folder_name",
      "folder_url",
      "spreadsheet_id",
      "spreadsheet_url",
      "tab_id",
      "tab_name",
      "row_count",
      "column_count",
      "created_spreadsheet",
      "operation_key"
    ],
    "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.