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

# Read values

> Read one or more Google Sheets ranges as row- or column-major matrices.

`readValues` reads raw A1 or named ranges in one request. Use row actions when
you want records keyed by headers instead of positional matrices.

## Example

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

export default automation("Read order data", () => {
  onHttpRequest({ scope: "automation" })

  readValues({
    spreadsheet: "spreadsheet-id",
    ranges: ["Orders!A1:D100", "Summary!B2"],
    valueRender: "unformatted",
  })
})
```

## Inputs

`spreadsheet` and one range or non-empty `ranges` array are required.
`majorDimension` is `rows` (default) or `columns`. `valueRender` is
`unformatted` (default), `formatted`, or `formula`. `dateTimeRender` is
`serialNumber` (default) or `formattedString` when values are not formatted.
`account` selects the Google account.

## Output

Returns one `{ range, majorDimension, values }` per requested range. `values`
is `(string | number | boolean | null)[][]`; the outer dimension matches
`majorDimension`. Google omits trailing empty cells and rows, so matrices can be
ragged and shorter than the requested range.
