# How to Use Google Sheet Data in ZazzyAgent Flow Builder

A Google Sheet can act as a simple external data source for your ZazzyAgent flows.

That means your flow doesn't always have to contain the information itself.

For example:

> Customer asks for a service.

Your flow can look up the service information from a Google Sheet and then use that information in the conversation.

This is particularly useful when your team needs to update the underlying information without constantly editing the chatbot.

The current platform supports Google Sheet Data Fetch inside Flow Builder and can use retrieved values in subsequent chatbot replies.

## When does this make sense?

A Sheet is useful when:

*   Information changes regularly.
    
*   Non-technical staff need to maintain it.
    
*   The data is relatively simple.
    
*   You don't need a full database.
    
*   The flow needs to retrieve a value during a conversation.
    

## Example

Your Sheet contains:

| City | Contact Person | Phone |
| --- | --- | --- |
| Ahmedabad | Rahul | +91... |
| Mumbai | Priya | +91... |
| Delhi | Amit | +91... |

A customer chooses:

> Ahmedabad

The flow can retrieve Rahul's information and use it in the response.

## Prepare your Sheet

Create clear headers.

For example:

```text
City
Contact Person
Phone
```

Avoid unclear headers such as:

```text
Column1
Column2
Column3
```

Clean headers make mapping easier.

## Connect your Sheet

Connect your Google account in the Google Sheets integration.

Then add the existing Sheet or create a new one.

For the complete connection process, see [How to Connect Google Sheets to ZazzyAgent](https://blog.zazzyagent.com/how-to-connect-google-sheets-zazzyagent).

## Create custom fields

Decide what data you want to retrieve.

For the example above:

> Contact Person

> Phone

Create custom fields if needed.

## Create the Data Fetch configuration

Open the Google Sheet Data Fetch settings.

Create a campaign.

Choose the relevant Sheet.

Configure the search and response mapping.

## Build the Flow

Open Flow Builder.

Create the customer journey that should use the Sheet information.

For example:

```text
Customer
   ↓
Choose City
   ↓
Google Sheet Data Fetch
   ↓
Contact Information
   ↓
Reply
```

## Use interactive choices

You can use buttons or another suitable interactive element to let the customer choose what they want.

Example:

> Which city are you looking for?

**Ahmedabad**

**Mumbai**

**Delhi**

The selected value can be used as the lookup value.

## Connect the Data Fetch component

Place the Google Sheet Data Fetch component at the point where you need the external information.

Configure it to use the Data Fetch campaign you created.

The current Flow Builder documentation identifies **Google Sheet Data Fetch** as one of the available Flow Builder elements.

## Use the returned data

Suppose the matching Sheet row is:

```text
Ahmedabad | Rahul | +919...
```

The corresponding custom fields can then be used in your next message.

Example:

> Our Ahmedabad contact is Rahul.

> You can reach him at +91...

## Create a fallback

Never assume there will always be a matching row.

Build a no-result response.

For example:

> I couldn't find information for that location. Please choose another city.

## Use Sheet data in conditions

The retrieved value can be used as part of your automation where your configured fields support conditions.

For example:

```text
City = Ahmedabad
       ↓
Ahmedabad Flow

City = Mumbai
       ↓
Mumbai Flow
```

## Use it with AI

AI can help determine what the customer wants before the Sheet lookup.

Example:

Customer:

> I need someone in Ahmedabad.

The AI can understand:

> City = Ahmedabad

Then your automation can retrieve the relevant Sheet data.

This combines natural-language understanding with structured business data.

## Use it with User Input

Another approach is to collect the information first.

```text
User Input
   ↓
City
   ↓
Google Sheet Data Fetch
   ↓
Return matching record
```

## Use it with APIs

Google Sheet data can also become an intermediate step before another action.

For example:

```text
Customer
   ↓
Sheet Lookup
   ↓
Provider Phone
   ↓
HTTP API
```

This can be useful when the Sheet contains information required by an external system.

## Example: Service marketplace

Your Sheet contains:

| Service | Provider | Area | Phone |
| --- | --- | --- | --- |
| Plumber | Rahul | Ahmedabad | +91... |
| Electrician | Amit | Ahmedabad | +91... |

Customer:

> I need an electrician in Ahmedabad.

Your automation can identify the relevant service and location, retrieve the matching record and present it.

## Example: Branch information

Sheet:

| City | Address | Phone |
| --- | --- | --- |
| Ahmedabad | Address A | +91... |
| Mumbai | Address B | +91... |

Customer selects:

**Mumbai**

The flow returns the Mumbai branch information.

## Example: Staff directory

Sheet:

| Department | Contact | Email |
| --- | --- | --- |
| Sales | Rahul | sales@... |
| Support | Priya | support@... |

A flow can retrieve the correct contact information based on the customer's selected department.

## Keep the Sheet as the source of truth

If the information changes frequently, don't duplicate the same information in multiple flow messages.

For example, if a branch phone number changes:

Bad approach:

> Update ten chatbot messages.

Better:

> Update the Google Sheet.

Then the lookup uses the latest data.

## Data Fetch isn't a spreadsheet database

Google Sheets is convenient, but it isn't automatically the right tool for every business.

Use it for relatively simple lookup data.

For complex, transactional systems, use an API or proper backend.

## Test the full flow

Test:

*   Valid lookup
    
*   No match
    
*   Multiple matches
    
*   Incorrect input
    
*   Empty data
    
*   Updated spreadsheet value
    

## Common mistakes

### Sheet is connected but flow doesn't return data

Connection and Data Fetch configuration are separate steps.

### Correct Sheet, wrong campaign

Check that the Flow uses the intended Data Fetch campaign.

### Correct row, empty response

Check custom-field mapping.

### Button value doesn't match Sheet value

Check the exact search term.

## A simple mental model

```text
Google Sheet
    ↓
Data Fetch
    ↓
Find Row
    ↓
Save Result
    ↓
Flow Builder
    ↓
Use Result
```

This turns Google Sheets into a simple operational data source for your conversations.
