Google Sheets Task¶
Overview¶
The Google Sheets Task integrates with Google Sheets to read and write data. Use it to log leads, generate reports, sync data bidirectionally, track inventory, or collect form responses in spreadsheets.
When to use this task:
- Log leads to spreadsheet for sales team
- Export CRM data to shared reporting sheets
- Sync data between BaseCloud and Google Sheets
- Update inventory tracking sheets
- Read configuration data from sheets
- Generate automated reports
- Collect and process form responses
Key Features:
- OAuth2 authentication
- Read rows, ranges, or specific cells
- Append new rows
- Update existing rows
- Create new sheets
- Format cells and apply formulas
- Multiple operations per task
- Support for multiple Google accounts
Outputs¶
Which fields appear depends on the action — creating a spreadsheet populates different fields from reading rows.
Reference fields as {{task_<ID>_<field>}}.
| Field | Type | Notes |
|---|---|---|
spreadsheet_id |
string | ID of the spreadsheet created or acted on. Present only on some actions. |
spreadsheet_url |
string | Link to the spreadsheet. Present only on some actions. |
sheets |
string | The tabs in the spreadsheet. Present only on some actions. |
deleted_spreadsheet_id |
string | ID of the spreadsheet that was deleted. Present only on some actions. |
sheet_id |
string | ID of the tab created or acted on. Present only on some actions. |
sheet_title |
string | Name of the tab. Present only on some actions. |
deleted_sheet_id |
string | ID of the tab that was deleted. Present only on some actions. |
rows |
string | The rows read. Feed this into a Loop with action set to array. Present only on some actions. |
row_count |
string | How many rows were read. Present only on some actions. |
data |
string | Present only on some actions. |
updated_range |
string | Present only on some actions. |
updated_rows |
string | Present only on some actions. |
updated_cells |
string | Present only on some actions. |
action |
string | Present only on some actions. |
row_number |
string | Present only on some actions. |
dimension |
string | Present only on some actions. |
start_index |
string | Present only on some actions. |
end_index |
string | Present only on some actions. |
error |
object |
Always emitted¶
| Field | Type | Notes |
|---|---|---|
run |
boolean | Whether the task succeeded. |
run_text |
string | What happened, including the reason on failure. |
Fields marked as action-dependent may be absent
This task does several different things depending on its action setting, and only the fields relevant to that action are emitted. Check a real run in the OUTPUT panel before referencing one downstream.
Quick Start¶
Builder fields¶
The Field column is the label as it appears in the task builder; Key is the name the value is stored under and referenced by.
| Field | Key | Type | Default | Notes |
|---|---|---|---|---|
| Authentication | app_connection_id |
app-connection | – | |
| Action | sheets_action |
select | get_rows |
Options: Create Spreadsheet · Delete Spreadsheet · Create Sheet · Delete Sheet · Clear Sheet · Get Rows · Append Row · Update Row · Append or Update Row · Delete Rows / Columns |
| Spreadsheet ID | spreadsheet_id |
textarea | – | |
| Spreadsheet Name | spreadsheet_name |
textarea | – | Only shown when sheets_action is create_spreadsheet |
| Sheet Name | sheet_name |
textarea | Sheet1 |
Only shown when sheets_action is create_spreadsheet, create_sheet, delete_sheet, clear_sheet, get_rows, append_row, update_row, append_or_update_row, delete_rows_columns |
| Range | range |
textarea | A1:Z1000 |
Only shown when sheets_action is get_rows |
| Row Values (comma-separated) | row_values |
textarea | – | Only shown when sheets_action is append_row, update_row |
| Match Column | match_column |
textarea | A |
Only shown when sheets_action is append_or_update_row |
| Match Value | match_value |
textarea | – | Only shown when sheets_action is append_or_update_row |
| Update Values (comma-separated) | update_values |
textarea | – | Only shown when sheets_action is append_or_update_row |
| Row Number | row_number |
textarea | – | Only shown when sheets_action is update_row |
| Start Index | start_index |
textarea | – | Only shown when sheets_action is delete_rows_columns |
| End Index | end_index |
textarea | – | Only shown when sheets_action is delete_rows_columns |
| Dimension | dimension |
select | ROWS |
Options: Rows · Columns. Only shown when sheets_action is delete_rows_columns |
- Add a Google Sheets task and pick the Google Sheets connection
- Choose the action
- Paste the Spreadsheet ID (from the sheet's URL) and the tab's Sheet Name
- Fill in what the action needs, and run it to test
Simple Example - Append Row:
Action: Append Row
Spreadsheet ID: 1AbC…xyz
Sheet Name: Leads
Row Values: {{task_47001_full_name}}, {{task_47001_email}}, {{task_47001_phone}}
Connecting Google Account¶
First-Time Setup¶
- Go to Settings → App Connections and add a Google Sheets connection
- Sign in to Google and allow access
- Pick the connection on the task
Required Permissions¶
BaseCloud requests:
https://www.googleapis.com/auth/spreadsheets- Full sheets accesshttps://www.googleapis.com/auth/drive.metadata.readonly- Find sheets
Privacy: BaseCloud only accesses sheets you explicitly configure in tasks. Credentials are encrypted.
Multiple Accounts¶
Use different Google accounts for different workflows:
- Select account when configuring task
- Each workflow can use different account
- Useful for client-specific sheets
Reading rows¶

Get Rows is the read action. The Spreadsheet ID is the long identifier in the sheet's URL, not its title; Sheet Name is the tab. A wide Range like A1:Z1000 is the usual starting point — it returns what exists rather than failing on empty cells.
With more than one row, the first row is treated as headers and each later row is also returned as an object in
data — [{"Name": "John", "Email": "john@example.com"}, …] — while rows holds every row as it is, headers
included. row_count counts the rows read.
To work through the rows one at a time, feed rows (or data) into a Loop.
Writing rows¶
Row values are comma-separated ({{task_47001_name}}, {{task_47001_email}}, Website) — wrap a value that has a
comma in it in double quotes — or a JSON list (["a", "b, c", "d"]). Values are entered as if typed into Sheets, so
=SUM(A2:A10) becomes a formula and 2026-10-01 a date.
- Append Row adds the values as a new row under the last one.
- Update Row writes the values into Row Number (counting from 1), starting at column A.
- Append or Update Row looks down Match Column for a cell exactly equal to Match Value: the first match is
updated with Update Values, and with no match they are appended as a new row.
actionsays which happened (updatedorappended) androw_numberwhere.
Managing spreadsheets and tabs¶
- Create Spreadsheet — a new spreadsheet named Spreadsheet Name, with a first tab named Sheet Name;
returns its
spreadsheet_idandspreadsheet_url. - Delete Spreadsheet — deletes the spreadsheet with that ID.
- Create Sheet / Delete Sheet — adds or removes a tab.
- Clear Sheet — empties every cell on the tab, headers included.
- Delete Rows / Columns — removes rows or columns Start Index to End Index, both counted from 1 and both included.
Formatting, conditional formatting and charts are not set by this task — do them in Google Sheets.
Using it with AI Prompt¶
Attach a Google Sheets task to an AI Prompt task’s tools port. Its Google account, Spreadsheet ID and Sheet Name are what the AI can reach — it can never use another sheet. The task’s own action is not used; under What the AI may do you choose instead:
| What the AI may do | On to begin with | What it does |
|---|---|---|
| Look at the sheet | Yes | Reads the sheet’s rows and searches them — a lead by email, for example. |
| Add rows | No — tick it | Adds new rows at the bottom. |
| Change rows | No — tick it | Changes rows already in the sheet. |
With both Add rows and Change rows ticked, the AI can also update a row or add it when it is not there yet, in one go.
Each change happens at most 5 times per reply. Creating or deleting spreadsheets and sheets, clearing a sheet and deleting rows are never available to the AI.
A prompt that uses it:
When someone asks to be kept up to date, find them in the Leads sheet by email. If they are not there, add a row: name, email, today’s date, “Chat”.
Real-World Examples¶
Log every new enquiry to a sheet¶
Work through a list someone maintains¶
Schedule
└─ Google Sheets get_rows
└─ Loop over {{task_44001.JSON.rows}}, action: array
└─ Email send to {{task_29001_loop_value_email}}
Keep a row in step with the CRM¶
CRM Trigger (client updated)
└─ Match to Client look the client up
└─ Google Sheets append_or_update_row
Best Practices¶
Performance¶
- Batch operations - Update multiple cells at once
- Cache reads - Don't read same data repeatedly
- Limit frequency - Google limits how often a sheet can be read and written
- Use ranges - More efficient than cell-by-cell
- Pagination - Process large sheets in chunks
Data Quality¶
- Validate before write - Check required fields exist
- Handle duplicates - Check before appending
- Data types - Ensure numbers are numbers, dates are dates
- Trim whitespace - Clean data before writing
- Error logging - Track failed operations
Security¶
- Limit permissions - Only grant necessary access
- Separate accounts - Use different accounts for different clients
- Audit logs - Track who changed what
- Backup sheets - Keep copies of important data
- Encrypt sensitive data - Don't store passwords/keys in sheets
Maintainability¶
- Use named ranges - Easier than cell references
- Document formulas - Comment complex calculations
- Consistent formatting - Headers, dates, numbers
- Version sheets - Date-stamp sheet names
- Test with copy - Use test spreadsheet first
Troubleshooting¶
Authentication Failed¶
Error: "Could not connect to Google account"
Solutions:
- Reconnect Google account in task settings
- Check account has access to spreadsheet
- Verify spreadsheet still exists
- Re-authorize permissions
Spreadsheet Not Found¶
Error: "Spreadsheet ID not found"
Check:
- Spreadsheet deleted or moved?
- Account has access?
- Spreadsheet ID correct?
- Sharing settings allow access?
Solution: Re-select spreadsheet in task configuration.
Could Not Write Data¶
Error: "Failed to append row"
Causes:
- Sheet protected
- Invalid data format
- Cell limit reached
- API quota exceeded
Solutions:
- Check sheet protection settings
- Verify data format (arrays for ranges)
- Check sheet size (max 5M cells)
- Add delay between requests
Formula Not Calculating¶
Issue: Formula appears as text
Solution:
Ensure formula starts with =:
Date Format Issues¶
Issue: Dates appear as numbers (44928)
Solution: Format column as date in Google Sheets, or use date formula:
API Quota Exceeded¶
Error: "Rate limit exceeded"
Solution:
- BaseCloud retries a rate-limited call by itself
- In a Loop writing many rows, add a Delay between them
- Write fewer, larger updates where you can
Frequently Asked Questions¶
Is there a limit on spreadsheet size?¶
Google Sheets supports:
- Up to 5 million cells per spreadsheet
- 256 columns per sheet (A-IV)
- 40,000 new rows added per API request
Can I work with formulas?¶
Yes, you can:
- Write formulas to cells (they calculate in Google Sheets)
- Read calculated results
- Cannot execute formulas in BaseCloud
How do I handle multiple sheets in one spreadsheet?¶
Specify sheet name in task configuration:
Can I format cells programmatically?¶
No — this task reads and writes values. Format the sheet in Google Sheets.
What happens if workflow fails mid-update?¶
Each task is one change in Google Sheets: what earlier tasks wrote stays, and nothing is rolled back.
Can I read from one sheet and write to another?¶
Yes, use two Google Sheets tasks:
- Read from Sheet A
- Process data
- Write to Sheet B
How do I prevent duplicate rows?¶
Use Append or Update Row with the email as Match Value and its column as Match Column: an existing row is updated instead of a second one being added.
Can I use Google Sheets as a database?¶
For small datasets (<1000 rows), yes. For larger data or complex queries, use MySQL Query task instead.
How often can I sync data?¶
Google limits how many requests a user's connection can make per minute; a rate-limited call is retried by BaseCloud by itself. For a continuous sync, every few minutes is plenty.
Related Tasks¶
- MySQL Query - Alternative for large datasets
- Loop - Process multiple sheet rows
- Code - Format data for sheets
- If Statement - Conditional sheet operations
- Webhook Out - Sync to external systems