Skip to content

Google Sheet Reader

Google Sheet Reader reads the data in a Google spreadsheet. It takes the first row of each tab as headers and returns the remaining rows as data, with the name of each column and its value, so an agent, a model or another component can work with them.

When to use it

  • Load the price list or product catalogue the sales team maintains.
  • Go through a customer list to send each customer a personalised email.
  • Give an agent access to an FAQ or stock table.

Configuration

The component needs a Google Sheets credential connected to the Google account where the spreadsheet is. See Credentials.

FieldWhat it does
Credential (required)The Google Sheets credential used to access the spreadsheet.
Select Google SheetThe spreadsheet you want to read.
or Select folderA folder with spreadsheets. If no spreadsheet is picked in Select Google Sheet, every spreadsheet in the folder is read, with all its tabs.
Sheet NameThe tabs of the spreadsheet you want to read. The list loads when you pick the spreadsheet; click the refresh button if they don’t appear. Only the ticked tabs are read; with none ticked, every tab is read.

Output

  • Data: if you pick one tab, it returns one item per row, with the name of each column and its value. If you pick several, none, or a folder, it returns one item per tab, with its name, the link to the spreadsheet and all its rows.
  • JSON Data: a JSON text with the rows of each tab, each one with its values separated by commas. Useful to pass the whole table to a model in one go.

The component can also be used as a tool by an agent.

Example

A training school keeps the list of students enrolled in each course in a Google spreadsheet:

  1. Add Google Sheet Reader, pick the credential and the enrolment spreadsheet.
  2. In Sheet Name, tick the tab of the course that is starting.
  3. Connect Data to a loop that goes through the students.
  4. Inside the loop, send each student a welcome email with their name.

Good practices

  • Put the headers in the first row of each tab: they are used as the field names.
  • Tick only the tabs you need so the reading is faster.
  • Spread Sheet: creates and changes Google spreadsheets.
  • Sheet Cells: reads and writes specific cells.
  • Loop: goes through the rows one by one.