Google Sheets Port
This is the reference integration for the Google Sheets API and Harbor's Action Model.
Google Sheets Port
Purpose
This is the reference integration for the Google Sheets API and Harbor's Action Model.
Use it when:
- building Google Sheets actions in Harbor
- extending the Dock / Hub Google Sheets entry
- teaching Codex or OpenClaw how to map a spreadsheet API into Harbor Ports and Harbor Actions without turning Harbor into a generic proxy
Harbor Port worksheet
Product
- Product: Google Sheets API
- Publisher slug:
google - Publisher name:
Google - Category:
Productivity - Tags:
google,sheets,spreadsheets,productivity,data
Safe Harbor Port metadata
- Kind:
http_api - Label:
Google Sheets API - Description:
Google Sheets API connection managed locally through Harbor. - Base URL:
https://sheets.googleapis.com/ - Auth mode:
header_token - Auth header name:
Authorization - Auth token prefix:
Bearer
Hidden local config
authToken
Harbor stores the token locally only. Dock / Hub manifests must never contain it.
Harbor action design notes
Google Sheets is a good Harbor fit when every action stays on fixed spreadsheet-scoped routes with typed input.path values for spreadsheetId and range.
Good Harbor Google Sheets actions:
GETreads for spreadsheet metadata and cell range values- bounded
POSTandPUTwrites for appending, overwriting, clearing, and batch-updating requestBodyMode: "none"for readsrequestBodyMode: "json"for bounded writesresultMode: "json_summary"for all starter actions- typed
input.pathvalues forspreadsheetIdandrangeon every action that needs them
Avoid for now:
- actions that accept an arbitrary
spreadsheetIdsupplied directly in a full URL batchGetvia query-string ranges arrays- developer metadata endpoints
- arbitrary range formatting surfaces with many optional parameters
- automatic publish of any write action
Starter Google Sheets actions
Automatic read actions
get-spreadsheet->GET /v4/spreadsheets/{spreadsheetId}read-range->GET /v4/spreadsheets/{spreadsheetId}/values/{range}
Approval-friendly write actions
append-row->POST /v4/spreadsheets/{spreadsheetId}/values/{range}:appendupdate-range->PUT /v4/spreadsheets/{spreadsheetId}/values/{range}clear-range->POST /v4/spreadsheets/{spreadsheetId}/values/{range}:clearbatch-update->POST /v4/spreadsheets/{spreadsheetId}:batchUpdate
Action Input Notes
Every action here uses at least input.path.spreadsheetId. Range-scoped actions also use input.path.range.
When running these actions, pass values like:
input.path.spreadsheetId:1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upmsinput.path.range:Sheet1!A1:D10
The colon in range strings (A1:D10) is a standard Sheets notation and is distinct from the :append / :clear / :batchUpdate custom method suffixes that Google appends to the route path. Harbor treats the custom method suffix as a literal part of the path template, and input.path.range remains the typed range input.
Why these actions
These routes fit Harbor's Action Model because they:
- stay under one fixed Sheets API origin
- use explicit named path inputs that operators supply at execution time
- keep inputs bounded and reviewable
- can be reviewed as named capabilities
- keep hidden auth entirely local to Harbor Node
Suggested operator workflow
- Import the Google Sheets Dock entry from Dock / Hub.
- Configure the local Google bearer token in Harbor Node with the
https://www.googleapis.com/auth/spreadsheetsscope. - Use
get-spreadsheetfirst to confirm the port is working and inspect available sheets. - Use
read-rangewith an explicit range such asSheet1!A1:Z1to verify read access. - Keep all write actions on
require_approvalunless there is a deliberate local policy reason not to.
Suggested agent workflow
- Inspect the existing Google Sheets Harbor Port.
- Inspect live actions and drafts.
- Propose additional fixed-path actions only.
- Validate and test drafts.
- Request publish instead of self-publishing unless Harbor explicitly allows it.
Agents must never:
- ask Harbor for the stored token
- edit hidden Google Sheets auth
- widen an action into a generic arbitrary proxy
Current update strategy
For now, Google Sheets updates are manual:
- update the Dock / Hub Google Sheets integration document in
apps/hub/catalog/integrations/google/google-sheets.json - bump the manifest version when the action set changes materially
- re-import into Harbor or create new drafts from the updated Dock entry
Official reference starting points
- Google Sheets API overview:
https://developers.google.com/sheets/api/reference/rest - Spreadsheets get:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get - Values get:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get - Values append:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append - Values update:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update - Values clear:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear - Spreadsheets batchUpdate:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate