Google Sheets Skill
Read and write data to Google Sheets spreadsheets.
Tool: google_sheets
Consolidated Google Sheets tool with operation parameter.
Operations
| Operation |
Description |
Required Fields |
read |
Read data from a range |
spreadsheet_id, range |
write |
Write data to a range |
spreadsheet_id, range, values |
append |
Append rows to a table |
spreadsheet_id, range, values |
read - Read spreadsheet data
| Field |
Type |
Required |
Description |
| operation |
string |
Yes |
Must be "read" |
| spreadsheet_id |
string |
Yes |
Spreadsheet ID from URL |
| range |
string |
Yes |
A1 notation range (e.g., "Sheet1!A1:D10") |
How to find Spreadsheet ID:
From URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit
Range Notation (A1):
Sheet1!A1:D10 - Specific range on Sheet1
Sheet1!A:D - Entire columns A through D
Sheet1!1:10 - Rows 1 through 10
A1:D10 - Default sheet, specific range
Sheet1 - Entire sheet
Example:
{
"operation": "read",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A1:E10"
}
write - Write data to a range
| Field |
Type |
Required |
Description |
| operation |
string |
Yes |
Must be "write" |
| spreadsheet_id |
string |
Yes |
Spreadsheet ID |
| range |
string |
Yes |
A1 notation range |
| values |
array |
Yes |
2D array of values |
| value_input_option |
string |
No |
"USER_ENTERED" or "RAW" (default: USER_ENTERED) |
Example - Write data:
{
"operation": "write",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A1:C3",
"values": [
["Name", "Score", "Grade"],
["Alice", 95, "A"],
["Bob", 87, "B"]
]
}
Example - Write formula:
{
"operation": "write",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!D2",
"values": [["=SUM(B2:C2)"]],
"value_input_option": "USER_ENTERED"
}
append - Append rows to a table
| Field |
Type |
Required |
Description |
| operation |
string |
Yes |
Must be "append" |
| spreadsheet_id |
string |
Yes |
Spreadsheet ID |
| range |
string |
Yes |
Table range (e.g., "Sheet1!A:E") |
| values |
array |
Yes |
2D array of rows to append |
| value_input_option |
string |
No |
"USER_ENTERED" or "RAW" (default: USER_ENTERED) |
| insert_data_option |
string |
No |
"INSERT_ROWS" or "OVERWRITE" (default: INSERT_ROWS) |
Example:
{
"operation": "append",
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A:E",
"values": [
["Charlie", "charlie@example.com", "Sales", "2024-02-01", "Active"],
["Diana", "diana@example.com", "HR", "2024-02-15", "Active"]
]
}
Common Formulas
| Formula |
Description |
=SUM(A1:A10) |
Sum of range |
=AVERAGE(B1:B10) |
Average of range |
=COUNT(A:A) |
Count numbers in column |
=COUNTA(A:A) |
Count non-empty cells |
=VLOOKUP(E1,A:C,2,FALSE) |
Vertical lookup |
=IF(A1>90,"A","B") |
Conditional logic |
=TODAY() |
Current date |
=NOW() |
Current date and time |
Common Workflows
- Import data: Write headers, then append data rows
- Update records: Read to find row, write to specific cells
- Generate reports: Read data, process, write summary
- Log entries: Append new rows with timestamps
Tips
- Always check spreadsheet exists before writing
- Use
USER_ENTERED for formulas to work
- Range must match data dimensions
- Append is safer than write for adding data
Setup Requirements
- Connect Sheets node to AI Agent's
input-tools handle
- Authenticate with Google Workspace in Credentials Modal
- Ensure Sheets API scopes are authorized
- Spreadsheet must be accessible to authenticated account
1---2name: google-sheets-skill3description: Read, write, and append data to Google Sheets spreadsheets. Supports cell ranges, formulas, and batch operations.4---56# Google Sheets Skill78Read and write data to Google Sheets spreadsheets.910## Tool: google_sheets1112Consolidated Google Sheets tool with `operation` parameter.1314### Operations1516| Operation | Description | Required Fields |17|-----------|-------------|-----------------|18| `read` | Read data from a range | spreadsheet_id, range |19| `write` | Write data to a range | spreadsheet_id, range, values |20| `append` | Append rows to a table | spreadsheet_id, range, values |2122### read - Read spreadsheet data2324| Field | Type | Required | Description |25|-------|------|----------|-------------|26| operation | string | Yes | Must be `"read"` |27| spreadsheet_id | string | Yes | Spreadsheet ID from URL |28| range | string | Yes | A1 notation range (e.g., "Sheet1!A1:D10") |2930**How to find Spreadsheet ID:**31From URL: `https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit`3233**Range Notation (A1):**34- `Sheet1!A1:D10` - Specific range on Sheet135- `Sheet1!A:D` - Entire columns A through D36- `Sheet1!1:10` - Rows 1 through 1037- `A1:D10` - Default sheet, specific range38- `Sheet1` - Entire sheet3940**Example:**41```json42{43 "operation": "read",44 "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",45 "range": "Sheet1!A1:E10"46}47```4849### write - Write data to a range5051| Field | Type | Required | Description |52|-------|------|----------|-------------|53| operation | string | Yes | Must be `"write"` |54| spreadsheet_id | string | Yes | Spreadsheet ID |55| range | string | Yes | A1 notation range |56| values | array | Yes | 2D array of values |57| value_input_option | string | No | `"USER_ENTERED"` or `"RAW"` (default: USER_ENTERED) |5859**Example - Write data:**60```json61{62 "operation": "write",63 "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",64 "range": "Sheet1!A1:C3",65 "values": [66 ["Name", "Score", "Grade"],67 ["Alice", 95, "A"],68 ["Bob", 87, "B"]69 ]70}71```7273**Example - Write formula:**74```json75{76 "operation": "write",77 "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",78 "range": "Sheet1!D2",79 "values": [["=SUM(B2:C2)"]],80 "value_input_option": "USER_ENTERED"81}82```8384### append - Append rows to a table8586| Field | Type | Required | Description |87|-------|------|----------|-------------|88| operation | string | Yes | Must be `"append"` |89| spreadsheet_id | string | Yes | Spreadsheet ID |90| range | string | Yes | Table range (e.g., "Sheet1!A:E") |91| values | array | Yes | 2D array of rows to append |92| value_input_option | string | No | `"USER_ENTERED"` or `"RAW"` (default: USER_ENTERED) |93| insert_data_option | string | No | `"INSERT_ROWS"` or `"OVERWRITE"` (default: INSERT_ROWS) |9495**Example:**96```json97{98 "operation": "append",99 "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",100 "range": "Sheet1!A:E",101 "values": [102 ["Charlie", "charlie@example.com", "Sales", "2024-02-01", "Active"],103 ["Diana", "diana@example.com", "HR", "2024-02-15", "Active"]104 ]105}106```107108## Common Formulas109110| Formula | Description |111|---------|-------------|112| `=SUM(A1:A10)` | Sum of range |113| `=AVERAGE(B1:B10)` | Average of range |114| `=COUNT(A:A)` | Count numbers in column |115| `=COUNTA(A:A)` | Count non-empty cells |116| `=VLOOKUP(E1,A:C,2,FALSE)` | Vertical lookup |117| `=IF(A1>90,"A","B")` | Conditional logic |118| `=TODAY()` | Current date |119| `=NOW()` | Current date and time |120121## Common Workflows1221231. **Import data**: Write headers, then append data rows1242. **Update records**: Read to find row, write to specific cells1253. **Generate reports**: Read data, process, write summary1264. **Log entries**: Append new rows with timestamps127128## Tips129130- Always check spreadsheet exists before writing131- Use `USER_ENTERED` for formulas to work132- Range must match data dimensions133- Append is safer than write for adding data134135## Setup Requirements1361371. Connect Sheets node to AI Agent's `input-tools` handle1382. Authenticate with Google Workspace in Credentials Modal1393. Ensure Sheets API scopes are authorized1404. Spreadsheet must be accessible to authenticated account