Table of Contents
Google Sheets integration (new version)
Updated
by Desirée M
The Google Sheets integration connects a bot to a spreadsheet so it can insert, update, or retrieve data during a conversation, with no coding required.
What you can do with this integration
• Insert a row — log new data as it's collected, like a lead's name and email.
• Update a row — change existing data, like correcting an email or updating an order status.
• Get row data — pull existing data into the conversation, like recognizing a returning user.
Before you connect a spreadsheet
The spreadsheet must be a native Google Sheets file, not an uploaded .XLSX or other format. It must also have column headers in the first row and at least one row of data. Without this, the block cannot detect the sheet's structure.
🔗 How to connect a bot to a spreadsheet
1️⃣ Sign in with the Google account that owns the spreadsheet, and grant the requested permissions. The file only appears in the next step if this account owns it and the permissions were granted.

2️⃣ Select the Google Sheets file to use by pressing "Browse Google Drive",selecting the sheet on the pop up, pressing Select and then Continue.

3️⃣ Pick the tab the block will read from and write to.

➕ How to insert a row
Insert a row adds a new row to the spreadsheet each time the flow reaches that block. Use it to log new data, such as a survey response or a lead, as its own row.

1️⃣ Choose the column to fill.
2️⃣ Enter the value, either static text or a field.
3️⃣ Add more columns as needed.

Each time the block runs, a new row is added with the values specified.
✏️ How to update a row
Update a row changes data already stored in the spreadsheet, such as correcting a user's email or updating an order's status.

1️⃣ Choose a reference column and a value to match against it, either static text or a field. The integration searches that column for a matching value to locate the row that needs updating.
2️⃣ Once the row is located, choose the column to change and the new value for it.

The block searches left to right across the row where the match is found, so only that row is affected.
Outcomes: The block has two outputs in the bot builder, shown as green and red arrows.
🟢 Success — the match was found, and the row was updated. The flow continues through the green output.
🔴 Failed — no match was found, so nothing changed. Connect the red output to a block that handles missing data, such as asking the user to try again.
🔍 How to get row data
Get row data retrieves existing values from a matched row and stores them in fields, so a bot can use them in the conversation. This action does not change the spreadsheet.

1️⃣ Choose a reference column and a value to match against it, either static text or a field.
2️⃣ Choose the column to pull data from and the field to store it in.

Outcomes: The block has two outputs in the bot builder, shown as green and red arrows.
🟢 Success — the match was found, and the requested values were stored in the specified fields. The flow continues through the green output.
🔴 Failed — no match was found, so no data was retrieved. Connect the red output to fallback logic, such as an error message or a retry.
📊 How to manage connected Google accounts
The Google Sheets dashboard, under Integrations, lists every connected Google account. From there, add a new account, see which bots use each account, and check the error log.
⚠️ Warning: Deleting a connected account breaks every block still linked to it. Move or remove those blocks before deleting the account.
📌 Note: Most entries in the error log are "internal server" or "timed out" errors between Landbot's and Google's servers. These are not caused by the bot's configuration and require no action.
❓FAQs and Troubleshooting
How to retrieve a URL stored in a spreadsheet
A URL stored in a spreadsheet cell is not read correctly by default when pulled into a bot. To retrieve it correctly, use Get row data and wrap the field name in curly braces: @{link1}. This format tells the integration to treat the value as a link rather than plain text.
A spreadsheet doesn't appear when connecting it
Confirm the signed-in Google account owns the file, that all requested permissions were granted, and that the file has column headers and at least one row of data.
The block returns a 403 error
A 403 error means Landbot lacks permission to access the file. Confirm the connected account has access to the file, then refresh the page.
Data isn't uploading correctly
This happens when columns are moved or renamed after the block was set up, or when a new sheet is created without resetting the block.
It also happens when a Buttons block with multiple-choice answers sends its output as an array field instead of text. Google Sheets cannot read a multi-choice field correctly, so the data either arrives malformed or fails to upload. To fix this, open the Buttons block, disable "Save output as multi choice type field," and save the answer as text instead.
The block doesn't return the exact row expected
Matching works on a "contains" basis: a search for "John" also matches "Johnny," so the wrong row can be returned when similar values exist in the reference column. To force an exact match, add a unique identifier to its own column, for example by prefixing each value with a "|" symbol, and use that column as the reference.
No match is found
When no match is found, the flow continues through the red (Failed) output. Connect this output to another block, such as a message or question, so the conversation does not dead-end.
Two rows share the same value in the reference column
Only one row is returned: whichever one appears higher in the spreadsheet.
Block placement to avoid
Placing two Google Sheets blocks back to back, or a Code block directly before one, can cause errors. Add a message or question block between them.