> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheet Fetch

> Google Sheet Fetch lets a WhatsApp bot look up a row in a connected Google Sheet during a live conversation and reply using its values — an employee directory, a product catalog, an order tracker. Use this when a customer wants their bot to answer from data that lives in a spreadsheet instead of being hardcoded, and covers the easy-to-miss prerequisite: matching Subscriber Custom Fields must exist before you can map sheet columns to them.

<Frame>
  <img src="https://mintcdn.com/chatsyncs/Ma-dImppMzscCHUd/images/learn/control-panel-google-sheet-data-fetch/step-01-google-sheet-data-fetch.png?fit=max&auto=format&n=Ma-dImppMzscCHUd&q=85&s=87f71a6c167b40ee594646f0bcdf7f09" alt="Google Sheet Data Fetch Campaigns screen with API Name and Google Sheet List fields, and a Verify Connection button" width="1264" height="553" data-path="images/learn/control-panel-google-sheet-data-fetch/step-01-google-sheet-data-fetch.png" />
</Frame>

**Google Sheet Fetch** lets a WhatsApp bot look something up in a Google Sheet *in the middle of
a conversation*, so it can reply with real information — instead of that information being
typed into the bot itself.

Think of it like this: [Google Sheet
Integration](/learn/control-panel-google-sheet-integration) is the bot **writing** into your
sheet. Google Sheet Fetch is the opposite — the bot **reading** from your sheet.

**Example:** say you keep an employee list in a Google Sheet. Someone messages the bot with an
Employee ID, and the bot looks that row up and replies with the person's name, department, and
phone number — pulled straight from the sheet.

The best part: if you edit the sheet — add a new employee, fix a phone number — the bot's next
reply already uses the updated info. You don't have to touch the bot at all. This makes it
great for anything that changes often: an employee directory, a price list, order status,
appointment schedules, inventory, student records, an FAQ list, branch info, or membership
details.

## How it works

<Steps>
  <Step title="A subscriber sends a message">e.g. they message the bot with an ID or trigger keyword.</Step>
  <Step title="ChatSyncs searches the sheet">using whichever column you configured as the Search Column.</Step>
  <Step title="The matching row is found">the one row whose Search Column value matches what the subscriber sent (or whatever value you configured as the Search Value).</Step>
  <Step title="The needed column values are read">from that row.</Step>
  <Step title="Those values are stored as chatbot variables">ready to use anywhere in a reply.</Step>
  <Step title="The bot replies using those variables">a personalized message built from live spreadsheet data.</Step>
</Steps>

```
Subscriber message
        │
        ▼
ChatSyncs searches the Search Column
        │
        ▼
Matching row found
        │
        ▼
Column values → chatbot variables
        │
        ▼
Personalized reply sent
```

## Prerequisite: create matching Custom Fields first

<Warning>
  **This is the step that's easy to miss, and the most common reason Google Sheet Fetch shows an
  error.** Every column you plan to map under **Assign** must already exist as a **Subscriber
  Custom Field** — if the field doesn't exist yet, it won't be available to select as a Data
  Field, and the mapping (or the bot reply using it) will fail.
</Warning>

Custom Fields are created under **WhatsApp → Subscriber Manager**, not inside Settings &
Integration:

<Steps>
  <Step title="Open Manage Custom Fields">
    In **Subscriber Manager**, click **Manage**, then **Manage Custom Fields**.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-07-subscriber-manager-custom-fields-menu.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=a0762ac4ef2dce9f29c2e547b611d640" alt="WhatsApp Subscriber Manager page with the Manage dropdown open, showing Manage Labels and Manage Custom Fields" width="1263" height="542" data-path="images/learn/control-panel-google-sheet-data-fetch/step-07-subscriber-manager-custom-fields-menu.png" />
    </Frame>
  </Step>

  <Step title="Create a field for every column you'll assign">
    Click **Create** on the **WhatsApp Subscriber Custom Fields** page.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-08-custom-fields-list-create.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=db92703fdb905c3ba80d09010fb96b93" alt="WhatsApp Subscriber Custom Fields list with a Create button and a Data has been saved successfully toast" width="1278" height="537" data-path="images/learn/control-panel-google-sheet-data-fetch/step-08-custom-fields-list-create.png" />
    </Frame>

    Give it a **Custom Field Name** and a **Reply Type** (e.g. `Text`, `Phone`, `Email`) matching
    what the column holds.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-09-create-custom-field-modal.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=05c7771ed78408fd683fa11dc52fec60" alt="Create Custom Field modal with Custom Field Name set to phone and Reply Type set to Phone" width="347" height="220" data-path="images/learn/control-panel-google-sheet-data-fetch/step-09-create-custom-field-modal.png" />
    </Frame>
  </Step>

  <Step title="Repeat for every field your reply will use">
    A real example set of custom fields, created ahead of time for an employee-lookup bot:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-10-custom-fields-complete-list.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=4a25fec5f305402c46633d3ee951f93f" alt="WhatsApp Subscriber Custom Fields list showing six fields: Phone (Phone), Email (Email), Designation (Text), Department (Text), Name (Text), and employee id (Text)" width="1076" height="505" data-path="images/learn/control-panel-google-sheet-data-fetch/step-10-custom-fields-complete-list.png" />
    </Frame>

    | Name        | Reply Type |
    | ----------- | ---------- |
    | Phone       | Phone      |
    | Email       | Email      |
    | Designation | Text       |
    | Department  | Text       |
    | Name        | Text       |
    | employee id | Text       |
  </Step>
</Steps>

## Set up the fetch campaign

### Connect a Google account and sheet (if you haven't already)

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-04-google-accounts-and-sheets.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=746e21b73c6fc462ac4d51151148592d" alt="Connected Google Accounts and a Google Sheets section with Create New Sheet and Add Existing Sheet buttons, and a list of two sheets" width="1097" height="526" data-path="images/learn/control-panel-google-sheet-data-fetch/step-04-google-accounts-and-sheets.png" />
</Frame>

Google Sheet Fetch reads from a sheet that's already connected under [Google Sheet
Integration](/learn/control-panel-google-sheet-integration) — **Create New Sheet** or
**Add Existing Sheet** there first if you haven't.

### Find Google Sheet Fetch in Settings & Integration

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-03-settings-sidebar-entry.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=2cc3fc12c732481808c5c2553e0a9355" alt="Settings & Integration sidebar with Security, E-commerce, Google Sheet, Google Sheet Data Fetch (highlighted), HTTP API, and AI Training Campaign entries" width="1109" height="549" data-path="images/learn/control-panel-google-sheet-data-fetch/step-03-settings-sidebar-entry.png" />
</Frame>

It sits alongside the other integrations, under **Control Panel → Settings & Integration**.

### Create the campaign

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-05-fetch-campaigns-list.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=0382fc1c5e633ace6e4ad6ffcef90ceb" alt="Google Sheet Data Fetch Campaigns list with five existing campaigns, and a Connect Your Google Sheet form below with API Name and Google Sheet List fields" width="1266" height="539" data-path="images/learn/control-panel-google-sheet-data-fetch/step-05-fetch-campaigns-list.png" />
</Frame>

Give the connection an **API Name**, and pick the sheet from **Google Sheet List** — for
example, a sheet called **Customer Data** containing an employee directory:

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-06-source-sheet-employee-data.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=7283d81e631b4ce40307915ba8e0c2d7" alt="Google Sheet named Customer Data with columns Employee ID, Name, Department, Designation, Email, Phone and five rows of employee records" width="1244" height="539" data-path="images/learn/control-panel-google-sheet-data-fetch/step-06-source-sheet-employee-data.png" />
</Frame>

| Employee ID | Name         | Department | Designation       | Email                                           | Phone        |
| ----------- | ------------ | ---------- | ----------------- | ----------------------------------------------- | ------------ |
| EMP001      | Rahul Reddy  | IT         | Software Engineer | [rahul@company.com](mailto:rahul@company.com)   | 919959623255 |
| EMP002      | Priya Sharma | HR         | HR Executive      | [priya@company.com](mailto:priya@company.com)   | 919123456789 |
| EMP003      | Arjun Kumar  | Sales      | Sales Manager     | [arjun@company.com](mailto:arjun@company.com)   | 919988776655 |
| EMP004      | Sneha Patel  | Finance    | Accountant        | [sneha@company.com](mailto:sneha@company.com)   | 919012345678 |
| EMP005      | Vikram Singh | Marketing  | Marketing Lead    | [vikram@company.com](mailto:vikram@company.com) | 919871234567 |

The sheet's first row must be column headers — every column below it becomes a field you can
search by or assign.

### Search Data and Assign

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-11-search-data-assign-mapping.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=e1a1ac6de792c89e70e7280d820150ef" alt="Search Data mapping Phone to Subscriber ID / Phone Number, and Assign mapping Employee ID, Name, Email, Department, and Designation to their matching custom fields" width="1071" height="551" data-path="images/learn/control-panel-google-sheet-data-fetch/step-11-search-data-assign-mapping.png" />
</Frame>

* **Search Data** — which sheet column to search by, and what to compare it against. Here,
  **Phone** (the sheet column) is matched against **Subscriber ID / Phone Number** (the
  subscriber's own WhatsApp number) — so the bot automatically looks up *the row for whoever is
  messaging it*, with no manual ID entry needed.
* **Assign** — map every other column you want back to the **Custom Field** you created for it:
  `Employee ID` → `employee id`, `Name` → `Name`, `Email` → `Email`, `Department` →
  `Department`, `Designation` → `Designation`. Click **+ Map Data** to add more pairs.

Click **Verify Connection** to confirm the sheet is reachable and every mapped field returns
real data.

<Warning>
  If a **Data Field** you need isn't in the dropdown, stop and go create it as a **Subscriber
  Custom Field** first (see the prerequisite above) — don't try to type a new name in on the fly.
</Warning>

## Use it inside a Keyword Replies flow

Once the campaign is configured, the actual lookup happens inside a **Keyword Replies** flow, as a
**Google Sheet Data Fetch** flow step:

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-12-bot-reply-list.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=a3e247d448b39248fe9f22085481c7c4" alt="Chatbot Manager Keyword Replies Settings list showing several flows including one named google sheet test" width="1240" height="547" data-path="images/learn/control-panel-google-sheet-data-fetch/step-12-bot-reply-list.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/chatsyncs/_puSp7KUC3Jaxbxd/images/learn/control-panel-google-sheet-data-fetch/step-13-bot-flow-google-sheet-fetch-node.png?fit=max&auto=format&n=_puSp7KUC3Jaxbxd&q=85&s=c3213e74281eccff6bcb99f781202c7e" alt="Bot flow with a Start Bot Flow node triggered by the keyword data, connected to a Google Sheet Data Fetch node named Google Data, connected to a Text reply node, with a Configure Text Message panel showing the reply using hash-wrapped field variables" width="1273" height="537" data-path="images/learn/control-panel-google-sheet-data-fetch/step-13-bot-flow-google-sheet-fetch-node.png" />
</Frame>

<Steps>
  <Step title="Start Bot Flow">
    Set a trigger, e.g. the keyword `data` with **Exact keyword match**.
  </Step>

  <Step title="Add a Google Sheet Data Fetch step">
    Pick the fetch campaign you configured above (e.g. `Google Data`). Use **Test Google Sheet
    New** to try it against a real subscriber while building the flow.
  </Step>

  <Step title="Reply using the fetched fields">
    Add a **Text** step and reference each custom field wrapped in `#...#`:

    ```
    Here are your details
    Name: #Name#
    Employee id: #employee id#
    Department: #Department#
    Designation: #Designation#,
    Email: #Email#

    Thank You!
    ```
  </Step>

  <Step title="Save">
    Click **Save** (or **Save Changes**) on the flow, and **Save** in the top bar to publish it
    to the connected WhatsApp number.
  </Step>
</Steps>

With the example data above, a subscriber whose WhatsApp number matches **EMP001**'s Phone gets:

```
Here are your details
Name: Rahul Reddy
Employee id: EMP001
Department: IT
Designation: Software Engineer,
Email: rahul@company.com

Thank You!
```

## More examples

Google Sheet Fetch works the same way for any lookup — only the Search Column and the mapped
fields change:

| Business scenario    | Search Column | Returns                                                   |
| -------------------- | ------------- | --------------------------------------------------------- |
| Employee lookup      | Employee ID   | Name, Department, Phone                                   |
| Product lookup       | Product ID    | Product Name, Price, Stock                                |
| Hospital             | Doctor ID     | Doctor Name, Department, Consultation Fee, Available Time |
| Customer information | Customer ID   | Customer Name, Membership Status, Contact Details         |
| Order tracking       | Order ID      | Order Status, Courier Name, Tracking Number               |

**Product lookup example** — sheet:

| Product ID | Product        | Price | Stock |
| ---------- | -------------- | ----- | ----- |
| P001       | Wireless Mouse | 799   | 45    |

Mapped to `product_name`, `product_price`, `product_stock`, the reply becomes:

```
Product: Wireless Mouse
Price: ₹799
Available Stock: 45
```

## Benefits

* No coding required.
* Always uses live data — update the sheet, not the bot flow.
* One search can return several fields at once.
* Works for practically any lookup-style business process.
* Cuts down on manually rebuilding flows when information changes.

## Best practices

<Warning>
  * **Create every Subscriber Custom Field before mapping it** — this is the #1 cause of a broken
    or erroring fetch.
  * **Always click Verify Connection** after mapping fields — a typo in a **File Header** (it must
    match the sheet's actual column header exactly) makes the fetch silently return no data
    instead of erroring.
  * **Keep sheet column headers unique and consistent** — don't rename a column without updating
    the mapping.
  * **Avoid duplicate values in the Search Column** — if two rows share the same ID or phone
    number, the fetch can return the wrong row.
  * **Test the full bot flow** (not just Verify Connection) before publishing, using **Test Google
    Sheet New** inside the flow builder.
</Warning>

## Frequently asked

<AccordionGroup>
  <Accordion title="How do I look up a customer's order from a Google Sheet inside a bot flow?">
    Create a **Google Sheet Fetch** campaign, map the sheet's phone-number column to the
    subscriber's phone number under **Search Data**, then map the columns you want back (e.g.
    Customer Name, Order ID) under **Assign** to matching Subscriber Custom Fields. Add a
    **Google Sheet Data Fetch** step in a Keyword Replies flow and reference the fields in your reply.
  </Accordion>

  <Accordion title="Why is my Google Sheet Fetch showing an error or not returning data?">
    The most common cause: one of the fields you mapped under **Assign** doesn't exist yet as a
    **Subscriber Custom Field**. Go to **Subscriber Manager → Manage → Manage Custom Fields**,
    create it there first, then come back and map it.
  </Accordion>

  <Accordion title="What's the difference between Search Data and Assign?">
    **Search Data** tells ChatSyncs which sheet column to match against (how to find the right
    row — usually the subscriber's phone number). **Assign** tells it which columns to pull back,
    and which Custom Field to store each one in.
  </Accordion>

  <Accordion title="Do I need to connect Google Sheets before I can fetch data from one?">
    Yes — [Google Sheet Integration](/learn/control-panel-google-sheet-integration) must be
    connected first so ChatSyncs has access to the account that owns the sheet.
  </Accordion>

  <Accordion title="How do I actually use the fetched data in a WhatsApp reply?">
    Add a **Google Sheet Data Fetch** step to a Keyword Replies flow, then in the following **Text**
    step, reference each field as `#FieldName#` — matching the Custom Field's name exactly.
  </Accordion>
</AccordionGroup>
