All data sources

Google Sheets

OAuthsheets

Google Sheets connector for reading and writing spreadsheet data (read & write). CRITICAL USAGE RULES: 1. Use createSpreadsheet() to create new spreadsheets. 2. Provide spreadsheetId from the URL (e.g., https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit). 3. Use A1 notation ranges (e.g., "Sheet1!A1:D10") for value operations. 4. Write operations available: createSpreadsheet, updateCells, createSheet, formatRange, appendRows.

Provenance

PublisherGoogle Sheets

Freshness & coverage

FreshnessFreshness not declared
GeographicNot declared
TemporalNot declared
AuthenticationCredentials required (OAuth)

Methods (8)

  • createSpreadsheet

    write

    Create a new Google Sheets spreadsheet.

    Required paramstitle
    Input schema
    {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "Spreadsheet title."
        },
        "sheets": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Optional initial sheet definitions."
        }
      },
      "additionalProperties": true,
      "required": [
        "title"
      ]
    }
  • getSpreadsheet

    read

    Fetch spreadsheet metadata by ID (Google Sheets).

    Required paramsspreadsheetId
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "includeGridData": {
          "type": "boolean"
        },
        "ranges": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional list of A1 ranges to limit returned grid data."
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId"
      ]
    }
  • getSheetValues

    read

    Read values from a spreadsheet range.

    Required paramsspreadsheetIdrange
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "range": {
          "type": "string",
          "description": "A1 notation range."
        },
        "majorDimension": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ROWS"
              ]
            },
            {
              "type": "string",
              "enum": [
                "COLUMNS"
              ]
            }
          ],
          "type": "string",
          "description": "ROWS or COLUMNS."
        },
        "valueRenderOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "FORMATTED_VALUE"
              ]
            },
            {
              "type": "string",
              "enum": [
                "UNFORMATTED_VALUE"
              ]
            },
            {
              "type": "string",
              "enum": [
                "FORMULA"
              ]
            }
          ],
          "type": "string",
          "description": "How values should be rendered."
        },
        "dateTimeRenderOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "SERIAL_NUMBER"
              ]
            },
            {
              "type": "string",
              "enum": [
                "FORMATTED_STRING"
              ]
            }
          ]
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId",
        "range"
      ]
    }
  • batchGetSheetValues

    read

    Read values from multiple spreadsheet ranges in one request.

    Required paramsspreadsheetIdranges
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "ranges": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of A1 notation ranges."
        },
        "majorDimension": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ROWS"
              ]
            },
            {
              "type": "string",
              "enum": [
                "COLUMNS"
              ]
            }
          ],
          "type": "string",
          "description": "ROWS or COLUMNS."
        },
        "valueRenderOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "FORMATTED_VALUE"
              ]
            },
            {
              "type": "string",
              "enum": [
                "UNFORMATTED_VALUE"
              ]
            },
            {
              "type": "string",
              "enum": [
                "FORMULA"
              ]
            }
          ],
          "type": "string",
          "description": "How values should be rendered."
        },
        "dateTimeRenderOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "SERIAL_NUMBER"
              ]
            },
            {
              "type": "string",
              "enum": [
                "FORMATTED_STRING"
              ]
            }
          ]
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId",
        "ranges"
      ]
    }
  • updateCells

    write

    Write values into a spreadsheet range (Google Sheets).

    Required paramsspreadsheetIdrangevalues
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "range": {
          "type": "string",
          "description": "A1 notation range."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {}
          },
          "description": "2D array of values to write."
        },
        "valueInputOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "RAW"
              ]
            },
            {
              "type": "string",
              "enum": [
                "USER_ENTERED"
              ]
            }
          ],
          "type": "string",
          "description": "RAW or USER_ENTERED."
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId",
        "range",
        "values"
      ]
    }
  • appendRows

    unknown

    Append rows to the end of an existing data table in a sheet. Pass the column-only range like "Sheet1!A:D" — Google detects the table extent and appends below.

    Required paramsspreadsheetIdrangevalues
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "range": {
          "type": "string",
          "description": "A1 notation range covering the columns to append into, e.g. \"Sheet1!A:D\"."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {}
          },
          "description": "2D array of row values."
        },
        "valueInputOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "RAW"
              ]
            },
            {
              "type": "string",
              "enum": [
                "USER_ENTERED"
              ]
            }
          ],
          "type": "string",
          "description": "RAW or USER_ENTERED. Defaults to USER_ENTERED."
        },
        "insertDataOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "OVERWRITE"
              ]
            },
            {
              "type": "string",
              "enum": [
                "INSERT_ROWS"
              ]
            }
          ],
          "type": "string",
          "description": "INSERT_ROWS or OVERWRITE. Defaults to INSERT_ROWS."
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId",
        "range",
        "values"
      ]
    }
  • createSheet

    write

    Add a new tab (sheet) to an existing spreadsheet.

    Required paramsspreadsheetIdtitle
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "title": {
          "type": "string",
          "description": "Tab title."
        },
        "gridProperties": {
          "type": "object",
          "properties": {
            "rowCount": {
              "type": "number"
            },
            "columnCount": {
              "type": "number"
            },
            "frozenRowCount": {
              "type": "number"
            },
            "frozenColumnCount": {
              "type": "number"
            }
          },
          "additionalProperties": true,
          "description": "Optional grid sizing (rowCount, columnCount, frozenRowCount, frozenColumnCount)."
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId",
        "title"
      ]
    }
  • formatRange

    unknown

    Apply formatting (textFormat, backgroundColor, alignment, numberFormat) to a cell range. Range MUST use A1 notation including the sheet name (e.g. "Sheet1!A1:D1") — the handler resolves the sheet name to its sheetId automatically.

    Required paramsspreadsheetIdrangeformat
    Input schema
    {
      "type": "object",
      "properties": {
        "spreadsheetId": {
          "type": "string",
          "description": "Google Sheets spreadsheet ID."
        },
        "range": {
          "type": "string",
          "description": "A1 range with sheet name, e.g. \"Sheet1!A1:D1\"."
        },
        "format": {
          "type": "object",
          "properties": {
            "backgroundColor": {
              "type": "object",
              "properties": {
                "red": {
                  "type": "number"
                },
                "green": {
                  "type": "number"
                },
                "blue": {
                  "type": "number"
                },
                "alpha": {
                  "type": "number"
                }
              },
              "additionalProperties": false
            },
            "textFormat": {
              "type": "object",
              "properties": {
                "bold": {
                  "type": "boolean"
                },
                "italic": {
                  "type": "boolean"
                },
                "fontSize": {
                  "type": "number"
                },
                "foregroundColor": {
                  "type": "object",
                  "properties": {
                    "red": {
                      "type": "number"
                    },
                    "green": {
                      "type": "number"
                    },
                    "blue": {
                      "type": "number"
                    },
                    "alpha": {
                      "type": "number"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "horizontalAlignment": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "LEFT"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "CENTER"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "RIGHT"
                  ]
                }
              ]
            },
            "verticalAlignment": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "TOP"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "MIDDLE"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "BOTTOM"
                  ]
                }
              ]
            },
            "numberFormat": {
              "type": "object",
              "properties": {
                "type": {
                  "oneOf": [
                    {
                      "type": "string",
                      "enum": [
                        "TEXT"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "NUMBER"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "PERCENT"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "CURRENCY"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "DATE"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "TIME"
                      ]
                    },
                    {
                      "type": "string",
                      "enum": [
                        "DATE_TIME"
                      ]
                    }
                  ]
                },
                "pattern": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": true,
          "description": "CellFormat. Common keys: textFormat:{bold,italic,fontSize,foregroundColor}, backgroundColor:{red,green,blue}, horizontalAlignment, numberFormat."
        }
      },
      "additionalProperties": true,
      "required": [
        "spreadsheetId",
        "range",
        "format"
      ]
    }