Skip to main content

How to collect data with Google Sheets in Chatbots

Updated over 2 weeks ago

Summary

The Wati Google Sheets Integration is a smart automation tool that connects your WhatsApp conversations in Wati with your data management in Google Sheets. It removes the need for manual data entry, minimizing errors and saving time by automatically transferring structured data from your chat flows to your chosen spreadsheet.

This integration is ideal for lead generation, customer support, surveys, and order management, turning interactive WhatsApp conversations into organized, actionable data.

Note: This feature is part of the advanced chatbot capabilities and is available for customers on Wati’s Pro and Business plans.

Instructions

How it works

1. Connect your Google Sheet

In the Wati Flow Builder, link your Google account and choose the spreadsheet and worksheet where you want to send data. Map your conversation variables (e.g., @name, @email, @selected_option) to the corresponding columns in your sheet.

2. Design interactive chat flows

Use Wati’s tools - such as buttons, quick replies, and question blocks—to collect information from users during conversations.

3. Automate data export

Trigger the integration at any point in your flow, such as after a user submits a form or makes a selection. Wati automatically adds the collected data as a new row in your configured Google Sheet, aligning each response with the correct column.

4. Manage and analyze your data

Your connected Google Sheet serves as a live database of all collected information. Use it to analyze responses, segment leads, trigger follow-up actions, or share reports instantly with your team.

Key features

  • Bi-directional sync – Export data from Wati or fetch data from Sheets to personalize conversations.

  • Dynamic data mapping – Map Wati variables (e.g., @name, @product_interest) to specific columns or cells in your sheet.

  • Real-time updates – Automatically capture new entries as users interact with your WhatsApp number.

  • Flexible triggers – Decide when data should be sent - after a button click, form submission, or any other step.

  • Simple authentication – Securely connect multiple Google accounts to manage Sheets across different domains or clients.

Use cases

  • Lead generation – Collect user details (name, contact info, preferences) and add them to a “Leads” spreadsheet automatically.

  • Customer support – Capture support requests from chat and log them as tickets in a Sheet for easy tracking.

  • Order and booking management – Record order details (product, quantity, customer address) directly in your management sheet.

  • Surveys and feedback – Gather responses from polls or surveys and centralize them for analysis in real time.

Why use this feature?

This feature is especially beneficial for:

  • Small businesses that don’t have the budget for a complete Customer Relationship Management (CRM) system.

  • Teams that spend significant time on manual data entry.

  • Organizations aiming to streamline data collection and reduce operational costs.

Checklist before you begin

Step 1: Confirm your login URL

Make sure you’re using the correct login URL.

  • Old format: live-12345.wati.io

  • New format: https://live.wati.io/12345/login (replace 12345 with your Wati account ID)

If you’re still using the old format:

  • Log out of your account

  • Log back in using the new URL format

Step 2: Check your Google account connection

Note: One Google account can be linked to only one Wati account at a time.

Verify whether your Google account is already connected to another Wati account.

If it is:

  • Open your Google account’s Connected apps page

  • Remove the existing Wati connection

Step 3: Fix connection issues

If you’re still experiencing issues:

  • Disconnect the Google account from the Google Sheets node in your Wati chatbot workflow

  • Go to your Google Account settings → Third-party app access, and remove Wati’s authorization

  • Reconnect your Google account again to establish a fresh connection

How to connect a Chatbot to Google spreadsheets

Follow these steps to link your Wati chatbot with Google Spreadsheets: Ensure you use Google Chrome as it is recommended for optimal compatibility with Wati.

  • Add the Google Spreadsheet Node

    • Open your chatbot in Wati’s chatbot builder.

    • Click on the Google Spreadsheet node icon from the left panel to add it to the chatbot flow.

  • Configure the Google Spreadsheet Node

  • Click the ⋮ (three-dot) menu on the node and select Edit.

  • Connect your Google account by clicking on Sign in with Google.

  • When prompted, select the appropriate Gmail account.

  • Review the details and click Continue to proceed.

  • Check the requested permissions and allow them to continue with the connection.

Note: It is important you check Select all to grant Wati all required Google permissions before continuing - to make sure it is a successful connection. Wati only utilizes read/write permissions and does not delete any data, despite grouping read/write/delete options in the same Google settings scope.

  • Click the Select spreadsheet to choose where the data should be stored.

  • Select the Gmail account where the sheet is stored.

  • After selecting the Gmail account you will see your Google Drive open where you can search and select the Google Sheets you wish to connect.

  • After selecting the Google Sheet, select the specific sheet within this file where the date should be saved.

  • Set up data insertion options: you have two options for adding data:

    • Insert a New Row: Use this option to add each new data entry as a separate row. You can specify variables that will be stored in columns, ensuring they match the variables defined in your chatbot.

    • Update an Existing Row: Use this if data already exists in the sheet. Define a reference column (an existing column in the spreadsheet), and specify the values to be updated.

What is the difference between using Chatbot variables (@) and contact attributes ({{ }})?

  • The @ prefix is used to collect user input and store it as a temporary chatbot variable. This value is cleared once the chatbot session ends.

  • The {{ }} format is used to reference existing contact attributes, such as {{name}}, {{phone}}, or any custom attributes created or updated using the Update Attribute node. These attributes are permanent, as they are saved in Wati contacts.

Example Configuration

Suppose you have a spreadsheet with a column named Equipment and want to update it dynamically:

  • Set the reference column to “Equipment.”

  • Define what should be updated when a user provides new input.

  • Example: If the spreadsheet contains “No Equipment,” any new responses received via the chatbot will replace this value with the updated information.

Save Your Settings Once all fields are configured, click Save to finalize the setup.

How does it work?

When users interact with the chatbot, their responses to buttons or list nodes are automatically collected and stored in Google Spreadsheets. The chatbot’s @value settings ensure that the data aligns correctly with the spreadsheet columns.

Example of a working Chatbot

  • A Buttons node is used to collect data.

  • The value field in the node is set to @equipment.

  • The Google Spreadsheet node captures this value and updates the spreadsheet accordingly.

Testing Your Setup

To test if the integration is working correctly:

  • Send the chatbot to a user through Team Inbox.

  • Set up an automation keyword to trigger the chatbot when a specific phrase is used.

    • Example: If a user types, “I need help with my equipment,” the keyword equipment triggers the chatbot.

  • The data will be automatically recorded in the selected Google Spreadsheet.

  • You can share the spreadsheet with your team for real-time access. With this setup, your team can seamlessly collect, store, and access customer data without manual input, improving efficiency and data accuracy.

Frequently Asked Questions (FAQs)

General questions

1. What is the Wati Google Sheets Integration?

It is an automation feature that connects your WhatsApp conversations in Wati to Google Sheets, automatically transferring collected data into a spreadsheet without manual entry.

2. What can I use this integration for?

You can use it for lead generation, customer support, surveys, order management, or any workflow where you need to capture and organize chat data.

3. Which plans support this feature?

This feature is available on Wati’s Pro and Business plans as part of the advanced chatbot capabilities.

Setup and configuration

4. How do I connect my Google Sheet to Wati?

In the Flow Builder or chatbot builder, add the Google Spreadsheet node, sign in with your Google account, select your spreadsheet and worksheet, and map your chatbot variables to the correct columns.

5. When is data sent to the spreadsheet?

You can trigger the export at any step in the flow, such as after a form submission, button click, or user response, and each submission is added or updated automatically.

6. Can I add new rows or update existing rows?

Yes, you can choose to insert each response as a new row or update an existing row using a reference column.

Data and behavior

7. What is the difference between chatbot variables (@) and contact attributes ({{ }})?

Chatbot variables (@) temporarily store user input during a session, while contact attributes ({{ }}) store permanent data saved to the contact record.

8. Does the integration update data in real time?

Yes, responses are captured and added to the connected Google Sheet as users interact with your chatbot.

Requirements and troubleshooting

9. Are there any connection limits or setup requirements?

Each Google account can be linked to only one Wati account at a time, Google Chrome is recommended, and if you face issues, disconnect and reconnect the Google account or remove Wati’s authorization before trying again.

Did this answer your question?