Google Sheets
Read a Google Sheets spreadsheet as rows: the first row names the columns.
Connect it in the console under Integrations > Connectors. See Connectors for how connectors work and who can use them.
Create a read-only credential
Section titled “Create a read-only credential”In the Google Cloud console, turn on the Google Sheets API, create a service account and create a JSON key for it. Then open the spreadsheet, choose Share, and add the service account’s email address (it ends in iam.gserviceaccount.com) as a Viewer. VAIF Studio signs in with the spreadsheets.readonly scope.
Settings
Section titled “Settings”| Setting | Notes | |
|---|---|---|
| Service account key (JSON) | Required | Share the spreadsheet with the service account's email (Viewer). Stored encrypted and never shown again. |
| Default spreadsheet | Optional | For example ID or https://docs.google.com/spreadsheets/d/.... |
Tables
Section titled “Tables”| Table | Filters | Returns |
|---|---|---|
sheets | spreadsheet_id | Tabs in the spreadsheet. |
values | spreadsheet_id, range (required), header_row | Cells in a range (A1 notation, e.g. Sheet1 or Sheet1!A1:F200); the first row names the columns. |
Query from the API
Section titled “Query from the API”curl -s -X POST "https://api.vaif.studio/database/connector/$VAIF_PROJECT_ID/query" \ -H "Authorization: Bearer $VAIF_TOKEN" -H "Content-Type: application/json" \ -d '{"wrapperId":"google_sheets_fdw","table":"values","filters":{"range":"Orders!A1:F500"},"limit":50}'$VAIF_TOKEN is a console access token. See Connectors for the routes.
How it stays read-only
Section titled “How it stays read-only”Give a bounded range for a large sheet: the whole range comes back at once. Set header_row to false to name the columns column_1, column_2 and so on. Blank or repeated headers become column_N.