Overview
What it does
Google Sheets integration connects AI tools directly to your Google Sheets, enabling natural language interactions with spreadsheets, data analysis, and automation.Key Features:
- Create and manage spreadsheets
- Read and write cell data
- Execute SQL queries on sheet data
- Create charts and visualizations
- Apply formatting to cells
- Manage worksheets and tabs
- Aggregate and analyze data
- Clear and update values by filters
Use Cases
Data Management:
- Import and organize data from various sources
- Update records programmatically
- Maintain inventory and tracking sheets
- Sync data across multiple sheets
- Generate automated reports
- Create dashboards with charts
- Aggregate data with SQL queries
- Calculate statistics and summaries
- Auto-populate sheets from other systems
- Create templated spreadsheets
- Bulk update records
- Format data for consistency
Quick Start
1
Connect Your Google Account
NimbleBrain Studio uses OAuth2 to securely connect to your Google account.
- Navigate to Connections in the sidebar
- Click Browse Catalog
- Search for “Google Sheets”
- Click Install
- Click Connect and authorize with your Google account
- Grant the requested permissions for Google Sheets access
2
Verify Connection
Once connected, test the integration:Other test prompts:
- “Create a new spreadsheet called ‘Q4 Budget’”
- “Get data from cells A1:D10 in my inventory sheet”
- “Add a new row to my contacts spreadsheet”
Available Tools
The Google Sheets connection provides 38+ tools organized into the following categories:Spreadsheet Management
Spreadsheet Operations
Spreadsheet Operations
Create and manage Google Sheets spreadsheets.
Example Usage:
| Tool | Description |
|---|---|
GOOGLESHEETS_CREATE_GOOGLE_SHEET1 | Create a new Google spreadsheet in Google Drive with a specified title |
GOOGLESHEETS_GET_SPREADSHEET_BY_DATA_FILTER | Retrieve spreadsheet data filtered by criteria (A1 notation, metadata, grid ranges) |
Worksheet Management
Worksheet Operations
Worksheet Operations
Create, find, and manage individual worksheets (tabs) within spreadsheets.
Example Usage:
| Tool | Description |
|---|---|
GOOGLESHEETS_ADD_SHEET | Add a new worksheet to a spreadsheet with optional title, index, and size |
GOOGLESHEETS_DELETE_SHEET | Remove a worksheet from a spreadsheet |
GOOGLESHEETS_FIND_WORKSHEET | Find a worksheet by its exact, case-sensitive title |
GOOGLESHEETS_LIST_WORKSHEETS | List all worksheet names from a spreadsheet |
Data Reading
Read Operations
Read Operations
Retrieve data from spreadsheets using various methods.
Example Usage:
| Tool | Description |
|---|---|
GOOGLESHEETS_BATCH_GET | Retrieve data from specified cell ranges using A1 notation |
GOOGLESHEETS_GET_SPREADSHEET_BY_DATA_FILTER | Get filtered data based on criteria |
Use A1 notation for ranges (e.g., “Sheet1!A1:D10” or “A1:Z100”).
Data Writing
Write Operations
Write Operations
Write, update, and append data to spreadsheets.
Example Usage:
| Tool | Description |
|---|---|
GOOGLESHEETS_BATCH_UPDATE | Update cell ranges with new values or append as new rows |
GOOGLESHEETS_BATCH_UPDATE_VALUES_BY_DATA_FILTER | Update values in ranges matching data filter criteria |
GOOGLESHEETS_CREATE_SPREADSHEET_ROW | Insert empty rows at specified indices |
GOOGLESHEETS_CREATE_SPREADSHEET_COLUMN | Insert new columns at specified positions |
GOOGLESHEETS_APPEND_DIMENSION | Add empty rows or columns to expand sheet size |
Data Manipulation
Clear & Delete Operations
Clear & Delete Operations
Clear cell contents and delete rows/columns.
Example Usage:
| Tool | Description |
|---|---|
GOOGLESHEETS_CLEAR_VALUES | Clear cell content (preserves formatting and notes) from a range |
GOOGLESHEETS_DELETE_DIMENSION | Remove specified rows or columns from sheets |
GOOGLESHEETS_CLEAR_BASIC_FILTER | Remove basic filters from a sheet |
Clearing values preserves cell formatting and notes. Use delete operations to remove entire rows/columns.
SQL Queries
SQL Operations
SQL Operations
Execute SQL queries against spreadsheet data for powerful data manipulation.
Example Usage:Supported Operations:
| Tool | Description |
|---|---|
GOOGLESHEETS_EXECUTE_SQL | Execute SELECT, INSERT, UPDATE, DELETE queries on sheet data |
SELECT- Query and filter dataINSERT- Add new recordsUPDATE- Modify existing recordsDELETE- Remove records
Data Analysis
Aggregation Operations
Aggregation Operations
Perform calculations and analysis on spreadsheet data.
Example Usage:Supported Operations:
| Tool | Description |
|---|---|
GOOGLESHEETS_AGGREGATE_COLUMN_DATA | Search rows by column value and perform math operations (sum, avg, count, min, max, percentage) |
- Sum
- Average
- Count
- Minimum
- Maximum
- Percentage
Charts & Visualization
Chart Operations
Chart Operations
Create visual representations of your data.
Supported Chart Types:
| Tool | Description |
|---|---|
GOOGLESHEETS_CREATE_CHART | Generate charts using specified data ranges and chart types |
- BAR
- LINE
- AREA
- COLUMN
- SCATTER
- COMBO
- STEPPED_AREA
Formatting
Format Operations
Format Operations
Apply visual formatting to cells and ranges.
Example Usage:
| Tool | Description |
|---|---|
GOOGLESHEETS_FORMAT_CELLS | Apply text and background formatting to cell ranges |
Example Workflows
- Sales Report
- Data Import
- SQL Analysis
- Data Aggregation
- Dashboard Creation
Scenario: Generate a weekly sales reportPrompt:What happens:
- Creates new spreadsheet
- Sets up column headers
- Generates chart visualization
- Returns spreadsheet link
Authentication
OAuth2 Authentication: This connection uses OAuth2 for secure authentication.
How It Works
When you connect Google Sheets in NimbleBrain Studio:- You’ll be redirected to Google’s authorization page
- Log in with your Google account
- Review and grant permissions
- You’re automatically redirected back to Studio
Required Scopes
The integration requests the following Google Sheets scopes: Spreadsheet Scopes:spreadsheets- Full read/write access to spreadsheetsspreadsheets.readonly- Read-only access (if limited access preferred)
drive.file- Access to files created by the appdrive- Full Drive access (for browsing existing files)
Rate Limits
Google Sheets API enforces quota limits:| Limit Type | Restriction |
|---|---|
| Read requests | 300 per minute per project |
| Write requests | 300 per minute per project |
| Per-user limit | 60 requests per minute per user |
Studio automatically handles rate limiting with exponential backoff for retries.
- Batch multiple operations when possible
- Use
BATCH_GETinstead of multiple individual reads - Use
BATCH_UPDATEfor multiple writes - Implement appropriate delays for bulk operations
Troubleshooting
Connection Failed
Connection Failed
Issue: OAuth authorization didn’t completeSolutions:
- Ensure you’re logged into the correct Google account
- Try a different browser or incognito mode
- Check popup blockers aren’t interfering
- Verify your Google account is active
- Clear browser cache and cookies
Permission Denied
Permission Denied
Issue: Insufficient privileges errorSolutions:
- Reconnect to grant additional scopes
- Check you have edit access to the spreadsheet
- Verify the spreadsheet isn’t restricted
- For organization accounts, check admin policies
Spreadsheet Not Found
Spreadsheet Not Found
Issue: Cannot find specified spreadsheetSolutions:
- Verify the spreadsheet ID is correct
- Ensure you have access to the spreadsheet
- Check if the spreadsheet was moved or deleted
- Try using the full spreadsheet URL
Invalid Range
Invalid Range
Issue: A1 notation range errorSolutions:
- Use correct A1 notation format (e.g., “Sheet1!A1:D10”)
- Include sheet name if not using first sheet
- Verify the range exists in the spreadsheet
- Check for typos in sheet names (case-sensitive)
Rate Limit Exceeded
Rate Limit Exceeded
Issue: Too many requests errorSolutions:
- Wait for rate limit to reset (1 minute)
- Reduce frequency of requests
- Batch operations together
- Studio automatically handles retries
SQL Query Failed
SQL Query Failed
Issue: SQL query returns errorSolutions:
- Verify table/column names match sheet headers
- Check SQL syntax is correct
- Ensure data types are compatible
- Use quotes around string values
Best Practices
Data Organization
- Use consistent column headers
- Keep one data type per column
- Avoid merged cells in data ranges
- Use separate sheets for different data types
- Name sheets descriptively
Performance
- Batch read/write operations
- Limit range sizes when possible
- Use specific ranges vs. entire columns
- Cache frequently accessed data
- Use filters to reduce data transfer
Data Integrity
- Backup important spreadsheets
- Use data validation where appropriate
- Test queries on sample data first
- Avoid concurrent writes to same cells
- Document sheet structures
Collaboration
- Set appropriate sharing permissions
- Use named ranges for clarity
- Add comments for complex formulas
- Maintain version history
- Coordinate updates with team
Links and Resources
Google Sheets API Reference
Official Google Sheets API documentation
A1 Notation Guide
Learn about cell range notation
Google Cloud Console
Manage API quotas and credentials
Need help? Join the NimbleBrain Discord or email [email protected]