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: Check the login URL

  • Confirm the login URL you are using.

    • Old format: live-12345.wati.io

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

  • If you are logged in using the old format:

    • Log out of your account.

    • Log in again using the new URL format.

Step 2: Verify Google account usage

Note: A single Google account can be connected to only one Wati account at a time.

  • Check if your Google account is already linked to another Wati account.

How to Connect a Chatbot to Google Spreadsheets

Follow these steps to link your Wati chatbot with Google Spreadsheets:

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

  • 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 WhatsApp conversations in Wati to Google Sheets, allowing you to automatically store structured data from chat flows into a spreadsheet.

2. Who can use the Google Sheets integration?

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

3. What types of data can be sent to Google Sheets?

You can send data collected through chatbot interactions, such as names, email addresses, selections from buttons or lists, survey responses, order details, and other chatbot variables.

Setup and connection

4. Do I need a specific login URL before connecting Google Sheets?

Yes. You must log in using the new URL format: https://live.wati.io/{accountId}/login. If you are logged in using the old format, you need to log out and log in again using the new one.

5. Can one Google account be connected to multiple Wati accounts?

No. A single Google account can be connected to only one Wati account at a time. If it is already linked elsewhere, you must remove the existing connection before connecting it again.

6. What permissions are required when connecting Google Sheets?

You must allow all requested Google permissions during setup. Selecting all permissions ensures the connection is successful and data can be written to the spreadsheet correctly.

Data handling and behavior

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

Chatbot variables (using @) store temporary user input during a session and are cleared once the session ends. Contact attributes (using {{ }}) are saved permanently in Wati and remain available for future conversations.

8. Can I insert new data and update existing rows in a Google Sheet?

Yes. You can choose to insert each interaction as a new row or update an existing row by defining a reference column and specifying which values should be updated.

Usage and troubleshooting

9. How can I test if the Google Sheets integration is working?

You can test it by triggering the chatbot through the Team Inbox or an automation keyword. When a user interacts with the chatbot, their responses should appear automatically in the connected Google Sheet.

Did this answer your question?