Google Sheets tools for LangChain.
Base class for Google Sheets tools.
Authentication:
api_resource: OAuth2 credentials for full access (read/write private sheets)api_key: API key for read-only access (public sheets only)Write operations require OAuth2 credentials.
Tool for creating new Google Spreadsheets.
Inherits from
SheetsBaseTool.
Creates spreadsheets with configurable properties and optional initial data.
Requires OAuth2 authentication. Use api_resource parameter with
authenticated Google Sheets service.
Tool for retrieving Google Sheets metadata and structure information.
Inherits from
SheetsBaseTool.
Retrieves spreadsheet properties, sheet details, named ranges, and organizational structure. Essential for understanding spreadsheet contents before reading data.
Tool for reading data from multiple ranges in Google Sheets efficiently.
Inherits from
BaseReadTool.
Reads multiple ranges in a single API call, reducing network overhead and improving performance.
Tool for reading data from Google Sheets using DataFilters.
Uses getByDataFilter API to read ranges specified by A1 notation, grid
coordinates, or developer metadata. Optionally includes detailed cell formatting.
Requires OAuth2 authentication (not API key).
This tool is for RANGE SELECTION, not conditional filtering like
'score > 50'. For conditional filtering, create a Filter View using
Sheets UI or batchUpdate API.
Tool for reading data from a single range in Google Sheets.
Inherits from
BaseReadTool.
Reads data from a single range with support for various rendering options and data transformations.
Toolkit for interacting with Google Sheets.
Inherits from BaseToolkit.
Provides comprehensive Google Sheets integration with read and write capabilities.
This toolkit contains tools that can read and write data to Google Sheets. Ensure proper authentication and access controls.
api_resource)Tool for appending values to a Google Spreadsheet table.
Inherits from
SheetsBaseTool.
Appends data to the end of a table, automatically finding the last row with data.
Requires OAuth2 authentication. Use api_resource parameter with
authenticated Google Sheets service.
Tool for batch updating multiple ranges in Google Sheets efficiently.
Inherits from
SheetsBaseTool.
Updates multiple ranges in a single API call, dramatically improving efficiency.
Tool for clearing values from a Google Spreadsheet range.
Inherits from
SheetsBaseTool.
Clears cell values from a specified range while preserving formatting and structure.
Requires OAuth2 authentication. Use api_resource parameter with
authenticated Google Sheets service.
Only values are cleared. Formatting, borders, colors, fonts, and data validation rules remain intact.
Tool for updating values in a single range of Google Sheets.
Inherits from
SheetsBaseTool.
Updates cell values in a specified range, overwriting existing data.
Requires OAuth2 authentication. Use api_resource parameter with
authenticated Google Sheets service.
Google Sheets tool utils.
Tool for creating new Google Spreadsheets.
Tools for writing data to Google Sheets.
Tools for reading data from Google Sheets.
Tool for retrieving Google Sheets metadata and structure information.
Google Sheets API enums and constants.
This module contains all the enums and constants used across the Google Sheets module for type safety, validation, and better developer experience.
Base class for Google Sheets tools.