Skip to content

Sheet Cells

Sheet Cells works with the rows of a Google Sheets tab as if it were a table: read all the rows, add a new row at the end, change a specific row or delete it. It takes the column names from the first row of the tab.

It is the simplest way to use a spreadsheet as a log: orders, contacts, incidents or any list the flow has to look up or add to. To create, duplicate or delete whole spreadsheets, use Spread Sheet.

When to use it

  • Every request that comes in through a form should be recorded as a new row.
  • An AI agent has to look up a price or product list kept in Google Sheets.
  • When an order is delivered, you want to change its row to mark it as delivered.
  • You want to remove the contacts who have unsubscribed from the list.

Configuration

You need a Google Sheets credential, which connects by signing in with your Google account. To add, change or delete rows, the credential needs the Create, Update, Delete, Read access; with Read Only you can only read. See Credentials.

FieldWhat it does
Credential (required)The Google Sheets credential of the account you work with.
OperationWhat the component does. See Operations. Default: Add Row.
Mode of InputHow you point to the spreadsheet: By Selection shows a picker to choose it from your Drive; By Id asks for its ID; By Url asks for its link. Default: By Selection.
Select Spreadsheet / Spreadsheet ID / Spreadsheet URLThe spreadsheet you work with, depending on Mode of Input. Required.
Select SheetThe tab you work with. The list loads when you choose the spreadsheet.
Row NumberOnly in Update Row and Delete Row. The row number in the spreadsheet, the one you see on the left in Google Sheets. Required. In Delete Row it cannot be 1, because that is the row with the column names.
TypeOnly in Add Row and Update Row. How the row values are given. Automatic shows one field per column, named as in the first row; From Data takes the values from the Values field; User Defined lets you type the values column by column. Default: Automatic.
(one field per column)With Type on Automatic. The value written in each column. Each field is named after its column.
ValuesWith Type on From Data. Connect the row data here. If you connect a list, Add Row adds one row per item.
Number of ColumnsWith Type on User Defined. How many columns you are going to fill in. The fields Column 1, Column 2… appear for you to type each value.

Operations

OperationWhat it does
Add RowAdds a new row after the last row with data.
Update RowReplaces the values of a specific row.
Delete RowDeletes a specific row.
Get RowsReturns all the rows in the tab.

Advanced options

FieldWhat it does
Declare HeadersOnly in Get Rows. Uses the first row as column names. If you turn it off, the columns are called Column 1, Column 2… and the first row is returned as just another row. Default: on.

Output

The component has two outputs:

  • Data: in Get Rows, one item per row, with one value per column and the row number in the spreadsheet (row_number). In Add Row, Update Row and Delete Row, the area of the spreadsheet that was written or deleted.
  • Json: only in Get Rows. The same rows as a single text, useful for passing them to an agent or to a component that expects text. Here the columns are always called Column 1, Column 2…

You can connect the rows to an AI agent so it looks them up, or use row_number in another Sheet Cells to change or delete that row. The component can also be connected to an Agent as a tool, so the agent reads or adds rows when it needs to. See Tool Mode.

Example

An estate agency records in a spreadsheet every viewing requested on its website.

  1. The Viewings spreadsheet has the columns Name, Phone, Property and Date in its first row.
  2. Add Sheet Cells with the Add Row operation, choose the spreadsheet in Select Spreadsheet and the tab in Select Sheet.
  3. With Type on Automatic, the fields Name, Phone, Property and Date appear: fill them in with the data coming from the form.
  4. Run the flow with a test request and check that the new row appears.

Good practices

  • The first row of the tab must hold the column names. Without it, Automatic shows no fields and Update Row and Delete Row cannot find the table.
  • With Type on From Data, the values are written in the order they arrive, from left to right, not according to the name of each value. Make sure they arrive in the same order as the columns.
  • If you add or change columns in the spreadsheet, choose the tab again in Select Sheet so the fields are updated.
  • Spread Sheet: create, duplicate and manage spreadsheets.
  • Forms: read the answers to a form to pass them to the spreadsheet.