Proxy endpoint to read, write, or append to a Google Sheet via the dashboard’s service account.
Finding the spreadsheet ID
The spreadsheet ID is the long string in the Google Sheet URL between /d/ and /edit:
https://docs.google.com/spreadsheets/d/1uaoEmOYLQqIfZMB7nYnDxikTJyRnqAcZtuvmQ9G7CzY/edit
└─────────────── spreadsheet_id ───────────────┘
Request
One of "read", "write", or "append".
The spreadsheet ID from the Google Sheet URL (between /d/ and /edit).
The sheet range (e.g. "Sheet1", "Sheet1!A1:D10", "Sheet1!D6").
A 2D array of values. Required for write and append actions.
Read
Returns cell values for the given range.
{
"data": {
"values": [
["Name", "Email"],
["Alice", "alice@example.com"]
]
}
}
curl -X POST "https://dash.empirical.run/api/gsheet/proxy" \
-H "Authorization: Bearer $EMPIRICALRUN_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "read", "spreadsheet_id": "1uaoE...", "range": "Sheet1!A1:D10"}'
Write
Overwrites cells at the specified range. Use an explicit cell range for precise placement (e.g. Sheet1!D6).
{
"data": {
"updated_cells": 4
}
}
curl -X POST "https://dash.empirical.run/api/gsheet/proxy" \
-H "Authorization: Bearer $EMPIRICALRUN_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "write", "spreadsheet_id": "1uaoE...", "range": "Sheet1!A1:B2", "values": [["Name","Email"],["Alice","alice@example.com"]]}'
Append
Appends rows after the last row of data in the sheet.
The append action auto-detects table boundaries and may place data in unexpected columns.
For precise cell placement, use the write action with an explicit cell range instead.
{
"data": {
"updated_cells": 2
}
}
curl -X POST "https://dash.empirical.run/api/gsheet/proxy" \
-H "Authorization: Bearer $EMPIRICALRUN_KEY" \
-H "Content-Type: application/json" \
-d '{"action": "append", "spreadsheet_id": "1uaoE...", "range": "Sheet1", "values": [["Charlie","charlie@example.com"]]}'