Skip to main content
Rows

Add row

Add row

Adds a new row at the end of a table, matching the values to the column headers.


Options

Google Sheets connection

Select the Google Sheets Connection action set up in the flow.

Spreadsheet ID

Enter the ID of the spreadsheet. The ID can be found in the spreadsheet URL: docs.google.com/spreadsheets/d/{spreadsheetId}/edit.

Table name

Enter the name of the table (named range), for example Clientes.

Column values

Add the header-and-value pairs to write to the new row. For each item, enter the Header (the column name, exactly as it appears in the table header) and the Value to write. Use the "Add value" button to include more columns. Header columns you do not give are left blank in the new row.

Advanced options

Source of the column values

Choose between Header and value (a list of pairs built in the form) or Custom code (replaces the list with a code field). Default: Header and value.

Column values (code)

Visible only when the source is Custom code. Enter an object matching each column name to the desired value — e.g., as code: { "Nome": nome.value, "Email": email.value }. You can also reference the output of a previous action or a variable that already holds an object in that shape.

Returns

Javascript code

js
actions["action-id"].rowNumber // number of the newly added row (Number)
actions["action-id"].row // the row added, as an object (Any)

Field selection

  • rowNumber — Number of the newly added row.
  • row — The row added, as an object matching each column name to its value.

Rules and Conditions

  • The Google Sheets connection, Spreadsheet ID and Table name fields are required.
  • At least one column (in "Header and value" mode) or the values code (in "Custom code" mode) must be given.
  • The given table must exist in the spreadsheet; otherwise the robot stops with a table-not-found error.
  • The table must have a bounded row range (with a defined end) and a header row; otherwise the run stops with an error.
  • The row is added right after the end of the table's current range, and the values are matched to the column headers in the order they appear in the table.
  • After the insertion, the table range is resized automatically to include the new row.