Update row
Update row
Finds the first row where a column matches a given value and updates it.
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.
Find the row by
Choose how the row to update is found: by Column and value or by Row number. Default: Column and value.
When "Column and value"
Column to search in
The exact column name, as it appears in the tab's first row (header). The first row matching that column/value is updated.
Value to search for
Enter the value to compare against the column's content, for each row of the tab.
When "Row number"
Row number (1 = header row)
Enter the number of the row to update, counting row 1 as the tab's header (so the lowest valid data row number is 2).
New column values
Add the header-and-value pairs to write to the row found. For each item, enter the Header (the exact column name, as it appears in the tab's header) and the new Value. Use the "Add value" button to include more columns. Header columns you do not give keep their current value.
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.
New column values (code)
Visible only when the source is Custom code. Enter an object matching each column name to the new value — e.g., as code: { "Nome": nome.value, "Status": "Concluído" }. You can also reference the output of a previous action or a variable that already holds an object in that shape. Columns not given keep their current value.
Returns
Javascript code
actions["action-id"].rowNumber // number of the row updated (Number)
actions["action-id"].row // the row after the update, as an object (Any)
Field selection
- rowNumber — number of the row updated (Number)
- row — the row after the update, 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 New column values (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, both to find the row and to match the New column values.
- When finding by Column and value: both fields are required; if no row matches, the robot stops with an error; if more than one row matches, the run also stops with an error — in that case, use a column with unique values or find the row by its number.
- When finding by Row number: the lowest accepted value is 2 (row 1 is the header and cannot be updated this way); if the given row does not exist in the tab, the robot stops with an error.
- At least one of the names given in New column values must match exactly (including upper and lower case) a column existing in the tab's header; otherwise the robot stops with an error listing the columns available in the tab.
- Header columns not included in New column values keep their current value — they are not cleared.
- If the tab has no header row at all, or if the given tab (by name or ID) does not exist in the spreadsheet, the robot stops with an error.