cURL
curl --request POST \ --url https://dash.empirical.run/api/gsheet/proxy \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "method": "GET", "url": "<string>", "body": {} } '
{ "data": { "values": [ ["Name", "Email"], ["Alice", "alice@example.com"] ] } }
Read, write, or append to a Google Sheet
/d/
/edit
https://docs.google.com/spreadsheets/d/1uaoEmOYLQqIfZMB7nYnDxikTJyRnqAcZtuvmQ9G7CzY/edit └─────────────── spreadsheet_id ───────────────┘
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"}'
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"]]}'
{ "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"]]}'
API key from the Empirical dashboard.
Google API request to proxy.
GET
POST
PUT
PATCH
DELETE
Show child attributes
JSON response from the Google API, wrapped in a data field.
data
Was this page helpful?