> For the complete documentation index, see [llms.txt](https://helpdocumentation.gitbook.io/user/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocumentation.gitbook.io/user/bot-builder/whatsapp-chatbot/google-sheet-blocks/lookup-spreadsheet-rows.md).

# Lookup Spreadsheet Rows

This guide explains how to **search specific rows** in a Google Sheet based on conditions using the *Lookup Spreadsheet Rows* block.

#### Step 1: Add Lookup Rows Block

1. Go to **Automation → Add App**
2. Search for **Google Sheets**
3. Select **Lookup Spreadsheet Rows**

#### Step 2: Configure Settings

1. Select **authentication**
2. Choose the **spreadsheet**
3. Select the **sub-sheet**
4. Enter the **column** to search (e.g., B)
5. Select **condition** (e.g., Equals)
6. Enter the **search value** (e.g., phone number)

#### Step 3: Advanced Settings (Optional)

* Select **operator** (for multi-column conditions)
* Set **number of rows** to search
* Choose **sorting order** (Top/Bottom)

#### Step 4: Run & Save

* Click **Run & Save** to fetch matching data

#### Step 5: View Output

* Go to **Run History → Output → Response**
* Check retrieved data (e.g., complaint number, status)
* Use the fetched data in your flow (e.g., send status message)
* Save the workflow

{% embed url="<https://www.youtube.com/watch?v=fihizWuWSmI>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://helpdocumentation.gitbook.io/user/bot-builder/whatsapp-chatbot/google-sheet-blocks/lookup-spreadsheet-rows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
