> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theomnibot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheets Integration: Sync and Manage Data in Flows

> Connect ChatbotX to Google Sheets to send, retrieve, update, and clear spreadsheet rows automatically from inside your conversation Flows.

The Google Sheets integration lets you automatically sync and manage conversational data on your Google spreadsheets. Use it to store customer information collected from forms, look up product or location details, update order statuses, or clear records when a customer unsubscribes — all triggered directly from inside a Flow.

## Connecting ChatbotX to Google Sheets

<Steps>
  <Step title="Go to Settings">
    From the left sidebar, select **Settings** (the gear icon).
  </Step>

  <Step title="Select Integrations">
    Click the **Integrations** tab in the settings page navigation bar.
  </Step>

  <Step title="Connect Google Sheets">
    Find **Google Sheets** in the integrations list and click **Connect**. A new browser window opens asking you to log in to your Google account and grant ChatbotX the necessary permissions. Once confirmed, the status changes to **Connected**.
  </Step>
</Steps>

You can disconnect your Google account at any time by clicking the disconnect button on the same settings page.

## Setting Up Your Google Sheet

Before using any Google Sheets actions in a Flow, prepare your spreadsheet with column headers in the first row. For example, to collect customer data you might set up:

* Column A: Full Name
* Column B: User ID
* Column C: Email
* Column D: Phone Number

<Warning>
  The Google Sheets integration identifies your spreadsheet by its **Spreadsheet Name** and **Worksheet Name** — not by a hidden ID. If you rename either the spreadsheet or the worksheet tab (for example, changing `Sheet1` to `List`), the connection will break. You will need to return to Flow Builder and reconfigure any Google Sheets actions that reference the renamed sheet.
</Warning>

## Finding Google Sheets Actions in Flow Builder

Google Sheets features are only available inside Flows.

<Steps>
  <Step title="Open a Flow">
    Select **Flows** from the left menu and open an existing Flow or create a new one.
  </Step>

  <Step title="Add an Actions block">
    Click on any message block and select **Actions** from the block options.
  </Step>

  <Step title="Select Google Sheets">
    In the list of available actions, click **Google Sheets** to open the spreadsheet actions menu.
  </Step>
</Steps>

## The 5 Google Sheets Actions

### 1. Send Data

Inserts a new row at the bottom of the spreadsheet containing the customer's contact information.

**How to configure:** Select the **Send Data** action → choose the Spreadsheet Name and Worksheet Name → map the ChatbotX fields (Custom Fields, full name, phone number, etc.) to the corresponding column headers.

**Use case:** When a customer completes a registration or order form in the chatbot, the Bot automatically appends their details to the last row of the spreadsheet so your sales team can follow up.

***

### 2. Get Row

Looks up a specific row in the spreadsheet and saves values from that row into ChatbotX Custom Fields so you can display them to the customer or use them in the Flow.

**How to configure:** Select **Get Row** → choose the spreadsheet and worksheet → select the **Lookup Column** → set the matching condition (the lookup column must equal the value of a specific Custom Field or Bot Field) → map the returned columns to Custom Fields.

**Real-world example:** You run a mobile Food Truck that changes location frequently.

1. Create a spreadsheet with two columns: `Current Location` and `Current Address`. Set the `Current Location` value to `FoodTruck1`.
2. Whenever you move, update the `Current Address` value directly in the spreadsheet from your phone.
3. In ChatbotX, create a static Bot Field named `Current Location` with the value `FoodTruck1`.
4. In your Flow, when a customer asks for your location, **Get Row** searches for the row where `Current Location` equals `FoodTruck1`, fetches the address into the `Current Address` Custom Field, and sends it to the customer. You never need to edit the Flow when you move.

***

### 3. Get Random Row

Selects a random row from the spreadsheet that meets your lookup condition and saves the content of that row to a Custom Field.

**How to configure:** Select **Get Random Row** → choose the spreadsheet and worksheet → set the lookup column and lookup value to limit the eligible rows → map the selected row's columns to Custom Fields.

**Real-world example:** Setting up a lucky draw or random quiz:

1. Create a spreadsheet listing prizes or quiz questions.
2. When a customer clicks a **Spin** or **Play** button in the Flow, the Bot uses **Get Random Row** to pick a random entry, saves the result to a Custom Field, and displays it to the customer instantly.

***

### 4. Update Row

Finds an existing row in the spreadsheet and updates it with new data, instead of creating a duplicate row.

**How to configure:** Select **Update Row** → choose the spreadsheet and worksheet → select a unique, constant lookup column (such as `User ID` or `Phone Number`) so the Bot finds the exact row → choose the Custom Fields to write into the matching columns.

**Real-world example:** A customer initially registers with only their name and User ID. In a later Flow, they provide their email address and phone number to receive a lead magnet. **Update Row** looks up the row where `User ID` matches the customer and fills in the new email and phone number, keeping your spreadsheet free of duplicates.

***

### 5. Clear Row

Clears all content in a matching row while keeping the empty row in place, so row indices and the structure of other rows are not disrupted.

**How to configure:** Select **Clear Row** → choose the spreadsheet and worksheet → select the unique lookup column (such as `User ID`) to identify the exact row to clear.

**Real-world example:** When a customer clicks an unsubscribe button or requests that their personal data be deleted, the Bot uses **Clear Row** to automatically wipe their information from the corresponding spreadsheet row.

<Tip>
  Use **Get Row** to dynamically serve up-to-date information — prices, schedules, location details — without ever touching your Flow. Just update the spreadsheet and every customer who asks gets the latest data automatically.
</Tip>
