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

# Append rows

> Append exact header-keyed records to a Google sheet or native table.

`appendRows` orders each record by the source's exact headers and appends it to
the body.

## Example

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

export default automation("Append new orders", () => {
  onHttpRequest({ scope: "automation" })

  appendRows({
    spreadsheet: "spreadsheet-id",
    source: { table: "OrdersTable" },
    rows: [
      { "Order ID": "A-1042", Status: "Open", Total: 125 },
      { "Order ID": "A-1043", Status: "Open", Total: 80 },
    ],
  })
})
```

## Inputs

`spreadsheet`, `source`, and one record or non-empty records array are required.
Source syntax is described by [List rows](/reference/integrations/google-sheets/actions/list-rows#inputs).
Values are string, number, boolean, or null. Record keys must exactly match
headers; omitted columns become null. `inputMode` defaults to `userEntered`,
which parses formula strings; `raw` stores them literally.

`account` optionally selects the Google account binding.

## Output

Returns `{ affectedCells, rowNumbers, updatedRange? }`. `rowNumbers` is empty
because Google append APIs do not reliably return row identities. Ordinary
sheets can return `updatedRange`; native-table appends do not.
