Skip to main content

Overview

Enable your agents to manage spreadsheet data through Google Sheets. Read rows, create new entries, update existing data, and streamline your data management workflows with AI-powered automation. Perfect for data tracking, reporting, and collaborative data management.

Prerequisites

Before using the Google Sheets integration, ensure you have:
  • A CrewAI AMP account with an active subscription
  • A Google account with Google Sheets access
  • Connected your Google account through the Integrations page
  • Spreadsheets with proper column headers for data operations

Setting Up Google Sheets Integration

1. Connect Your Google Account

  1. Navigate to CrewAI AMP Integrations
  2. Find Google Sheets in the Authentication Integrations section
  3. Click Connect and complete the OAuth flow
  4. Grant the necessary permissions for spreadsheet access
  5. Copy your Enterprise Token from Integration Settings

2. Install Required Package

3. Environment Variable Setup

To use integrations with Agent(apps=[]), you must set the CREWAI_PLATFORM_INTEGRATION_TOKEN environment variable with your Enterprise Token.
Or add it to your .env file:

Available Actions

Description: Retrieve properties and data of a spreadsheet.Parameters:
  • spreadsheetId (string, required): The ID of the spreadsheet to retrieve.
  • ranges (array, optional): The ranges to retrieve from the spreadsheet.
  • includeGridData (boolean, optional): True if grid data should be returned. Default: false
  • fields (string, optional): The fields to include in the response. Use this to improve performance by only returning needed data.
Description: Returns a range of values from a spreadsheet.Parameters:
  • spreadsheetId (string, required): The ID of the spreadsheet to retrieve data from.
  • range (string, required): The A1 notation or R1C1 notation of the range to retrieve values from.
  • valueRenderOption (string, optional): How values should be represented in the output. Options: FORMATTED_VALUE, UNFORMATTED_VALUE, FORMULA. Default: FORMATTED_VALUE
  • dateTimeRenderOption (string, optional): How dates, times, and durations should be represented in the output. Options: SERIAL_NUMBER, FORMATTED_STRING. Default: SERIAL_NUMBER
  • majorDimension (string, optional): The major dimension that results should use. Options: ROWS, COLUMNS. Default: ROWS
Description: Sets values in a range of a spreadsheet.Parameters:
  • spreadsheetId (string, required): The ID of the spreadsheet to update.
  • range (string, required): The A1 notation of the range to update.
  • values (array, required): The data to be written. Each array represents a row.
  • valueInputOption (string, optional): How the input data should be interpreted. Options: RAW, USER_ENTERED. Default: USER_ENTERED
Description: Appends values to a spreadsheet.Parameters:
  • spreadsheetId (string, required): The ID of the spreadsheet to update.
  • range (string, required): The A1 notation of a range to search for a logical table of data.
  • values (array, required): The data to append. Each array represents a row.
  • valueInputOption (string, optional): How the input data should be interpreted. Options: RAW, USER_ENTERED. Default: USER_ENTERED
  • insertDataOption (string, optional): How the input data should be inserted. Options: OVERWRITE, INSERT_ROWS. Default: INSERT_ROWS
Description: Creates a new spreadsheet.Parameters:
  • title (string, required): The title of the new spreadsheet.
  • sheets (array, optional): The sheets that are part of the spreadsheet.

Usage Examples

Basic Google Sheets Agent Setup

Filtering Specific Google Sheets Tools

Data Analysis and Reporting

Spreadsheet Creation and Management

Automated Data Updates

Complex Data Management Workflow

Troubleshooting

Common Issues

Permission Errors
  • Ensure your Google account has edit access to the target spreadsheets
  • Verify that the OAuth connection includes required scopes for Google Sheets API
  • Check that spreadsheets are shared with the authenticated account
Spreadsheet Structure Issues
  • Ensure worksheets have proper column headers before creating or updating rows
  • Verify that range notation (A1 format) is correct for the target cells
  • Check that the specified spreadsheet ID exists and is accessible
Data Type and Format Issues
  • Ensure data values match the expected format for each column
  • Use proper date formats for date columns (ISO format recommended)
  • Verify that numeric values are properly formatted for number columns
Range and Cell Reference Issues
  • Use proper A1 notation for ranges (e.g., “A1:C10”, “Sheet1!A1:B5”)
  • Ensure range references don’t exceed the actual spreadsheet dimensions
  • Verify that sheet names in range references match actual sheet names
Value Input and Rendering Options
  • Choose appropriate valueInputOption (RAW vs USER_ENTERED) for your data
  • Select proper valueRenderOption based on how you want data formatted
  • Consider dateTimeRenderOption for consistent date/time handling
Spreadsheet Creation Issues
  • Ensure spreadsheet titles are unique and follow naming conventions
  • Verify that sheet properties are properly structured when creating sheets
  • Check that you have permissions to create new spreadsheets in your account

Getting Help

Need Help?

Contact our support team for assistance with Google Sheets integration setup or troubleshooting.