Skip to content
Docs

Google Sheets steps: add, find and update a row

Add a row to a Google Sheet, find the first row where a column equals a value, and update a row by number. Setup, matching by column name, outputs and limits.

Updated

Four steps work with a Google Sheet: Add row appends a row, Find row looks one up by a column, Find rows lists every row that matches, and Update row changes a row by its number.

How to set it up

  1. Add the step and connect a Google account. Foliot only sees the spreadsheets you pick.
  2. Choose the spreadsheet and tab. The tab's first row must hold the column names.
  3. Fill in the step's fields (below), inserting data with + Data.
  4. Test this step runs it for real on your sheet.

Add row to Google Sheets

  • One field per column, matched by the column's name.
  • The row is added at the bottom. Values that look like formulas are stored as text.

Find row in Google Sheets

  • Finds the first row where a column equals a value, with the same “is” rule as Filter: case and surrounding spaces are ignored, numbers compare as numbers.
  • Output: found: true, rowNumber and one value per column, or found: false. Not finding a row isn't a failure.
  • Find rows has the same settings but gives every matching row (the first 100) as a list, rows, plus count; leave the value empty for every row. Loop over it with For each, or send it in one digest email. No match gives an empty list, not a failure.

Update row in Google Sheets

  • Needs a row number, usually the rowNumber from Find row, and one field per column. Empty fields keep the cell as it is.

A common pattern: Find row, then a Branch on found with Update row on the Yes path and Add row on the No path.

Limits

  • Adding a row is retried only when the request certainly didn't reach Google. After a timeout or a Google server error the run fails and asks you to check the sheet, then re-run, so you never get a duplicate row.
  • Add row on a tab watched by the New row trigger starts that workflow again. The editor warns you.
  • The rows live in your Google account, not in Foliot.