[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FGVH85G9CCN8KKFETMZP57":3,"skill-same:01M6FGVH85G9CCN8KKFETMZP57":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":6,"ownerHtmlUrl":65,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":66,"install":67,"resources":80},"01M6FGVH85G9CCN8KKFETMZP57","google-sheets",null,"Google Sheets API integration with managed OAuth. Read and write spreadsheet data, create sheets, apply formatting, and manage ranges. Use this skill when users want to read from or write to Google Sheets. For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fgoogle-sheets\u002FSKILL.md",[17,22,25],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000004","电子表格","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"google sheets","google","api","apps","formatting","gateway skill","maton","api integration","manage","write","read","access","spreadsheet","api-gateway","data","network","gateway","create","valid","clawhub","2026-11-10 10:12:30",false,"---\nname: google-sheets\ndescription: |\n  Google Sheets API integration with managed OAuth. Read and write spreadsheet data, create sheets, apply formatting, and manage ranges. Use this skill when users want to read from or write to Google Sheets. For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\ncompatibility: Requires network access and valid Maton API key\nmetadata:\n  author: maton\n  version: \"1.0\"\n---\n\n# 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\n## Quick Start\n\n```bash\n# Read values from a spreadsheet (note: range is URL-encoded)\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1%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```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002F{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\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n## Connection Management\n\nManage your Google OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?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```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-sheets'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{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\n**Response:**\n```json\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:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"google-sheets\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{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```\n\n### Specifying Connection\n\nIf you have multiple Google accounts connected, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_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\n## API Reference\n\n### Get Spreadsheet Metadata\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\n```\n\n### Get Values\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}\n```\n\nExample:\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1%21A1%3AD10\n```\n\n### Get Multiple Ranges\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues:batchGet?ranges=Sheet1%21A1%3AB10&ranges=Sheet2%21A1%3AC5\n```\n\n### Update Values\n\n```bash\nPUT \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}?valueInputOption=USER_ENTERED\nContent-Type: application\u002Fjson\n\n{\n  \"values\": [\n    [\"A1\", \"B1\", \"C1\"],\n    [\"A2\", \"B2\", \"C2\"]\n  ]\n}\n```\n\n### Append Values\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}:append?valueInputOption=USER_ENTERED\nContent-Type: application\u002Fjson\n\n{\n  \"values\": [\n    [\"New Row 1\", \"Data\", \"More Data\"],\n    [\"New Row 2\", \"Data\", \"More Data\"]\n  ]\n}\n```\n\n### Batch Update Values\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues:batchUpdate\nContent-Type: application\u002Fjson\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```\n\n### Clear Values\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}:clear\n```\n\n### Create Spreadsheet\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\nContent-Type: application\u002Fjson\n\n{\n  \"properties\": {\"title\": \"New Spreadsheet\"},\n  \"sheets\": [{\"properties\": {\"title\": \"Sheet1\"}}]\n}\n```\n\n### Batch Update (formatting, add sheets, etc.)\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}:batchUpdate\nContent-Type: application\u002Fjson\n\n{\n  \"requests\": [\n    {\"addSheet\": {\"properties\": {\"title\": \"New Sheet\"}}}\n  ]\n}\n```\n\n## Common batchUpdate Requests\n\n### Update Cells with Formatting\n\n```json\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```\n\n### Format Header Row (Bold + Background Color)\n\n```json\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```\n\n### Auto-Resize Columns\n\n```json\n{\n  \"autoResizeDimensions\": {\n    \"dimensions\": {\"sheetId\": 0, \"dimension\": \"COLUMNS\", \"startIndex\": 0, \"endIndex\": 3}\n  }\n}\n```\n\n### Rename Sheet\n\n```json\n{\n  \"updateSheetProperties\": {\n    \"properties\": {\"sheetId\": 0, \"title\": \"NewName\"},\n    \"fields\": \"title\"\n  }\n}\n```\n\n### Insert Rows\u002FColumns\n\n```json\n{\n  \"insertDimension\": {\n    \"range\": {\"sheetId\": 0, \"dimension\": \"ROWS\", \"startIndex\": 1, \"endIndex\": 3},\n    \"inheritFromBefore\": true\n  }\n}\n```\n\n### Sort Range\n\n```json\n{\n  \"sortRange\": {\n    \"range\": {\"sheetId\": 0, \"startRowIndex\": 1, \"endRowIndex\": 10, \"startColumnIndex\": 0, \"endColumnIndex\": 3},\n    \"sortSpecs\": [{\"dimensionIndex\": 1, \"sortOrder\": \"DESCENDING\"}]\n  }\n}\n```\n\n### Add Filter\n\n```json\n{\n  \"setBasicFilter\": {\n    \"filter\": {\n      \"range\": {\"sheetId\": 0, \"startRowIndex\": 0, \"endRowIndex\": 100, \"startColumnIndex\": 0, \"endColumnIndex\": 5}\n    }\n  }\n}\n```\n\n### Delete Sheet\n\n```json\n{\n  \"deleteSheet\": {\"sheetId\": 123456789}\n}\n```\n\n## Value Input Options\n\n- `RAW` - Values are stored as-is\n- `USER_ENTERED` - Values are parsed as if typed into the UI (formulas executed, numbers parsed)\n\n## Range Notation\n\n- `Sheet1!A1:D10` - Specific range\n- `Sheet1!A:D` - Entire columns A through D\n- `Sheet1!1:10` - Entire rows 1 through 10\n- `Sheet1` - Entire sheet\n- `A1:D10` - Range in first sheet\n\n## Code Examples\n\n### JavaScript\n\n```javascript\n\u002F\u002F Read values\nconst response = await fetch(\n  'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!A1:D10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\n\n\u002F\u002F Write values\nawait fetch(\n  'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!A1:B2?valueInputOption=USER_ENTERED',\n  {\n    method: 'PUT',\n    headers: {\n      'Content-Type': 'application\u002Fjson',\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    },\n    body: JSON.stringify({\n      values: [['A1', 'B1'], ['A2', 'B2']]\n    })\n  }\n);\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\n# Read values\nresponse = requests.get(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!A1:D10',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\n\n# Write values\nresponse = requests.put(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!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```\n\n## Notes\n\n- When using curl, ranges in URL paths must be URL-encoded (! -> %21, : -> %3A). JavaScript fetch and Python requests handle encoding automatically.\n- Use `valueInputOption=USER_ENTERED` to parse formulas and numbers\n- Delete spreadsheets via the Google Drive API, not Sheets API\n- Sheet IDs are numeric and found in the spreadsheet metadata\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets (`fields[]`, `sort[]`, `records[]`) to disable glob parsing\n- IMPORTANT: 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.\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Missing Google Sheets connection |\n| 401 | Invalid or missing Maton API key |\n| 429 | Rate limited (10 req\u002Fsec per account) |\n| 4xx\u002F5xx | Passthrough error from Google Sheets API |\n\n### Troubleshooting: Invalid API Key\n\n**When you receive a \"Invalid API key\" error, ALWAYS follow these steps before concluding there is an issue:**\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\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\n## Resources\n\n- [Sheets API Overview](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest)\n- [Get Spreadsheet](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002Fget)\n- [Create Spreadsheet](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002Fcreate)\n- [Batch Update](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002FbatchUpdate)\n- [Batch Update Request Types](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002Frequest)\n- [Get Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002Fget)\n- [Update Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002Fupdate)\n- [Append Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002Fappend)\n- [Batch Get Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002FbatchGet)\n- [Batch Update Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002FbatchUpdate)\n","# 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\n## Quick Start\n\n```bash\n# Read values from a spreadsheet (note: range is URL-encoded)\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1%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```\n\n## Base URL\n\n```\nhttps:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002F{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\n## Authentication\n\nAll requests require the Maton API key in the Authorization header:\n\n```\nAuthorization: Bearer $MATON_API_KEY\n```\n\n**Environment Variable:** Set your API key as `MATON_API_KEY`:\n\n```bash\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n```\n\n### Getting Your API Key\n\n1. Sign in or create an account at [maton.ai](https:\u002F\u002Fmaton.ai)\n2. Go to [maton.ai\u002Fsettings](https:\u002F\u002Fmaton.ai\u002Fsettings)\n3. Copy your API key\n\n## Connection Management\n\nManage your Google OAuth connections at `https:\u002F\u002Fctrl.maton.ai`.\n\n### List Connections\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections?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```\n\n### Create Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'google-sheets'}).encode()\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application\u002Fjson')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n```\n\n### Get Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{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\n**Response:**\n```json\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:\u002F\u002Fconnect.maton.ai\u002F?session_token=...\",\n    \"app\": \"google-sheets\",\n    \"metadata\": {}\n  }\n}\n```\n\nOpen the returned `url` in a browser to complete OAuth authorization.\n\n### Delete Connection\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections\u002F{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```\n\n### Specifying Connection\n\nIf you have multiple Google accounts connected, specify which one to use with the `Maton-Connection` header:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_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\n## API Reference\n\n### Get Spreadsheet Metadata\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\n```\n\n### Get Values\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}\n```\n\nExample:\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1%21A1%3AD10\n```\n\n### Get Multiple Ranges\n\n```bash\nGET \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues:batchGet?ranges=Sheet1%21A1%3AB10&ranges=Sheet2%21A1%3AC5\n```\n\n### Update Values\n\n```bash\nPUT \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}?valueInputOption=USER_ENTERED\nContent-Type: application\u002Fjson\n\n{\n  \"values\": [\n    [\"A1\", \"B1\", \"C1\"],\n    [\"A2\", \"B2\", \"C2\"]\n  ]\n}\n```\n\n### Append Values\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}:append?valueInputOption=USER_ENTERED\nContent-Type: application\u002Fjson\n\n{\n  \"values\": [\n    [\"New Row 1\", \"Data\", \"More Data\"],\n    [\"New Row 2\", \"Data\", \"More Data\"]\n  ]\n}\n```\n\n### Batch Update Values\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues:batchUpdate\nContent-Type: application\u002Fjson\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```\n\n### Clear Values\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}\u002Fvalues\u002F{range}:clear\n```\n\n### Create Spreadsheet\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\nContent-Type: application\u002Fjson\n\n{\n  \"properties\": {\"title\": \"New Spreadsheet\"},\n  \"sheets\": [{\"properties\": {\"title\": \"Sheet1\"}}]\n}\n```\n\n### Batch Update (formatting, add sheets, etc.)\n\n```bash\nPOST \u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002F{spreadsheetId}:batchUpdate\nContent-Type: application\u002Fjson\n\n{\n  \"requests\": [\n    {\"addSheet\": {\"properties\": {\"title\": \"New Sheet\"}}}\n  ]\n}\n```\n\n## Common batchUpdate Requests\n\n### Update Cells with Formatting\n\n```json\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```\n\n### Format Header Row (Bold + Background Color)\n\n```json\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```\n\n### Auto-Resize Columns\n\n```json\n{\n  \"autoResizeDimensions\": {\n    \"dimensions\": {\"sheetId\": 0, \"dimension\": \"COLUMNS\", \"startIndex\": 0, \"endIndex\": 3}\n  }\n}\n```\n\n### Rename Sheet\n\n```json\n{\n  \"updateSheetProperties\": {\n    \"properties\": {\"sheetId\": 0, \"title\": \"NewName\"},\n    \"fields\": \"title\"\n  }\n}\n```\n\n### Insert Rows\u002FColumns\n\n```json\n{\n  \"insertDimension\": {\n    \"range\": {\"sheetId\": 0, \"dimension\": \"ROWS\", \"startIndex\": 1, \"endIndex\": 3},\n    \"inheritFromBefore\": true\n  }\n}\n```\n\n### Sort Range\n\n```json\n{\n  \"sortRange\": {\n    \"range\": {\"sheetId\": 0, \"startRowIndex\": 1, \"endRowIndex\": 10, \"startColumnIndex\": 0, \"endColumnIndex\": 3},\n    \"sortSpecs\": [{\"dimensionIndex\": 1, \"sortOrder\": \"DESCENDING\"}]\n  }\n}\n```\n\n### Add Filter\n\n```json\n{\n  \"setBasicFilter\": {\n    \"filter\": {\n      \"range\": {\"sheetId\": 0, \"startRowIndex\": 0, \"endRowIndex\": 100, \"startColumnIndex\": 0, \"endColumnIndex\": 5}\n    }\n  }\n}\n```\n\n### Delete Sheet\n\n```json\n{\n  \"deleteSheet\": {\"sheetId\": 123456789}\n}\n```\n\n## Value Input Options\n\n- `RAW` - Values are stored as-is\n- `USER_ENTERED` - Values are parsed as if typed into the UI (formulas executed, numbers parsed)\n\n## Range Notation\n\n- `Sheet1!A1:D10` - Specific range\n- `Sheet1!A:D` - Entire columns A through D\n- `Sheet1!1:10` - Entire rows 1 through 10\n- `Sheet1` - Entire sheet\n- `A1:D10` - Range in first sheet\n\n## Code Examples\n\n### JavaScript\n\n```javascript\n\u002F\u002F Read values\nconst response = await fetch(\n  'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!A1:D10',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\n\n\u002F\u002F Write values\nawait fetch(\n  'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!A1:B2?valueInputOption=USER_ENTERED',\n  {\n    method: 'PUT',\n    headers: {\n      'Content-Type': 'application\u002Fjson',\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    },\n    body: JSON.stringify({\n      values: [['A1', 'B1'], ['A2', 'B2']]\n    })\n  }\n);\n```\n\n### Python\n\n```python\nimport os\nimport requests\n\n# Read values\nresponse = requests.get(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!A1:D10',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\n\n# Write values\nresponse = requests.put(\n    'https:\u002F\u002Fgateway.maton.ai\u002Fgoogle-sheets\u002Fv4\u002Fspreadsheets\u002FSHEET_ID\u002Fvalues\u002FSheet1!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```\n\n## Notes\n\n- When using curl, ranges in URL paths must be URL-encoded (! -> %21, : -> %3A). JavaScript fetch and Python requests handle encoding automatically.\n- Use `valueInputOption=USER_ENTERED` to parse formulas and numbers\n- Delete spreadsheets via the Google Drive API, not Sheets API\n- Sheet IDs are numeric and found in the spreadsheet metadata\n- IMPORTANT: When using curl commands, use `curl -g` when URLs contain brackets (`fields[]`, `sort[]`, `records[]`) to disable glob parsing\n- IMPORTANT: 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.\n\n## Error Handling\n\n| Status | Meaning |\n|--------|---------|\n| 400 | Missing Google Sheets connection |\n| 401 | Invalid or missing Maton API key |\n| 429 | Rate limited (10 req\u002Fsec per account) |\n| 4xx\u002F5xx | Passthrough error from Google Sheets API |\n\n### Troubleshooting: Invalid API Key\n\n**When you receive a \"Invalid API key\" error, ALWAYS follow these steps before concluding there is an issue:**\n\n1. Check that the `MATON_API_KEY` environment variable is set:\n\n```bash\necho $MATON_API_KEY\n```\n\n2. Verify the API key is valid by listing connections:\n\n```bash\npython \u003C\u003C'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https:\u002F\u002Fctrl.maton.ai\u002Fconnections')\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\n## Resources\n\n- [Sheets API Overview](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest)\n- [Get Spreadsheet](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002Fget)\n- [Create Spreadsheet](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002Fcreate)\n- [Batch Update](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002FbatchUpdate)\n- [Batch Update Request Types](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets\u002Frequest)\n- [Get Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002Fget)\n- [Update Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002Fupdate)\n- [Append Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002Fappend)\n- [Batch Get Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002FbatchGet)\n- [Batch Update Values](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fsheets\u002Fapi\u002Freference\u002Frest\u002Fv4\u002Fspreadsheets.values\u002FbatchUpdate)\n",{"name":5,"metadata":56,"description":58,"compatibility":59},{"author":37,"version":57},"1.0","Google Sheets API integration with managed OAuth. Read and write spreadsheet data, create sheets, apply formatting, and manage ranges. Use this skill when users want to read from or write to Google Sheets. For other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\n","Requires network access and valid Maton API key","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fbyungkyu\u002Fgoogle-sheets",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add kbarbel640-del\u002Fskills --skill google-sheets",{"tool":73,"command":74},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill google-sheets",{"tool":76,"command":77},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill google-sheets","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fgoogle-sheets\u002FSKILL.md",true,[81,87],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"_meta.json","REFERENCE","参考文档",634,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fgoogle-sheets\u002F_meta.json",{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"LICENSE.txt","LICENSE","许可证",1072,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fbyungkyu\u002Fgoogle-sheets\u002FLICENSE.txt",[94,122,148,168,174,194],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":103,"publishedAt":51},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[100],{"categoryNo":101,"categoryName":102,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000036","内容创作者",[104,105,33,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"crowd prompting","prompting","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":131,"publishedAt":51},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[128],{"categoryNo":129,"categoryName":130,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[132,33,133,134,135,136,48,137,138,139,140,141,142,143,144,145,146,110,147],"dilemm ai","arena","analyze","browser","openclaw agent","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":157,"publishedAt":51},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[154],{"categoryNo":155,"categoryName":156,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",[158,159,160,161,162,163,164,106,165,145,147,41,33,166,167],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","http","via",{"skillNo":169,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":170,"categories":171,"keywords":173,"publishedAt":51},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[172],{"categoryNo":155,"categoryName":156,"taxonomyType":20,"taxonomyTypeDesc":21},[161,160,159,158,167,163,164,106,162,145,147,165,41,33,166],{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":51},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[181,182,183,184,185,186,187,188,189,190,191,192,193],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":195,"name":196,"nameZh":6,"description":197,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":198,"categories":199,"keywords":204,"publishedAt":51},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[200,201],{"categoryNo":129,"categoryName":130,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":202,"categoryName":203,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000037","律师与法务",[205,206,207,208,106,209,210,60,211,41,212,213,214,215,216,119,217,218,219],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]