Setup
- Go to Organization Settings > Connectors
- Click Add Connector and select Google Sheets
- Choose the access scope:
- Read only — Can read spreadsheet data
- Read and write — Can read and modify spreadsheet data
- Click Connect to Google to authorize access
- Select the spreadsheet you want to connect
major resource manage (CLI) or the web editor. Major generates a client in src/clients/.
Usage
Import the generated client and use the helper methods:Reading values
range— The A1 notation range to read (e.g.,Sheet1!A1:D10)operationName— A name for logging and debuggingoptions— Optional settings likevalueRenderOption
FORMATTED_VALUE— Values as they appear in the UI (with formatting)UNFORMATTED_VALUE— Raw values without formattingFORMULA— Formulas instead of calculated values
Appending rows
range— The range to append to (rows are added after existing data)values— 2D array of values to appendoperationName— A name for logging and debuggingoptions— Optional settings likevalueInputOption
USER_ENTERED— Values are parsed as if typed by a user (dates, numbers, formulas)RAW— Values are stored exactly as provided
Updating values
range— The range to updatevalues— 2D array of new valuesoperationName— A name for logging and debuggingoptions— Optional settings
Batch reading
Read multiple ranges in a single request:Low-level API
For operations not covered by helper methods, useinvoke() directly:
Supported API paths
The spreadsheet ID is configured in the resource and does not need to be included in API paths.
Error handling
Common errors
Scope and permissions
When creating the resource, you choose between:- Read only —
GETrequests only - Read and write — Full read/write access