> For the complete documentation index, see [llms.txt](https://software-help-docs.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://software-help-docs.gitbook.io/knowledge-base/software-guide/workflows/premium-triggers-and-actions/google-sheets-premium-action/lookup-spreadsheet-row.md).

# Lookup Spreadsheet Row

Our GoogleSheet Lookup action, allows you to lookup data within your Google Sheets documents, providing you with a powerful tool for managing your data workflows.

Using our system, you can easily lookup any row in your sheet, and use the custom values associated with that row within your workflow.

This functionality allows you to automate complex data management processes, such as cross-referencing data from multiple sheets or databases.

By leveraging the power of our workflow system, you can reduce errors, increase efficiency, and save time, all while ensuring the accuracy and completeness of your data.

With our lookup functionality, you can easily integrate your Google Sheets documents into your workflow processes, creating powerful data management workflows that help you to drive better outcomes.

***

### Choose a worksheet:

Select a worksheet within your spreadsheet that you wish to use for Looking up and retrieving data.

![](https://t8631005.p.clickup-attachments.com/t8631005/01bd4096-2541-4bd9-8be1-ab225682167c/image.png)

Google Sheets : Create Spreadsheet Row contains additional information on how to select an account, drive, spreadsheet, and worksheet. Please refer to that document for further details.

{% content-ref url="/pages/XWysRsGjDvXXF0SyX5vh" %}
[Create Spreadsheet Row](/knowledge-base/software-guide/workflows/premium-triggers-and-actions/google-sheets-premium-action/create-spreadsheet-row.md)
{% endcontent-ref %}

***

### Select a Column and Lookup Value to find the matching row

The first row is considered as Headers and the same is shown as labels for each columns. You can fetch the latest headers from the sheet by clicking “Refresh Headers”.

![](https://t8631005.p.clickup-attachments.com/t8631005/695d3fc6-d588-46d6-b14e-f5ca7097ab92/image.png)

***

### Select an extra Column and Lookup Value

If an extra column is added, then both the column’s value should match to determine the matching row

![](https://t8631005.p.clickup-attachments.com/t8631005/3dceb88e-687a-40c6-b95c-b14fcd59adf2/image.png)

Now you will be able to use the lookup data within the workflow for Google Sheets : Update Spreadsheet Row using Lookup, Google Sheets : Delete Spreadsheet Row using Lookup and also as custom values.

{% content-ref url="/pages/Zf5re0XSg54HHpoSHNPW" %}
[Update Spreadsheet Row using Lookup](/knowledge-base/software-guide/workflows/premium-triggers-and-actions/google-sheets-premium-action/update-spreadsheet-row-using-lookup.md)
{% endcontent-ref %}

{% content-ref url="/pages/k3IHKOh7i5YMNC7LoUiB" %}
[Delete Spreadsheet Row using Lookup](/knowledge-base/software-guide/workflows/premium-triggers-and-actions/google-sheets-premium-action/delete-spreadsheet-row-using-lookup.md)
{% endcontent-ref %}

***

## Using as Custom Variables:

One of the advantages of using lookup is that when you search for a particular row, all of its data can be saved as a custom value that can be utilised throughout your entire workflow.

Consider the following worksheet as an example. If you need to search for a specific row, you can enter the contact phone number or email address in the lookup section. Once the lookup function finds the matching row, it will store all the values under the corresponding header name as custom variables.

![](https://t8631005.p.clickup-attachments.com/t8631005/e0c99534-ce89-4fae-8347-b5796c08564b/image.png)

When you add a Lookup action, an index is automatically generated. This index is essential for mapping the row data to the custom variables and allows for easy identification of multiple lookup values. It is not possible to remove or edit the index once it is added.

![](https://t8631005.p.clickup-attachments.com/t8631005/95fb2521-2e40-4469-947a-55ae81958779/image.png)

The values obtained from the lookup action for a particular row can be used in all other actions within your workflows, just like any other contact fields or custom variables.

![](https://t8631005.p.clickup-attachments.com/t8631005/4d6ca623-dfe0-4ad3-9b10-d35245cbe585/image.png)

![](https://t8631005.p.clickup-attachments.com/t8631005/a301af9b-c35d-4241-bea2-d18b6547e27f/image.png)

As previously mentioned, the index generated by the lookup function serves as a reference and is used for internal mapping of the custom variables in lookup actions.

To get the row number of lookup value you can use {{sheet.`x`.rowNumber}}.

Here `x` is the index of the lookup action.

![](https://t8631005.p.clickup-attachments.com/t8631005/35475883-087c-49c7-a816-78e796e68683/image.png)

***

**Example:**

The custom values of LookedUp Row can be utilised in all of the actions within your workflow. Some examples of how to do this are provided below.

**In Communication Actions:**

![](https://t8631005.p.clickup-attachments.com/t8631005/dbaf62e4-048d-4b8a-b6e5-60fbec412b16/lookup1.gif)

**In If/Else:**

![](https://t8631005.p.clickup-attachments.com/t8631005/5cb41cd7-171e-4284-be22-a0104c5054b4/lookup1_author.gif)

***

### Important points to remember:

1. If the Google Sheets Lookup Action is unable to find a matching row, all subsequent Google Sheets Actions that reference this Lookup Action will be skipped due to lack of a result. Therefore, keep this in mind when building workflows that include this Lookup Action and the Google Sheets : Update Spreadsheet Row using Lookup or Google Sheets : Delete Spreadsheet Row using Lookup&#x20;
2. When searching for a match, the Google Sheets Lookup Action **is case sensitive and white-space sensitive**. So make sure to provide the correct casing and only including spaces when it’s required.
3. Since the Lookup Action results are available for If/Else Conditions you can be using those to decide whether to Google Sheets : Create Spreadsheet Row or Google Sheets : Update Spreadsheet Row using Lookup, based on the Condition of having a Lookup Result or not.


---

# 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://software-help-docs.gitbook.io/knowledge-base/software-guide/workflows/premium-triggers-and-actions/google-sheets-premium-action/lookup-spreadsheet-row.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.
