{
  "schemaVersion": "1.0",
  "item": {
    "slug": "google-sheets",
    "name": "Google Sheets",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/byungkyu/google-sheets",
    "canonicalUrl": "https://clawhub.ai/byungkyu/google-sheets",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/google-sheets",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-sheets",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "LICENSE.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "google-sheets",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T01:54:17.854Z",
      "expiresAt": "2026-05-07T01:54:17.854Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-sheets",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-sheets",
        "contentDisposition": "attachment; filename=\"google-sheets-1.0.6.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "google-sheets"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/google-sheets"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/google-sheets",
    "agentPageUrl": "https://openagent3.xyz/skills/google-sheets/agent",
    "manifestUrl": "https://openagent3.xyz/skills/google-sheets/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/google-sheets/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Google Sheets",
        "body": "Access the Google Sheets API with managed OAuth authentication. Read and write spreadsheet values, create sheets, apply formatting, and perform batch operations."
      },
      {
        "title": "Quick Start",
        "body": "# Read values from a spreadsheet (note: range is URL-encoded)\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/google-sheets/v4/spreadsheets/SPREADSHEET_ID/values/Sheet1%21A1%3AD10')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Base URL",
        "body": "https://gateway.maton.ai/google-sheets/{native-api-path}\n\nReplace {native-api-path} with the actual Google Sheets API endpoint path. The gateway proxies requests to sheets.googleapis.com and automatically injects your OAuth token."
      },
      {
        "title": "Authentication",
        "body": "All requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\""
      },
      {
        "title": "Getting Your API Key",
        "body": "Sign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key"
      },
      {
        "title": "Connection Management",
        "body": "Manage your Google OAuth connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-sheets&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Create Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-sheets'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Get Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"google-sheets\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete OAuth authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Specifying Connection",
        "body": "If you have multiple Google accounts connected, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/google-sheets/v4/spreadsheets/SPREADSHEET_ID')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "Get Spreadsheet Metadata",
        "body": "GET /google-sheets/v4/spreadsheets/{spreadsheetId}"
      },
      {
        "title": "Get Values",
        "body": "GET /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}\n\nExample:\n\nGET /google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1%21A1%3AD10"
      },
      {
        "title": "Get Multiple Ranges",
        "body": "GET /google-sheets/v4/spreadsheets/{spreadsheetId}/values:batchGet?ranges=Sheet1%21A1%3AB10&ranges=Sheet2%21A1%3AC5"
      },
      {
        "title": "Update Values",
        "body": "PUT /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}?valueInputOption=USER_ENTERED\nContent-Type: application/json\n\n{\n  \"values\": [\n    [\"A1\", \"B1\", \"C1\"],\n    [\"A2\", \"B2\", \"C2\"]\n  ]\n}"
      },
      {
        "title": "Append Values",
        "body": "POST /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}:append?valueInputOption=USER_ENTERED\nContent-Type: application/json\n\n{\n  \"values\": [\n    [\"New Row 1\", \"Data\", \"More Data\"],\n    [\"New Row 2\", \"Data\", \"More Data\"]\n  ]\n}"
      },
      {
        "title": "Batch Update Values",
        "body": "POST /google-sheets/v4/spreadsheets/{spreadsheetId}/values:batchUpdate\nContent-Type: application/json\n\n{\n  \"valueInputOption\": \"USER_ENTERED\",\n  \"data\": [\n    {\"range\": \"Sheet1!A1:B2\", \"values\": [[\"A1\", \"B1\"], [\"A2\", \"B2\"]]},\n    {\"range\": \"Sheet1!D1:E2\", \"values\": [[\"D1\", \"E1\"], [\"D2\", \"E2\"]]}\n  ]\n}"
      },
      {
        "title": "Clear Values",
        "body": "POST /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}:clear"
      },
      {
        "title": "Create Spreadsheet",
        "body": "POST /google-sheets/v4/spreadsheets\nContent-Type: application/json\n\n{\n  \"properties\": {\"title\": \"New Spreadsheet\"},\n  \"sheets\": [{\"properties\": {\"title\": \"Sheet1\"}}]\n}"
      },
      {
        "title": "Batch Update (formatting, add sheets, etc.)",
        "body": "POST /google-sheets/v4/spreadsheets/{spreadsheetId}:batchUpdate\nContent-Type: application/json\n\n{\n  \"requests\": [\n    {\"addSheet\": {\"properties\": {\"title\": \"New Sheet\"}}}\n  ]\n}"
      },
      {
        "title": "Update Cells with Formatting",
        "body": "{\n  \"updateCells\": {\n    \"rows\": [\n      {\"values\": [{\"userEnteredValue\": {\"stringValue\": \"Name\"}}, {\"userEnteredValue\": {\"numberValue\": 100}}]}\n    ],\n    \"fields\": \"userEnteredValue\",\n    \"start\": {\"sheetId\": 0, \"rowIndex\": 0, \"columnIndex\": 0}\n  }\n}"
      },
      {
        "title": "Format Header Row (Bold + Background Color)",
        "body": "{\n  \"repeatCell\": {\n    \"range\": {\"sheetId\": 0, \"startRowIndex\": 0, \"endRowIndex\": 1, \"startColumnIndex\": 0, \"endColumnIndex\": 3},\n    \"cell\": {\n      \"userEnteredFormat\": {\n        \"backgroundColor\": {\"red\": 0.2, \"green\": 0.6, \"blue\": 0.9},\n        \"textFormat\": {\"bold\": true}\n      }\n    },\n    \"fields\": \"userEnteredFormat(backgroundColor,textFormat)\"\n  }\n}"
      },
      {
        "title": "Auto-Resize Columns",
        "body": "{\n  \"autoResizeDimensions\": {\n    \"dimensions\": {\"sheetId\": 0, \"dimension\": \"COLUMNS\", \"startIndex\": 0, \"endIndex\": 3}\n  }\n}"
      },
      {
        "title": "Rename Sheet",
        "body": "{\n  \"updateSheetProperties\": {\n    \"properties\": {\"sheetId\": 0, \"title\": \"NewName\"},\n    \"fields\": \"title\"\n  }\n}"
      },
      {
        "title": "Insert Rows/Columns",
        "body": "{\n  \"insertDimension\": {\n    \"range\": {\"sheetId\": 0, \"dimension\": \"ROWS\", \"startIndex\": 1, \"endIndex\": 3},\n    \"inheritFromBefore\": true\n  }\n}"
      },
      {
        "title": "Sort Range",
        "body": "{\n  \"sortRange\": {\n    \"range\": {\"sheetId\": 0, \"startRowIndex\": 1, \"endRowIndex\": 10, \"startColumnIndex\": 0, \"endColumnIndex\": 3},\n    \"sortSpecs\": [{\"dimensionIndex\": 1, \"sortOrder\": \"DESCENDING\"}]\n  }\n}"
      },
      {
        "title": "Add Filter",
        "body": "{\n  \"setBasicFilter\": {\n    \"filter\": {\n      \"range\": {\"sheetId\": 0, \"startRowIndex\": 0, \"endRowIndex\": 100, \"startColumnIndex\": 0, \"endColumnIndex\": 5}\n    }\n  }\n}"
      },
      {
        "title": "Delete Sheet",
        "body": "{\n  \"deleteSheet\": {\"sheetId\": 123456789}\n}"
      },
      {
        "title": "Value Input Options",
        "body": "RAW - Values are stored as-is\nUSER_ENTERED - Values are parsed as if typed into the UI (formulas executed, numbers parsed)"
      },
      {
        "title": "Range Notation",
        "body": "Sheet1!A1:D10 - Specific range\nSheet1!A:D - Entire columns A through D\nSheet1!1:10 - Entire rows 1 through 10\nSheet1 - Entire sheet\nA1:D10 - Range in first sheet"
      },
      {
        "title": "JavaScript",
        "body": "// Read values\nconst response = await fetch(\n  'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:D10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\n\n// Write values\nawait fetch(\n  'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:B2?valueInputOption=USER_ENTERED',\n  {\n    method: 'PUT',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    },\n    body: JSON.stringify({\n      values: [['A1', 'B1'], ['A2', 'B2']]\n    })\n  }\n);"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\n# Read values\nresponse = requests.get(\n    'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:D10',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\n\n# Write values\nresponse = requests.put(\n    'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:B2',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'valueInputOption': 'USER_ENTERED'},\n    json={'values': [['A1', 'B1'], ['A2', 'B2']]}\n)"
      },
      {
        "title": "Notes",
        "body": "When using curl, ranges in URL paths must be URL-encoded (! -> %21, : -> %3A). JavaScript fetch and Python requests handle encoding automatically.\nUse valueInputOption=USER_ENTERED to parse formulas and numbers\nDelete spreadsheets via the Google Drive API, not Sheets API\nSheet IDs are numeric and found in the spreadsheet metadata\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get \"Invalid API key\" errors when piping."
      },
      {
        "title": "Error Handling",
        "body": "StatusMeaning400Missing Google Sheets connection401Invalid or missing Maton API key429Rate limited (10 req/sec per account)4xx/5xxPassthrough error from Google Sheets API"
      },
      {
        "title": "Troubleshooting: API Key Issues",
        "body": "Check that the MATON_API_KEY environment variable is set:\n\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Troubleshooting: Invalid App Name",
        "body": "Ensure your URL path starts with google-sheets. For example:\n\nCorrect: https://gateway.maton.ai/google-sheets/v4/spreadsheets/SPREADSHEET_ID\nIncorrect: https://gateway.maton.ai/v4/spreadsheets/SPREADSHEET_ID"
      },
      {
        "title": "Resources",
        "body": "Sheets API Overview\nGet Spreadsheet\nCreate Spreadsheet\nBatch Update\nBatch Update Request Types\nGet Values\nUpdate Values\nAppend Values\nBatch Get Values\nBatch Update Values\nMaton Community\nMaton Support"
      }
    ],
    "body": "Google Sheets\n\nAccess the Google Sheets API with managed OAuth authentication. Read and write spreadsheet values, create sheets, apply formatting, and perform batch operations.\n\nQuick Start\n# Read values from a spreadsheet (note: range is URL-encoded)\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/google-sheets/v4/spreadsheets/SPREADSHEET_ID/values/Sheet1%21A1%3AD10')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nBase URL\nhttps://gateway.maton.ai/google-sheets/{native-api-path}\n\n\nReplace {native-api-path} with the actual Google Sheets API endpoint path. The gateway proxies requests to sheets.googleapis.com and automatically injects your OAuth token.\n\nAuthentication\n\nAll requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n\nGetting Your API Key\nSign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key\nConnection Management\n\nManage your Google OAuth connections at https://ctrl.maton.ai.\n\nList Connections\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-sheets&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nCreate Connection\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-sheets'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nGet Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"google-sheets\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete OAuth authorization.\n\nDelete Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nSpecifying Connection\n\nIf you have multiple Google accounts connected, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/google-sheets/v4/spreadsheets/SPREADSHEET_ID')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\nAPI Reference\nGet Spreadsheet Metadata\nGET /google-sheets/v4/spreadsheets/{spreadsheetId}\n\nGet Values\nGET /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}\n\n\nExample:\n\nGET /google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1%21A1%3AD10\n\nGet Multiple Ranges\nGET /google-sheets/v4/spreadsheets/{spreadsheetId}/values:batchGet?ranges=Sheet1%21A1%3AB10&ranges=Sheet2%21A1%3AC5\n\nUpdate Values\nPUT /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}?valueInputOption=USER_ENTERED\nContent-Type: application/json\n\n{\n  \"values\": [\n    [\"A1\", \"B1\", \"C1\"],\n    [\"A2\", \"B2\", \"C2\"]\n  ]\n}\n\nAppend Values\nPOST /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}:append?valueInputOption=USER_ENTERED\nContent-Type: application/json\n\n{\n  \"values\": [\n    [\"New Row 1\", \"Data\", \"More Data\"],\n    [\"New Row 2\", \"Data\", \"More Data\"]\n  ]\n}\n\nBatch Update Values\nPOST /google-sheets/v4/spreadsheets/{spreadsheetId}/values:batchUpdate\nContent-Type: application/json\n\n{\n  \"valueInputOption\": \"USER_ENTERED\",\n  \"data\": [\n    {\"range\": \"Sheet1!A1:B2\", \"values\": [[\"A1\", \"B1\"], [\"A2\", \"B2\"]]},\n    {\"range\": \"Sheet1!D1:E2\", \"values\": [[\"D1\", \"E1\"], [\"D2\", \"E2\"]]}\n  ]\n}\n\nClear Values\nPOST /google-sheets/v4/spreadsheets/{spreadsheetId}/values/{range}:clear\n\nCreate Spreadsheet\nPOST /google-sheets/v4/spreadsheets\nContent-Type: application/json\n\n{\n  \"properties\": {\"title\": \"New Spreadsheet\"},\n  \"sheets\": [{\"properties\": {\"title\": \"Sheet1\"}}]\n}\n\nBatch Update (formatting, add sheets, etc.)\nPOST /google-sheets/v4/spreadsheets/{spreadsheetId}:batchUpdate\nContent-Type: application/json\n\n{\n  \"requests\": [\n    {\"addSheet\": {\"properties\": {\"title\": \"New Sheet\"}}}\n  ]\n}\n\nCommon batchUpdate Requests\nUpdate Cells with Formatting\n{\n  \"updateCells\": {\n    \"rows\": [\n      {\"values\": [{\"userEnteredValue\": {\"stringValue\": \"Name\"}}, {\"userEnteredValue\": {\"numberValue\": 100}}]}\n    ],\n    \"fields\": \"userEnteredValue\",\n    \"start\": {\"sheetId\": 0, \"rowIndex\": 0, \"columnIndex\": 0}\n  }\n}\n\nFormat Header Row (Bold + Background Color)\n{\n  \"repeatCell\": {\n    \"range\": {\"sheetId\": 0, \"startRowIndex\": 0, \"endRowIndex\": 1, \"startColumnIndex\": 0, \"endColumnIndex\": 3},\n    \"cell\": {\n      \"userEnteredFormat\": {\n        \"backgroundColor\": {\"red\": 0.2, \"green\": 0.6, \"blue\": 0.9},\n        \"textFormat\": {\"bold\": true}\n      }\n    },\n    \"fields\": \"userEnteredFormat(backgroundColor,textFormat)\"\n  }\n}\n\nAuto-Resize Columns\n{\n  \"autoResizeDimensions\": {\n    \"dimensions\": {\"sheetId\": 0, \"dimension\": \"COLUMNS\", \"startIndex\": 0, \"endIndex\": 3}\n  }\n}\n\nRename Sheet\n{\n  \"updateSheetProperties\": {\n    \"properties\": {\"sheetId\": 0, \"title\": \"NewName\"},\n    \"fields\": \"title\"\n  }\n}\n\nInsert Rows/Columns\n{\n  \"insertDimension\": {\n    \"range\": {\"sheetId\": 0, \"dimension\": \"ROWS\", \"startIndex\": 1, \"endIndex\": 3},\n    \"inheritFromBefore\": true\n  }\n}\n\nSort Range\n{\n  \"sortRange\": {\n    \"range\": {\"sheetId\": 0, \"startRowIndex\": 1, \"endRowIndex\": 10, \"startColumnIndex\": 0, \"endColumnIndex\": 3},\n    \"sortSpecs\": [{\"dimensionIndex\": 1, \"sortOrder\": \"DESCENDING\"}]\n  }\n}\n\nAdd Filter\n{\n  \"setBasicFilter\": {\n    \"filter\": {\n      \"range\": {\"sheetId\": 0, \"startRowIndex\": 0, \"endRowIndex\": 100, \"startColumnIndex\": 0, \"endColumnIndex\": 5}\n    }\n  }\n}\n\nDelete Sheet\n{\n  \"deleteSheet\": {\"sheetId\": 123456789}\n}\n\nValue Input Options\nRAW - Values are stored as-is\nUSER_ENTERED - Values are parsed as if typed into the UI (formulas executed, numbers parsed)\nRange Notation\nSheet1!A1:D10 - Specific range\nSheet1!A:D - Entire columns A through D\nSheet1!1:10 - Entire rows 1 through 10\nSheet1 - Entire sheet\nA1:D10 - Range in first sheet\nCode Examples\nJavaScript\n// Read values\nconst response = await fetch(\n  'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:D10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\n\n// Write values\nawait fetch(\n  'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:B2?valueInputOption=USER_ENTERED',\n  {\n    method: 'PUT',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    },\n    body: JSON.stringify({\n      values: [['A1', 'B1'], ['A2', 'B2']]\n    })\n  }\n);\n\nPython\nimport os\nimport requests\n\n# Read values\nresponse = requests.get(\n    'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:D10',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\n\n# Write values\nresponse = requests.put(\n    'https://gateway.maton.ai/google-sheets/v4/spreadsheets/SHEET_ID/values/Sheet1!A1:B2',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'},\n    params={'valueInputOption': 'USER_ENTERED'},\n    json={'values': [['A1', 'B1'], ['A2', 'B2']]}\n)\n\nNotes\nWhen using curl, ranges in URL paths must be URL-encoded (! -> %21, : -> %3A). JavaScript fetch and Python requests handle encoding automatically.\nUse valueInputOption=USER_ENTERED to parse formulas and numbers\nDelete spreadsheets via the Google Drive API, not Sheets API\nSheet IDs are numeric and found in the spreadsheet metadata\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get \"Invalid API key\" errors when piping.\nError Handling\nStatus\tMeaning\n400\tMissing Google Sheets connection\n401\tInvalid or missing Maton API key\n429\tRate limited (10 req/sec per account)\n4xx/5xx\tPassthrough error from Google Sheets API\nTroubleshooting: API Key Issues\nCheck that the MATON_API_KEY environment variable is set:\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nTroubleshooting: Invalid App Name\nEnsure your URL path starts with google-sheets. For example:\nCorrect: https://gateway.maton.ai/google-sheets/v4/spreadsheets/SPREADSHEET_ID\nIncorrect: https://gateway.maton.ai/v4/spreadsheets/SPREADSHEET_ID\nResources\nSheets API Overview\nGet Spreadsheet\nCreate Spreadsheet\nBatch Update\nBatch Update Request Types\nGet Values\nUpdate Values\nAppend Values\nBatch Get Values\nBatch Update Values\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/google-sheets",
    "publisherUrl": "https://clawhub.ai/byungkyu/google-sheets",
    "owner": "byungkyu",
    "version": "1.0.6",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/google-sheets",
    "downloadUrl": "https://openagent3.xyz/downloads/google-sheets",
    "agentUrl": "https://openagent3.xyz/skills/google-sheets/agent",
    "manifestUrl": "https://openagent3.xyz/skills/google-sheets/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/google-sheets/agent.md"
  }
}