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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update table

> Update a native Google Sheets table's name, range, or columns.

`updateTable` patches common structural properties of a native table.

## Example

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { updateTable } from "automate.ax/google-sheets"

export default automation("Rename an order table", () => {
  onHttpRequest({ scope: "automation" })

  updateTable({
    spreadsheet: "spreadsheet-id",
    table: "OrdersTable",
    name: "CurrentOrders",
  })
})
```

## Inputs

`spreadsheet` and existing table name or ID are required. Provide at least one
of new `name`, a complete replacement `columns` array using [Create table](/reference/integrations/google-sheets/actions/create-table#inputs), or structured `range` with `sheet` and optional one-based inclusive row/column bounds. `account` selects the Google account.

## Output

Returns refreshed `{ tableId, name, range, columns }`. Replacing columns is a
structural operation; align the column count with the target range and existing
data.
