Skip to main content
Rows

Add row

Add row

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


Options

Google Sheets connection

Select the 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.

Tab name or ID

Enter the tab name (e.g. Página1) or, using the number type, the numeric ID of the tab.

Column values

Add the header-and-value pairs to write to the new row. For each item, enter the Header (the exact column name, as it appears in the tab's first row) 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. The tab's first row is used as the column header. 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 (Number)
  • row — the row added, as an object matching each column name to its value (Any)

Rules and Conditions

  • The Google Sheets connection, Spreadsheet ID and Tab name or ID fields are required; at least one column (in "Header and value" mode) or the values code (in "Custom code" mode) must be given.
  • The tab's first row is always used as the header: the given values are matched to the column names in that row, in the order they appear.
  • If the tab is empty (with no header row at all), the robot stops with an error (tab with no header row).
  • The new row is always added at the end of the tab, right after the last row with content.
  • Header columns not given in Column values are left blank in the new row; values given for column names that do not exist in the header are ignored.
  • If the given tab (by name or ID) does not exist in the spreadsheet, the robot stops with an error.