RPATables
Get table
Get table
Gets every row of a table, each one as an object relating the column name to its value.
Options
Google Sheets connection
Select the Google Sheets Connection action configured in the flow.
Spreadsheet ID
Enter the spreadsheet ID. It can be found in the spreadsheet URL: docs.google.com/spreadsheets/d/{spreadsheetId}/edit.
Table name
Enter the table name, for example Clientes. Use List tables to find the existing names.
Returns
Javascript code
js
actions["action-id"].rows // the table's data rows, each one as an object (List)
actions["action-id"].headers // column names (List)
actions["action-id"].rowCount // number of data rows (Number)
actions["action-id"].firstRowNumber // number, in the sheet, of the first data row (Number)
actions["action-id"].sheet // name of the table's sheet (Text)
Field selection
- rows — List with the table's data rows (without the header). Each item is an object relating the column name to its value, for example
{ "Nome": "Maria", "Total": "150" }. - headers — List with the table's column names.
- rowCount — Number of data rows obtained.
- firstRowNumber — Number, in the sheet, of the first data row (right below the header). The item at position
Nof rows (starting at 0) is on rowfirstRowNumber + Nof the sheet — useful to then use Update row or Delete row. - sheet — Name of the sheet where the table is.
Rules and Conditions
- The Google Sheets connection, Spreadsheet ID and Table name fields are required.
- The table must exist in the spreadsheet; otherwise the robot stops with a table-not-found error.
- A table with only the header returns rows as an empty list and rowCount as 0.
- Empty cells return empty text (
""). Values come as they are formatted in Google Sheets.