Browse guides

Google Sheet Fetch in ChatSyncs

Google Sheet Fetch lets a WhatsApp bot look up a row in a connected sheet mid-conversation and reply using its values — for an employee directory, catalog, or order tracker.

On this page
ChatSyncs left navigation with Chatbot Manager selected, the Integrations tab, and the Google Sheets sub-tab showing Google Sheet Data Fetch Campaigns with Connect Google Account and Create buttons

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 — see How to Connect Google to ChatSyncs — 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#

  1. A subscriber sends a message

    e.g. they message the bot with an ID or trigger keyword.

  2. ChatSyncs searches the sheet

    using whichever column you configured as the Search Column.

  3. 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).

  4. The needed column values are read

    from that row.

  5. Those values are stored as chatbot variables

    ready to use anywhere in a reply.

  6. The bot replies using those variables

    a personalized message built from live spreadsheet data.

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

Prerequisite: create matching Custom Fields first#

Custom Fields are created under Subscriber Manager, not inside the Google Sheets integration itself:

  1. Open Manage Custom Fields

    In Subscriber Manager, click Manage, then Custom Fields — this opens the Manage Custom Fields panel.

    Manage Custom Fields panel listing existing fields, with a Create Custom Field button at the top
  2. Create a field for every column you'll assign

    Click Create Custom Field, give it a name, and pick a Reply Type matching what the column holds.

    Create Custom Field modal with the field name set to Phone and Reply Type set to Phone
    Reply Type dropdown open showing Email, Phone, Text, Number, URL, File, Image, Video, Date, Time, and Datetime options
  3. Repeat for every field your reply will use

    For an employee-lookup bot, create one field for each column you plan to search by or return:

    NameReply Type
    PhonePhone
    EmailEmail
    DesignationText
    DepartmentText
    NameText
    employee idText

Set up the fetch campaign#

Find Google Sheet Fetch in Integrations#

Open Chatbot Manager → [your bot] → Integrations, then the Google Sheets sub-tab — it sits alongside HTTP API, Autoresponder, Email, and SMS.

Chatbot Manager tab bar with Automation, Data Collection, AI, Engagement, Commerce, and Integrations tabs, and the Integrations sub-tabs HTTP API, Google Sheets (selected), Autoresponder, Email, SMS

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

Click Connect Google Account at the top of the page and sign in — this is the same Google connection used by Google Sheet Integration — see How to Connect Google to ChatSyncs — for writing to sheets, so if you've already connected one there, it's available here too.

Google Sheet Data Fetch Campaigns page with the Connect Google Account button highlighted, a campaigns table, and a Connect Your Google Sheet form below it

Create the campaign#

In the Connect Your Google Sheet panel, give the connection an API Name, then pick the sheet from Google Sheet List — it shows your connected Google account and every sheet available to it:

Google Sheet List dropdown open showing the connected Google account email and a list of sheets to choose from

For example, a sheet called Customer Data containing an employee directory:

Google Sheet named Customer Data with columns Employee ID, Name, Department, Designation, Email, Phone and five rows of employee records
Employee IDNameDepartmentDesignationEmailPhone
EMP001Rahul ReddyITSoftware Engineerrahul@company.com919959623255
EMP002Priya SharmaHRHR Executivepriya@company.com919123456789
EMP003Arjun KumarSalesSales Managerarjun@company.com919988776655
EMP004Sneha PatelFinanceAccountantsneha@company.com919012345678
EMP005Vikram SinghMarketingMarketing Leadvikram@company.com919871234567

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#

Search Data — pick which sheet column to search by (File Header), and what subscriber value to compare it against (Data Field):

Search Data section with File Header set to Phone and Data Field set to Subscriber ID / Phone Number
File Header dropdown open showing sheet columns Employee ID, Name, Department, Designation, Email, and Phone (selected)
Data Field dropdown open under a Search Column group, showing Subscriber ID / Phone Number (selected) and Subscriber Message

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. Click + Map Data to add another File Header/Data Field pair:

Assign section with five mapped rows: Employee ID to Employee Id, Department to Department, Designation to Designation, Name to name, and Email to Email, with a Map Data button

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

Use it inside a Keyword Replies flow#

Once the campaign is configured, the actual lookup happens inside a Keyword Replies flow (under Chatbot Manager → [your bot] → Automation → Keyword Replies), as a Google Sheet Data Fetch flow step:

Chatbot Manager Automation tab with Keyword Replies sub-tab selected, showing a list of existing flows and a Create button
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
  1. Start Bot Flow

    Set a trigger, e.g. the keyword data with Exact keyword match.

  2. 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.

  3. Reply using the fetched fields

    Add a Text step and reference each custom field wrapped in #...#:

    Code
    Here are your details
    Name: #Name#
    Employee id: #employee id#
    Department: #Department#
    Designation: #Designation#,
    Email: #Email#
    
    Thank You!
  4. Save

    Click Save (or Save Changes) on the flow, and Save in the top bar to publish it to the connected WhatsApp number.

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

Code
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 scenarioSearch ColumnReturns
Employee lookupEmployee IDName, Department, Phone
Product lookupProduct IDProduct Name, Price, Stock
HospitalDoctor IDDoctor Name, Department, Consultation Fee, Available Time
Customer informationCustomer IDCustomer Name, Membership Status, Contact Details
Order trackingOrder IDOrder Status, Courier Name, Tracking Number

Product lookup example — sheet:

Product IDProductPriceStock
P001Wireless Mouse79945

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

Code
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#

Frequently asked#

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.

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 → Custom Fields, create it there first, then come back and map it.

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.

Do I need to connect Google Sheets before I can fetch data from one?

Yes — How to Connect Google to ChatSyncs must be connected first so ChatSyncs has access to the account that owns the sheet.

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.

Still stuck? Open a support ticket and our team will help.