Skip to content

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.

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.

SettingNotes
Service account key (JSON)RequiredShare the spreadsheet with the service account's email (Viewer). Stored encrypted and never shown again.
Default spreadsheetOptionalFor example ID or https://docs.google.com/spreadsheets/d/....
TableFiltersReturns
sheetsspreadsheet_idTabs in the spreadsheet.
valuesspreadsheet_id, range (required), header_rowCells in a range (A1 notation, e.g. Sheet1 or Sheet1!A1:F200); the first row names the columns.
Terminal window
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.

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.