Overview
Add Google Sheets to any ModuleX agent or workflow. Read, write, and manage Google Sheets spreadsheets and worksheets via the Google Sheets API v4 (https://sheets.googleapis.com/v4).
Categories : Productivity & Collaboration · Data & Analytics · Auth : OAuth2 · Actions : 13
Authentication
OAuth2 Authentication
Connect using Google OAuth (recommended)
Required Credentials
Field Description Required Format Client ID Google OAuth Client ID Yes xxxxxxxxxxxx.apps.googleusercontent.comClient Secret Google OAuth Client Secret Yes GOCSPX-xxxxxxxxxxxxxxxxxxxx
OAuth Configuration
Authorization URL : https://accounts.google.com/o/oauth2/v2/auth
Token URL : https://oauth2.googleapis.com/token
Scopes : https://www.googleapis.com/auth/spreadsheets, https://www.googleapis.com/auth/drive.file
Available Actions
new_spreadsheet — Create a new Google Spreadsheet with an optional worksheet name and column headers. Returns the spreadsheet ID and URL.
Parameters The title of the new spreadsheet.
Name for the first worksheet. Default: ‘Sheet1’.
Column headers to add as row 1. Each item is a string. Example: [“Name”, “Email”, “Score”].
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"spreadsheet_id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Spreadsheet Id"
},
"title" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Title"
},
"url" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Url"
},
"worksheet_name" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Worksheet Name"
}
},
"required" : [
"success"
],
"title" : "NewSpreadsheetOutput" ,
"type" : "object"
}
get_spreadsheet_info — Get the structure of a Google Spreadsheet: worksheet names, column headers (first row of each sheet), and row counts. Call this first before reading or writing data.
Parameters The spreadsheet ID from the Google Sheets URL.
Response {
"$defs" : {
"WorksheetInfo" : {
"additionalProperties" : false ,
"description" : "A worksheet summary plus its row-1 headers, used by get_spreadsheet_info." ,
"properties" : {
"sheet_name" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sheet Name"
},
"sheet_id" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sheet Id"
},
"row_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Row Count"
},
"headers" : {
"anyOf" : [
{
"items" : {
"type" : "string"
},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Headers"
}
},
"title" : "WorksheetInfo" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"spreadsheet_id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Spreadsheet Id"
},
"title" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Title"
},
"worksheets" : {
"anyOf" : [
{
"items" : {
"$ref" : "#/$defs/WorksheetInfo"
},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Worksheets"
}
},
"required" : [
"success"
],
"title" : "GetSpreadsheetInfoOutput" ,
"type" : "object"
}
list_worksheets — Get a list of all worksheets (tabs) in a spreadsheet.
Parameters The spreadsheet ID from the Google Sheets URL.
Response {
"$defs" : {
"WorksheetSummary" : {
"additionalProperties" : false ,
"description" : "A worksheet (tab) summary as returned by list/info actions." ,
"properties" : {
"sheet_id" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sheet Id"
},
"title" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Title"
},
"index" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Index"
},
"sheet_type" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sheet Type"
},
"row_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Row Count"
},
"column_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Column Count"
}
},
"title" : "WorksheetSummary" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"worksheets" : {
"anyOf" : [
{
"items" : {
"$ref" : "#/$defs/WorksheetSummary"
},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Worksheets"
},
"count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Count"
}
},
"required" : [
"success"
],
"title" : "ListWorksheetsOutput" ,
"type" : "object"
}
add_worksheet — Add a new worksheet (tab) to an existing spreadsheet. Optionally set column headers.
Parameters The spreadsheet ID from the Google Sheets URL.
The name of the new worksheet (tab).
Column headers to add as row 1. Each item is a string. Example: [“Name”, “Email”, “Score”].
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"sheet_id" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sheet Id"
},
"title" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Title"
},
"index" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Index"
}
},
"required" : [
"success"
],
"title" : "AddWorksheetOutput" ,
"type" : "object"
}
delete_worksheet — Delete a specific worksheet (tab) from a spreadsheet.
Parameters The spreadsheet ID from the Google Sheets URL.
The numeric worksheet (sheet) ID to delete. Use get_spreadsheet_info to discover sheet IDs.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"spreadsheet_id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Spreadsheet Id"
},
"deleted_sheet_id" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Deleted Sheet Id"
}
},
"required" : [
"success"
],
"title" : "DeleteWorksheetOutput" ,
"type" : "object"
}
read_rows — Read rows from a Google Sheets worksheet. Returns data as objects (keys = column headers from row 1) by default, or as raw arrays. Optionally specify an A1 range to read a subset.
Parameters The spreadsheet ID from the Google Sheets URL.
The worksheet (tab) name.
Optional A1 notation range within the sheet (e.g. ‘A1:D10’, ‘A:F’). Omit to read all data.
Whether row 1 contains column headers. If true, returns rows as objects with header keys. (Default: true)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"headers" : {
"anyOf" : [
{
"items" : {
"type" : "string"
},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Headers"
},
"rows" : {
"anyOf" : [
{
"items" : {},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Rows"
},
"row_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Row Count"
}
},
"required" : [
"success"
],
"title" : "ReadRowsOutput" ,
"type" : "object"
}
get_values_in_range — Get all values from a range of cells using A1 notation. Returns a list of rows where each row is a list of cell values.
Parameters The spreadsheet ID from the Google Sheets URL.
The worksheet (tab) name.
A1 notation range within the sheet (e.g. ‘A1:E5’). Omit to read the entire sheet.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"range" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Range"
},
"values" : {
"anyOf" : [
{
"items" : {
"items" : {},
"type" : "array"
},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Values"
},
"row_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Row Count"
}
},
"required" : [
"success"
],
"title" : "GetValuesInRangeOutput" ,
"type" : "object"
}
find_rows — Search for rows matching a value in a specific column. Returns matching rows as objects with their row numbers.
Parameters The spreadsheet ID from the Google Sheets URL.
The worksheet (tab) name.
Column header name (e.g. ‘Name’) or column letter (e.g. ‘A’, ‘B’).
How to match. Valid values: ‘exact’ (case-insensitive exact match), ‘contains’ (substring), ‘starts_with’. (Default: contains)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"matches" : {
"anyOf" : [
{
"items" : {
"additionalProperties" : true ,
"type" : "object"
},
"type" : "array"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Matches"
},
"match_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Match Count"
}
},
"required" : [
"success"
],
"title" : "FindRowsOutput" ,
"type" : "object"
}
add_rows — Append one or more rows to a Google Sheets worksheet. Pass rows as a JSON array — either arrays of positional values (e.g. [["Alice", "alice@example.com"]]) or objects with column header keys (e.g. [{"Name": "Alice", "Email": "alice@example.com"}]). Use get_spreadsheet_info first to discover header names.
update_row — Overwrite the contents of a specific row with a new list of values (positional, matching column order).
Parameters The spreadsheet ID from the Google Sheets URL.
The worksheet (tab) name.
1-indexed row number to update.
Array of cell values for the row, in column order. Numbers, strings, and booleans are all accepted.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"updated_range" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Updated Range"
},
"updated_rows" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Updated Rows"
},
"updated_columns" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Updated Columns"
},
"updated_cells" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Updated Cells"
}
},
"required" : [
"success"
],
"title" : "UpdateRowOutput" ,
"type" : "object"
}
update_cell — Update a single cell in a worksheet by A1 notation. The new value is parsed as if typed in the UI (USER_ENTERED).
Parameters The spreadsheet ID from the Google Sheets URL.
The worksheet (tab) name.
A1 notation for the cell (e.g. ‘B5’).
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"updated_range" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Updated Range"
},
"updated_cells" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Updated Cells"
}
},
"required" : [
"success"
],
"title" : "UpdateCellOutput" ,
"type" : "object"
}
clear_rows — Clear the contents of a row or range of rows. The rows still exist but become blank.
Parameters The spreadsheet ID from the Google Sheets URL.
The worksheet (tab) name.
1-indexed row number of the first row to clear (inclusive).
1-indexed row number of the last row to clear (inclusive). Omit to clear only the start row.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"spreadsheet_id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Spreadsheet Id"
},
"cleared_range" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Cleared Range"
}
},
"required" : [
"success"
],
"title" : "ClearRowsOutput" ,
"type" : "object"
}
delete_rows — Permanently delete a range of rows from a worksheet. Rows below the deleted range shift up to fill the gap.
Parameters The spreadsheet ID from the Google Sheets URL.
The numeric worksheet (sheet) ID. Use get_spreadsheet_info to discover sheet IDs.
1-indexed row number of the first row to delete (inclusive).
1-indexed row number of the last row to delete (inclusive). Omit to delete only the start row.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"spreadsheet_id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Spreadsheet Id"
},
"deleted_count" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Deleted Count"
}
},
"required" : [
"success"
],
"title" : "DeleteRowsOutput" ,
"type" : "object"
}
Limits & Quotas
Google Sheets API default quota: 300 read requests / minute / project and 300
write requests / minute / project (with a 60 / minute / user cap for both).
Cell-value writes use valueInputOption=USER_ENTERED, so values are parsed as
if a user typed them in the UI (numbers/dates/booleans get coerced).
add_rows uses insertDataOption=INSERT_ROWS, so it never overwrites
existing data — new rows are inserted after the last row containing data.
Non-2xx responses are caught and returned as success=False + error with
the API error.message (when present).
Timeouts surface as success=False with error="Request timed out.".
Links