Google Sheets — Append rows
Google Sheets — Append rows
Section titled “Google Sheets — Append rows”Type: googlesheets-append · Package: Google Sheets Activities v1.0.5 · Output: —
Appends rows after the existing data, without overwriting. Ideal to accumulate records in a shared sheet over time: a log, growing results, orders that arrive every day. No need to work out which row to write to.
How it works
Section titled “How it works”Google locates the data table inside range (default A:Z of the sheet sheet, or of the first sheet) and writes values right below its last row, in a single call:
- Accepts a DataTable (all its rows) or a DataRow (a single row). Only the values are written, without the column names.
- Rows are inserted: if there is content below the table, it moves down instead of being overwritten.
- Values are interpreted as USER_ENTERED (formulas, numbers and dates as if you typed them).
- Every run appends new rows: if you repeat the activity with the same data, you get duplicates.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
values | DataTable | DataRow | — | The rows to append (values only, no headers). |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanGoogleSheetsSession | — | Session from Google Sheets — Open. Inside Open’s body it is inherited and you can leave it empty. |
sheet | string | — | Sheet to append to. If empty, the first sheet is used. |
range | string | A:Z | Range where Google looks for the table and its last row. |
Output
Section titled “Output”This activity does not return a value. The log shows how many rows were appended.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'values' is required. | values is empty or its expression returned null. |
'values' must be a DataTable (or a single DataRow). | A list, text or another type was passed. Build the row with Build DataTable or Add Data Row. |
No Google Sheets session available. Provide 'session' from a googlesheets-open activity, or place this activity inside the Open activity's body … | The activity is outside Open’s body and received no session. Move it inside the body or pass the saved session. |
The service sheets has thrown an exception. HttpStatusCode is … | Google rejected the call: missing sheet or range, no access, expired token or quota exceeded. See Google API errors. |
Example
Section titled “Example”Record the result of each run in a log:
Build DataTable columns = arr("Date", "Process", "Status") rows = arr(arr(now().ToString("yyyy-MM-dd HH:mm"), process, "OK")) → output: entryGoogle Sheets — Append rows session = book sheet = "Log" values = entryRelated activities
Section titled “Related activities”- Write sheet — write from A1 (overwrites).
- Write range — write at a fixed position.