What can you do with it?

Google Sheets allows you to create and modify spreadsheets programmatically. You can create new spreadsheets, add and manage sheets (tabs), read and update cell values, clear data ranges, copy formatting between sheets, and create pivot tables. This integration is perfect for data automation, report generation, and spreadsheet management workflows. For listing all spreadsheets, you’ll need to use the Google Drive integration.

How to use it?

Basic Command Structure

/your-Google-Sheets-connection [action] [required-parameters] [optional-parameters]

Parameters

Required:

  • action - The operation to perform on spreadsheets

Tools

Get Spreadsheet Info

Retrieve information about a spreadsheet including sheets and properties

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet

Example:

/your-Google-Sheets-connection
action: get-spreadsheet-info
spreadsheet-id: 1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE

Response:

{
  "spreadsheetId": "1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE",
  "properties": {
    "title": "Expense report"
  },
  "sheets": [
    {
      "properties": {
        "sheetId": 1483315145,
        "title": "Expense report"
      }
    }
  ]
}

Read Sheet Data

Get data from a specific range in a sheet

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet
  • sheet-name (required) - Name of the sheet/tab
  • range (required) - Cell range to read (e.g., “A1:Z100” or “1:1” for first row)

Example:

/your-Google-Sheets-connection
action: read-data
spreadsheet-id: 1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE
sheet-name: Expense report
range: A1:D10

Response:

{
  "range": "Expense report!A1:D10",
  "values": [
    ["HEADER1", "HEADER2", "HEADER3", "HEADER4"],
    ["1", "Who is the manager of Coldplay?", "ROSTR-ARTIST", "PENDING"],
    ["2", "Who is the manager of Metallica?", "ROSTR-ARTIST", "PENDING"]
  ]
}

Update Sheet Data

Update values in a specific range

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet
  • sheet-name (required) - Name of the sheet/tab
  • range (required) - Cell range to update
  • values (required) - Data to write (as a 2D array)

Example:

/your-Google-Sheets-connection
action: update-data
spreadsheet-id: 1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE
sheet-name: Expense report
range: A1:B2
values: [["Name", "Amount"], ["Office Supplies", "150.00"]]

Response:

{
  "spreadsheetId": "1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE",
  "updatedRange": "Expense report!A1:B2",
  "updatedRows": 2,
  "updatedColumns": 2,
  "updatedCells": 4
}

Clear Data

Clear values from a specific range

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet
  • sheet-name (required) - Name of the sheet/tab
  • range (required) - Cell range to clear

Example:

/your-Google-Sheets-connection
action: clear-data
spreadsheet-id: 1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE
sheet-name: Expense report
range: A1:K30

Response:

{
  "spreadsheetId": "1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE",
  "clearedRange": "Expense report!A1:K30"
}

Create New Sheet

Add a new sheet (tab) to an existing spreadsheet

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet
  • sheet-name (required) - Name for the new sheet

Example:

/your-Google-Sheets-connection
action: create-sheet
spreadsheet-id: 1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE
sheet-name: Q4 Report

Response:

{
  "spreadsheetId": "1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE",
  "replies": [
    {
      "addSheet": {
        "properties": {
          "sheetId": 1539677652,
          "title": "Q4 Report",
          "index": 3
        }
      }
    }
  ]
}

Create Spreadsheet

Create a new Google Sheets spreadsheet

Parameters:

  • title (required) - Title for the new spreadsheet

Example:

/your-Google-Sheets-connection
action: create-spreadsheet
title: Annual Budget 2024

Response:

{
  "spreadsheetId": "1iexMDwcCjFWHWehe59rXQTv8i8fYoUuiJm1kEsJUKo0",
  "properties": {
    "title": "Annual Budget 2024"
  },
  "sheets": [
    {
      "properties": {
        "sheetId": 0,
        "title": "Sheet1"
      }
    }
  ],
  "spreadsheetUrl": "https://docs.google.com/spreadsheets/d/1iexMDwcCjFWHWehe59rXQTv8i8fYoUuiJm1kEsJUKo0/edit"
}

Copy Format

Copy formatting from one range to another

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet
  • source-sheet-id (required) - Sheet ID of the source
  • destination-sheet-id (required) - Sheet ID of the destination
  • source-range (optional) - Source range boundaries
  • destination-range (optional) - Destination range boundaries

Example:

/your-Google-Sheets-connection
action: copy-format
spreadsheet-id: 1gstIO5p3YjuOqAIP1PzLGdm6YtL1dI0lXjPiFNqcfKQ
source-sheet-id: 1483315145
destination-sheet-id: 1539677652

Response:

{
  "spreadsheetId": "1gstIO5p3YjuOqAIP1PzLGdm6YtL1dI0lXjPiFNqcfKQ",
  "replies": [{}]
}

Create Pivot Table

Create a pivot table from data

Parameters:

  • spreadsheet-id (required) - The ID of the spreadsheet
  • sheet-id (required) - Sheet ID where pivot table will be created
  • source-data (required) - Source data range
  • sort-order (optional) - Sort order (ASCENDING or DESCENDING)

Example:

/your-Google-Sheets-connection
action: create-pivot
spreadsheet-id: 1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE
sheet-id: 1539677652
source-data: A1:D100
sort-order: ASCENDING

Response:

{
  "spreadsheetId": "1tT6pLVw3yRe1ojY4kUyJ3zxc1Sd8UK7dkStnDEktLmE",
  "replies": [
    {
      "updateCells": {}
    }
  ]
}

Notes

To list all spreadsheets, use the Google Drive integration. Always fetch spreadsheet data first before performing operations. Never assume sheet IDs - retrieve them dynamically. When referring to “sheet,” it can mean either a specific tab within a spreadsheet or the entire spreadsheet. Range notation follows A1 notation (e.g., “A1:B10” or “Sheet1!A1:B10”).