> For the complete documentation index, see [llms.txt](https://helpdocumentation.gitbook.io/user/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocumentation.gitbook.io/user/bot-builder/whatsapp-chatbot/google-sheet-blocks/store-bot-data-in-google-sheets-real-time.md).

# Store Bot Data in Google Sheets (Real-Time)

This guide explains how to collect user data through a bot and automatically store it in **Google Sheets**.

#### Step 1: Create Bot Flow

1. Go to **Chatbot → Create Botflow**
2. Add a **trigger (keyword)**
3. Select channel and set conditions
4. Save configuration

#### Step 2: Collect User Data

Add question blocks to capture user inputs:

* **Welcome Message + Action Button** (e.g., *Place Order*)
* **Name** → Save response
* **Product Selection** (buttons/list) → Save response
* **Quantity** → Save response

#### Step 3: Connect Google Sheets

1. Add **Automation → Google Sheets → Add Row**
2. Select or create **authentication**
3. Choose the **spreadsheet and sheet**

#### Step 4: Map Data

* Map collected fields to sheet columns:
  * Name
  * Product Name
  * Quantity
* Click **Run & Save**

#### Step 5: Test Flow

* Trigger the bot
* Enter user details
* Verify data is added automatically in Google Sheets
* Save and **Enable workflow**

{% embed url="<https://www.youtube.com/watch?v=BfBESN7VcyY>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://helpdocumentation.gitbook.io/user/bot-builder/whatsapp-chatbot/google-sheet-blocks/store-bot-data-in-google-sheets-real-time.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
