Skip to content

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.

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.
ParameterTypeDefaultDescription
valuesDataTable | DataRow—The rows to append (values only, no headers).
ParameterTypeDefaultDescription
sessionZoanGoogleSheetsSession—Session from Google Sheets — Open. Inside Open’s body it is inherited and you can leave it empty.
sheetstring—Sheet to append to. If empty, the first sheet is used.
rangestringA:ZRange where Google looks for the table and its last row.

This activity does not return a value. The log shows how many rows were appended.

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

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: entry
Google Sheets — Append rows session = book sheet = "Log" values = entry