Lookup Google Sheet row

Lookup rows in in a Google Sheet

by @pixiebrix

How to Use

This brick allows you to look up rows in an existing Google Sheet. To use this brick, you will need to configure a Google Sheets integration in PixieBrix.

Configuring the Sheet

After selecting a configured spreadsheet, a dropdown appears, allowing you to select one of the existing tabs. Click the desired tab.
configuring lookup google sheet modal
After clicking the tab, the Column Header field populates with the column headers from the selected tab.
dropdown with headers from selected sheet
Select the Column to search for a value, then set the Query field to something that should be searched.

Defining the Search

Query is another word for "Search", so the query field is where you type what you want to search and return in the specific spreadsheet. For example, if you want to get information about a user by referencing their entire row in a Google sheet, you might want to search for their name in the Full Name field.

You'll often want to reference a value as a variable (@) defined in another brick. For instance, if you want to search for information about a person at your company, you might reference the highlighted text when you triggered this mod. (Can be referenced as @input.selectionText). Or if you asked a question in a form in a previous brick, you can reference the answer to that as @form.{fieldName} and search for that row in the Google Sheet.

Sometimes, you may want to hardcode a constant value for every time the mod is triggered. For example, if you want to always reference a specific row type, like text templates, you might always want the cell value to be Templates when triggering the mod. You can use the Text type to define some text that never changes and isn't dynamically configured from another brick.
multi match toggle selected
Lastly, you can configure if you want to return the first row that returns, or all the row that returns. By default it is true, meaning it will return all the matches in an array that you can access. Click the toggle to turn it off and only return the first result.

Use Case

  • Fetch templates or information from a Google Sheet
  • Search for data about a user or job from a Google Sheet

Mods Using This Brick


Name Required Type Description
multi boolean True to return all matches, false to return the first match
query string, number, boolean The value to lookup
header string The header of the column to lookup the value
tabName string The tab name of the spreadsheet to lookup the value.
filterRows boolean True to show the row filter controls.
googleAccount multiple
spreadsheetId multiple


Name Required Type Description
No outputs for this brick defined.

Related Tags