Table of Contents

Google Sheets Integration: Insert, Update and Retrieve data

Desirée M Updated by Desirée M

Note: available on Professional and Business plans.

Prefer watching than reading? No problem, we've got you covered 👇

Turn Google Sheets into a live database for your bot - no coding required! In this article, you’ll find step-by-step guides on how to:

📝 Log new information directly into a sheet

🔄 Keep existing records up to date automatically

📊 Retrieve data to personalize conversations in real time

By the end of this guide, you’ll be able to connect your bot to Google Sheets and automate workflows like a pro, from lead management to dynamic responses.

Looking for inspiration? Here are some popular ways users combine Landbot with Google Sheets:

📧 Lead capture & forms – Automatically save emails, phone numbers, and other user info from contact forms or lead generation flows.

📝 Surveys & feedback – Collect customer reviews, satisfaction scores, or survey responses efficiently.

💳 Orders, payments & quotes – Track e-commerce purchases, invoices, and store info for personalized quote requests.

📬 Newsletter & event management – Sync subscribers and manage RSVPs for newsletters, webinars, or events.

🎯 Personalization & preferences – Save user details to tailor messages, offers, or overall experiences.

Let's get started!

🔗 Connect Your Bot to Google Sheets

To start setting up a Google Sheets integration, look for the Google Sheets block in the searcher:

Tip: Please keep in mind that you will use Fields to send the information to the Google Sheets block.

If you are not familiar with Landbot's fields, make sure to check out this video tutorial before proceeding with the integration.

Sync with one of your Google Spreadsheets

Sign in to your Google account: Click Add account, and you will be redirected to Google.

Enter your email and password, then grant the app permission to manage your data. After logging in, choose the account you want to integrate with Landbot from the dropdown menu.

You can connect multiple Google accounts to your Landbot account. When setting up the integration, you must be logged into the Google account that owns the spreadsheet. Otherwise, the sheet won’t appear, or the connection may fail.

Select the Spreadsheet: You will see a pop-up where you can choose which Spreadsheet you want to link to your bot. Click on it, then on Select. The pop-up will close and you will then see a dropdown to pick the specific sheet you want to work with:

The Google Sheets integration needs to find the headers (first row/line) in your Spreadsheet to work correctly, as shown below.

If the block stays loading and no options appear, it's likely because:

  • The app cannot find the headers of the columns in the selected sheet.
  • There is no data in the selected sheet.

If this is the case, change the setup of your Spreadsheet or add data to it, and begin the integration again from the start.

WARNING: Finalize your spreadsheet before connecting it to Landbot.

If you change its structure later (like adding, removing, or reordering columns), you’ll need to set up the Google Sheets integration again.
Note: As usual, the integration will only be activated if the block is triggered in the flow.

We recommend you place it right after collecting the relevant data, and not only at the end of the flow. This way, you ensure visitors go through it and trigger the integration.

How to Insert, Update and Get data

Once your bot is connected to Google Sheets, you’ll need to select the action you want it to perform. These actions determine how your bot and spreadsheet “talk” to each other.

After integrating with a spreadsheet, you must pick one of the three actions. Let’s take a look at each and see how to configure them in practice.

Insert a New Row in a Sheet

Use this when you want to send new information from your bot into the sheet. Each time someone interacts with the bot, a new row is added to your spreadsheet.

For example, you could log new leads including their name and email, or collect survey responses and store them automatically for analysis.

Select the column where you want to insert data

Choose the column in your spreadsheet where the data collected by Landbot should go. The column name in the dropdown should match the one in your sheet.

Define the data to be sent to that column

Next, choose which piece of information (stored in a field) should be sent to that column.

Once configured, each submission from the bot will create a new row with the data placed in the chosen column.

📝 Log New Data

In the example below we send the value saved in the field @name to the column NAME.

Spreadsheet Setup:

First we used Question: Ask for a name block, and saved the answer in the field @name. This is the field we will insert in the Google Sheets block in the next step.

Google Sheets Block Configuration

Here’s how the block looks when inserting a new row, sending the value @name to the column NAME:

From the user’s perspective, the conversation flows naturally:

And after the Google Sheets is triggered, the data will be sent to the Spreadsheet, creating a new row under the column NAME.

✏️ Update a Row in a Sheet

Use this to update information that’s already in your sheet. It’s helpful when you need to change or correct existing data, such as updating a user’s details, modifying a previous entry, or keeping your spreadsheet in sync with new responses from the bot.

Search for a value collected by Landbot

Start by checking if a value saved in a Landbot field exists in a specific column (REFERENCE COLUMN) of your Google Spreadsheet.

(for example, search for the field @name in the column NAME).

This step tells the spreadsheet where to start searching. Once the value is found, Google Sheets will look from left to right across the same row (not down the column) to locate or update the related data.

Update the row with a new value

After finding the row with the value you’re looking for, you can update one or more cells in the same row using values saved in Landbot.

(for example: update the EMAIL column using the field @email).

Outcomes:

There are two possible outcomes from the Google Sheets block when you are trying to Update a Row in a Sheet:

Success (Green arrow): The value you searched for was found, and the row was updated successfully. This path lets you continue the flow knowing the data was saved correctly.

Failed (Red arrow): This means the value you searched for was not found in the spreadsheet, so Landbot could not update any information. This path is useful to handle cases where the data is missing, for example, you might want to ask the user for different input or show an error message.

🔄 Keep Data Updated

This is how our Spreadsheet was set:

Make sure the fields in your flow match the spreadsheet columns you want to update. Here, pay special attention to the fields from the columns NAME and EMAIL.

This is how we set the flow:

We look up the user’s name saved in @name to find their row in the spreadsheet, searching in the NAME column. To do that, we set the NAME column as the reference point for the search.

Once the correct row is found, we can make changes to that specific row. In this case, we’ll be updating the email address.

The new email will come from the value saved in the field @email, and it will replace whatever is currently in the EMAIL column of that same row.

Here is how the user would see the flow:

And this is how it would look in the Spreadsheet after the integration was triggered. Please note that the email was changed, since it was updated with the new information:

Before:

After:

🔍 Get Data From a Sheet

Use this to pull information from your spreadsheet into the bot so your conversations can adapt to the user’s context.

This action searches through the rows in your sheet using the column you set as the reference column.

If a matching value is found, the corresponding information is retrieved and sent to Landbot, where you can use it as a field in your bot. This lets your bot provide personalized, relevant, and timely responses based on existing data.

Search for a Reference Value

Start by checking if a value collected by Landbot exists in a specific column of your spreadsheet (the reference column).

(for example, search for the field @name in the column NAME).

This tells the spreadsheet where to begin searching. Once the value is found, Google Sheets will look from left to right across the same row (not down the column) to locate or update the related data.

Get Row Values

Once the match is found in a row, you can pull values from another column in that same row and send them to Landbot.

(for example, get the value from the column EMAIL and store it in the field @email).

Outcomes:

There are two possible outcomes from the Google Sheets block when you are trying to Get Data from a Sheet:

Success (Green arrow): This means the value you searched for was found in the reference column. As a result, the Google Sheets block was able to read the row and send the requested value to Landbot successfully. You can then use this new field anywhere in your bot.

Failed (Red arrow): This means the value you searched for was not found in the reference column. Since the row wasn't found, Landbot couldn't retrieve any data. This path is helpful for setting fallback logic, like showing an error message or asking the user to re-enter the value.

📊 Retrieve Information

This is how our Spreadsheet was set:

Pay attention to the fields from the columns NAME and EMAIL.

This is how we set the flow:

Reference Column: We'll use the user's name, saved in the field @name, as a Reference Column to find the information in this row.

For that, we select the column NAME as the reference column and choose the field @name by clicking on the Use Field button.

Get data from the Spreadsheet: Once the name is found in that column, we retrieve data from another column in the same row. In this case, we’re getting the email address from the column EMAIL and using it in the field @email.

Here is how the user would see the flow:

Remember the Spreadsheet won’t be changed at all since we’re just getting information from it and not inserting or updating any data.

And just like that, we were able to bring the field @email into the bot, even though the user didn’t provide it during the chat. Easy and efficient!

FAQs & Troubleshooting:

If your Google Sheets integration is not working, please see if one of the following cases applies to your bot.

🤖 Connecting Google Sheets to your AI Agent

Currently, to connect an AI Agent to Google Sheets, you need to use a linear bot. Set this up in the exit conditions of your AI Agent and follow the instructions in this article: Connect AI Agents to Rule-Based Bots

Any data collected by the AI Agent will be passed to the connected linear bot. From there, you can use the Google Sheets integration as usual, and all the data collected by your AI Agent will be available in the spreadsheet.

⚡ Block placement: what should I avoid?

Don’t place Google Sheets blocks right after each other, or a Code block directly before one, as it can cause the bot to break. Always add another block (like a message or question) in between to keep things working smoothly.

🔗 Connection issues: why isn’t my Google Sheet showing up?

Make sure you’re logged into the Google account that owns the sheet, grant all required permissions, and ensure the file is saved as a Google Sheets file (not .XLSX or another format).

Also, your sheet must have column headers and at least one row of data. Empty sheets or sheets without headers won’t appear.

💡 Tip: If the block configurator keeps loading after selecting the sheet, check that your sheet has columns and at least one row of data.

❌ 403 error: why can’t Landbot access my Google Sheet?

 A 403 error usually means Landbot doesn’t have permission to access your sheet. Make sure the connected Google account has access to it and all permissions are granted.

💡 Tip: Refresh the page after checking these settings - this usually fixes the problem.

📤 Data upload problems: why isn’t my data uploading correctly?

If you move or rename columns after setting up the block, the integration can break.

Also, if you copy or create a new sheet, you need to reset the Google Sheets block; otherwise, new data may not upload correctly.

If you’re using a Buttons block with multiple choice options, make sure to enable “save output as multi choice type field” otherwise the data won’t reach Google Sheets properly.

🔍 Get data accuracy: why am I not getting the exact data I expect?

The Get Data From a Sheet action searches using a “contains” rule. This means it will match any row where the cell includes your value.

Example: If your sheet has John and Johnny, searching for John will match both rows, which can cause incorrect results.

💡 How to fix it:

Add a unique identifier in a new column by adding a | (the "|" symbol) before the value (for example: |john@email.com).


Use this column as the reference value in your Google Sheets block.


This way, Landbot will return the exact row you want.

Missing values: what does Landbot do if no match is found?

If Landbot can’t find the value, the flow will continue through the Failed (red arrow) output. Always connect this path to another block (like a message or question) so the bot keeps running.

🌐 URL retrieval: how can I send a URL from the spreadsheet to the bot?

Use the Get data from a sheet action and add the field in this format: @{link1} to retrieve URLs correctly.

📑 Duplicate values: what happens if two or more cells have the same value?

If there are two or more cells with the same value, the integration will only return values from one row. In this case, it will return the row that is located higher in the Spreadsheet.

Channel Type compatibility

for Web

This feature is fully compatible.

for WhatsApp

This feature is fully compatible.

for Messenger

This feature is fully compatible.

Was this article helpful?

How to use Google Sheets to create a simple verification system for returning visitors

Contact