Skip to main content
Google Sheets logo

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

FieldDescriptionRequiredFormat
Client IDGoogle OAuth Client IDYesxxxxxxxxxxxx.apps.googleusercontent.com
Client SecretGoogle OAuth Client SecretYesGOCSPX-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

Parameters

title
string
required
The title of the new spreadsheet.
sheet_name
string
Name for the first worksheet. Default: ‘Sheet1’.
headers
array
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"
}

Parameters

spreadsheet_id
string
required
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"
}

Parameters

spreadsheet_id
string
required
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
title
string
required
The name of the new worksheet (tab).
headers
array
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
worksheet_id
integer
required
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
range
string
Optional A1 notation range within the sheet (e.g. ‘A1:D10’, ‘A:F’). Omit to read all data.
has_headers
boolean
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
range
string
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
column
string
required
Column header name (e.g. ‘Name’) or column letter (e.g. ‘A’, ‘B’).
search_value
string
required
The value to search for.
match_type
string
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
rows
array
required
Array of rows to append. Each row is either an array of positional cell values or an object whose keys match the worksheet’s column headers.
has_headers
boolean
Whether row 1 contains column headers. Required when passing rows as objects. (Default: true)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "rows_added": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Rows Added"
    },
    "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": "AddRowsOutput",
  "type": "object"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
row
integer
required
1-indexed row number to update.
values
array
required
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
cell
string
required
A1 notation for the cell (e.g. ‘B5’).
value
string
required
The new cell value.

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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
sheet_name
string
required
The worksheet (tab) name.
start_index
integer
required
1-indexed row number of the first row to clear (inclusive).
end_index
integer
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"
}

Parameters

spreadsheet_id
string
required
The spreadsheet ID from the Google Sheets URL.
worksheet_id
integer
required
The numeric worksheet (sheet) ID. Use get_spreadsheet_info to discover sheet IDs.
start_index
integer
required
1-indexed row number of the first row to delete (inclusive).
end_index
integer
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.".

Cal.com

Canva

ConvertAPI