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

# Google Sheets

> Google Sheets is a cloud-based spreadsheet tool enabling real-time collaboration, data analysis, and integration with other Google Workspace apps

Google Sheets is a cloud-based spreadsheet tool enabling real-time collaboration, data analysis, and integration with other Google Workspace apps

`googlesheets` · **53 tools** · **16 triggers**

## Connect it

```bash
run auth googlesheets
run auth googlesheets --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections.md) for personal versus shared, and who may remove one.

## Use it

```bash
run googlesheets          # common commands
run googlesheets --all    # every command
```

```ts
import { googlesheets } from "@boxd/run";
```

## Common tools

| Tool | What it does |
| - | - |
| `add-sheet` | Adds a new sheet to a spreadsheet. Supports three sheet types: GRID, OBJECT, and DATA\_SOURCE. |
| `append-dimension` | Tool to append new rows or columns to a sheet, increasing its size. |
| `batch-clear-values-by-data-filter` | Clears one or more ranges of values from a spreadsheet using data filters. |
| `batch-get` | Retrieves data from specified cell ranges in a Google Spreadsheet. |
| `batch-update` | DEPRECATED: Use GOOGLESHEETS\_VALUES\_UPDATE instead. Write values to ONE range in a Google Sheet, or append as new rows if no start cell is given. |
| `clear-basic-filter` | Tool to clear the basic filter from a sheet. Use when you need to remove an existing basic filter from a specific sheet within a Google Spreadsheet. |
| `create-google-sheet1` | Creates a new Google Spreadsheet in Google Drive. If a title is provided, the spreadsheet will be created with that name. |
| `delete-dimension` | Tool to delete specified rows or columns from a sheet in a Google Spreadsheet. |
| `delete-sheet` | Tool to delete a sheet (worksheet) from a spreadsheet. Use when you need to remove a specific sheet from a Google Sheet document. |
| `find-replace` | Tool to find and replace text in a Google Spreadsheet. Use when you need to fix formula errors, update values, or perform bulk text replacements across cells. |
| `get-batch-values` | DEPRECATED: Use GOOGLESHEETS\_BATCH\_GET instead. Tool to return one or more ranges of values from a spreadsheet. |
| `get-sheet-names` | Lists all worksheet names from a specified Google Spreadsheet (which must exist), useful for discovering sheets before further operations. |
| `get-spreadsheet-by-data-filter` | Returns the spreadsheet at the given ID, filtered by the specified data filters. |
| `get-spreadsheet-info` | Retrieves metadata for a Google Spreadsheet using its ID. By default, returns essential information (ID, title, sheet properties) to avoid payload size issues. |
| `insert-dimension` | Tool to insert new rows or columns into a sheet at a specified location. |
| `list-charts` | Lists all charts in a Google Sheets spreadsheet across all sheets, returning chart\_id, sheet metadata, chart type, title, and position. |
| `move-chart` | Move or resize an existing chart on a Google Sheets spreadsheet. |
| `mutate-conditional-format-rules` | Add, update, delete, or reorder conditional format rules on a Google Sheet. |
| `search-developer-metadata` | Tool to search for developer metadata in a spreadsheet. Use when you need to find specific metadata entries based on filters. |
| `search-spreadsheets` | Search for Google Spreadsheets using various filters including name, content, date ranges, and more. |
| `set-basic-filter` | Tool to set a basic filter on a sheet in a Google Spreadsheet. |
| `set-data-validation-rule` | Tool to set or clear data validation rules (including dropdowns) on a range in Google Sheets. |
| `sort-range` | Sorts data within a specified range in a Google Sheet based on one or more sort criteria. |
| `spreadsheets-sheets-copy-to` | Tool to copy a single sheet from a spreadsheet to another spreadsheet. |
| `spreadsheets-values-append` | Tool to append values to a spreadsheet. Use when you need to add new data to the end of an existing table in a Google Sheet. |

> [accordion] All 53 tools
>
> | Tool | What it does |
> | - | - |
> | `add-sheet` | Adds a new sheet to a spreadsheet. Supports three sheet types: GRID, OBJECT, and DATA\_SOURCE. |
> | `aggregate-column-data` | Searches for rows where a specific column matches a value and performs mathematical operations on data from another column. |
> | `append-dimension` | Tool to append new rows or columns to a sheet, increasing its size. |
> | `auto-resize-dimensions` | Auto-fit column widths or row heights for a dimension range using batchUpdate.autoResizeDimensions. |
> | `batch-clear-values-by-data-filter` | Clears one or more ranges of values from a spreadsheet using data filters. |
> | `batch-get` | Retrieves data from specified cell ranges in a Google Spreadsheet. |
> | `batch-update` | DEPRECATED: Use GOOGLESHEETS\_VALUES\_UPDATE instead. Write values to ONE range in a Google Sheet, or append as new rows if no start cell is given. |
> | `batch-update-values-by-data-filter` | Tool to update values in ranges matching data filters. Use when you need to update specific data in a Google Sheet based on criteria rather than fixed cell ranges. |
> | `clear-basic-filter` | Tool to clear the basic filter from a sheet. Use when you need to remove an existing basic filter from a specific sheet within a Google Spreadsheet. |
> | `clear-values` | Clears cell content (preserving formatting and notes) from a specified A1 notation range in a Google Spreadsheet; the range must correspond to an... |
> | `create-chart` | Create a chart in a Google Sheets spreadsheet using the specified data range and chart type. |
> | `create-google-sheet1` | Creates a new Google Spreadsheet in Google Drive. If a title is provided, the spreadsheet will be created with that name. |
> | `create-spreadsheet-column` | Creates a new column in a Google Spreadsheet. Specify the target sheet using sheet\_id (numeric) or sheet\_name (text). |
> | `create-spreadsheet-row` | Inserts a new, empty row into a specified sheet of a Google Spreadsheet at a given index, optionally inheriting formatting from the row above. |
> | `delete-chart` | Delete an existing chart from a Google Sheets spreadsheet. Use this action when you need to remove a chart that is no longer needed or needs to be replaced. |
> | `delete-dimension` | Tool to delete specified rows or columns from a sheet in a Google Spreadsheet. |
> | `delete-sheet` | Tool to delete a sheet (worksheet) from a spreadsheet. Use when you need to remove a specific sheet from a Google Sheet document. |
> | `execute-sql` | DEPRECATED: Use direct Google Sheets actions instead: - GOOGLESHEETS\_VALUES\_GET / GOOGLESHEETS\_BATCH\_GET for reads - GOOGLESHEETS\_VALUES\_UPDATE /... |
> | `find-replace` | Tool to find and replace text in a Google Spreadsheet. Use when you need to fix formula errors, update values, or perform bulk text replacements across cells. |
> | `find-worksheet-by-title` | DEPRECATED: Use GetSpreadsheetInfo instead. Finds a worksheet by its exact, case-sensitive title within a Google Spreadsheet; returns a boolean... |
> | `format-cell` | Applies text and background cell formatting to a specified range in a Google Sheets worksheet. |
> | `get-batch-values` | DEPRECATED: Use GOOGLESHEETS\_BATCH\_GET instead. Tool to return one or more ranges of values from a spreadsheet. |
> | `get-conditional-format-rules` | List conditional formatting rules for each sheet (or a selected sheet) in a normalized, easy-to-edit form. |
> | `get-data-validation-rules` | Tool to extract data validation rules from a Google Sheets spreadsheet. |
> | `get-sheet-names` | Lists all worksheet names from a specified Google Spreadsheet (which must exist), useful for discovering sheets before further operations. |
> | `get-spreadsheet-by-data-filter` | Returns the spreadsheet at the given ID, filtered by the specified data filters. |
> | `get-spreadsheet-info` | Retrieves metadata for a Google Spreadsheet using its ID. By default, returns essential information (ID, title, sheet properties) to avoid payload size issues. |
> | `get-table-schema` | DEPRECATED: Use GOOGLESHEETS\_GET\_SHEET\_NAMES and GOOGLESHEETS\_GET\_SPREADSHEET\_INFO for sheet structure metadata, and GOOGLESHEETS\_VALUES\_GET for direct range inspection. |
> | `insert-dimension` | Tool to insert new rows or columns into a sheet at a specified location. |
> | `list-charts` | Lists all charts in a Google Sheets spreadsheet across all sheets, returning chart\_id, sheet metadata, chart type, title, and position. |
> | `list-tables` | DEPRECATED: Use GOOGLESHEETS\_GET\_SHEET\_NAMES for tab discovery and GOOGLESHEETS\_GET\_SPREADSHEET\_INFO for full sheet metadata. |
> | `lookup-spreadsheet-row` | Finds the first row in a Google Spreadsheet where a cell's entire content exactly matches the query string, searching within a specified A1 notation... |
> | `move-chart` | Move or resize an existing chart on a Google Sheets spreadsheet. |
> | `mutate-conditional-format-rules` | Add, update, delete, or reorder conditional format rules on a Google Sheet. |
> | `query-table` | DEPRECATED: Use GOOGLESHEETS\_VALUES\_GET / GOOGLESHEETS\_BATCH\_GET for table reads and GOOGLESHEETS\_LOOKUP\_SPREADSHEET\_ROW for row lookup/filter workflows. |
> | `search-developer-metadata` | Tool to search for developer metadata in a spreadsheet. Use when you need to find specific metadata entries based on filters. |
> | `search-spreadsheets` | Search for Google Spreadsheets using various filters including name, content, date ranges, and more. |
> | `set-basic-filter` | Tool to set a basic filter on a sheet in a Google Spreadsheet. |
> | `set-data-validation-rule` | Tool to set or clear data validation rules (including dropdowns) on a range in Google Sheets. |
> | `sheet-from-json` | DEPRECATED: Use GOOGLESHEETS\_CREATE\_GOOGLE\_SHEET1 + GOOGLESHEETS\_UPDATE\_VALUES\_BATCH (or GOOGLESHEETS\_VALUES\_UPDATE / GOOGLESHEETS\_SPREADSHEETS\_VALUES\_APPEND) instead. |
> | `sort-range` | Sorts data within a specified range in a Google Sheet based on one or more sort criteria. |
> | `spreadsheets-sheets-copy-to` | Tool to copy a single sheet from a spreadsheet to another spreadsheet. |
> | `spreadsheets-values-append` | Tool to append values to a spreadsheet. Use when you need to add new data to the end of an existing table in a Google Sheet. |
> | `spreadsheets-values-batch-clear` | Tool to clear one or more ranges of values from a spreadsheet. |
> | `spreadsheets-values-batch-get-by-data-filter` | Tool to return one or more ranges of values from a spreadsheet that match the specified data filters. |
> | `update-chart` | Update the specification of an existing chart in a Google Sheets spreadsheet. |
> | `update-dimension-properties` | Tool to hide/unhide rows or columns and set row heights or column widths. |
> | `update-sheet-properties` | Tool to update properties of a sheet (worksheet) within a Google Spreadsheet, such as its title, index, visibility, tab color, or grid properties. |
> | `update-spreadsheet-properties` | Tool to update SPREADSHEET-LEVEL properties such as the spreadsheet's title, locale, time zone, or auto-recalculation settings. |
> | `update-values-batch` | Tool to set values in one or more ranges of a spreadsheet. Use when you need to update multiple ranges in a single operation for better performance. |
> | `upsert-rows` | Upsert rows - update existing rows by key, append new ones. Automatically handles column mapping and partial updates. |
> | `values-get` | Returns a range of values from a spreadsheet. Use when you need to read data from specific cells or ranges in a Google Sheet. |
> | `values-update` | Tool to set values in a range of a Google Spreadsheet. Use when you need to update or overwrite existing cell values in a specific range. |

## Triggers (16)

Subscribe with `.on(...)` in a script. A trigger with required configuration takes it as the second argument.

| Trigger | Needs | What fires it |
| - | - | - |
| Aggregate Metric Changed | `spreadsheet_id`, `sheet_name`, `target_column`, `operation` | Triggers when an aggregate metric (SUM/COUNT/AVG/MIN/MAX) changes in a Google Sheets spreadsheet. |
| Cell Range Values Changed | `spreadsheet_id`, `range` | Triggers when values in a specified A1 range change in Google Sheets. |
| Conditional Format Rule Changed | `spreadsheet_id` | Triggers when conditional formatting rules change in a Google Spreadsheet. |
| Data Validation Rule Changed | `spreadsheet_id` | Triggers when data validation rules change (added/updated/removed) in a Google Spreadsheet. |
| Developer Metadata Changed | `spreadsheet_id` | Triggers when developer metadata entries change (new/updated/removed) in a Google Spreadsheet. |
| Filtered Range Values Changed | `spreadsheet_id`, `data_filters` | Polling trigger that monitors Google Sheets filtered ranges for value changes. |
| New Rows in Google Sheet | `spreadsheet_id` | Simple polling trigger that monitors Google Sheets for new rows. |
| New Sheet Added in Google Spreadsheet | `spreadsheet_id` | Polling trigger that detects when a new sheet is added to a Google Spreadsheet. |
| New Spreadsheet Created | nothing | Triggers when a new Google Spreadsheet is created. |
| Spreadsheet Metadata Changed | `spreadsheet_id` | Polling trigger that detects when a Google Spreadsheet's metadata changes. |
| Spreadsheet Properties Changed | `spreadsheet_id` | Polling trigger that detects when a Google Spreadsheet's top-level properties change. |
| Spreadsheet Row Changed | `spreadsheet_id`, `query` | Triggers when a looked-up spreadsheet row changes. |
| Spreadsheet Search Match | nothing | Triggers when a new spreadsheet appears that matches a saved search. |
| Table Query Result Changed | `spreadsheet_id`, `sql` | Triggers when the result set of a saved table query changes in Google Sheets. |
| Table Schema Changed | `spreadsheet_id`, `table_name` | Polling trigger that detects when a table's schema changes in Google Sheets. |
| Worksheet Names Changed | `spreadsheet_id` | Triggers when the set of worksheet/tab names changes in a Google Spreadsheet. |

[Open Google Sheets in the console →](https://app.boxd.sh/integrations/detail/googlesheets)
