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

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

The question should be specific, self-contained, and written in natural language.
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.
