Skip to main content
Technical Preview

Overview

A client-mode connector for a curated slice of Google Sheets API v4 under https://sheets.googleapis.com: Default BASE_ADDRESS is https://sheets.googleapis.com (no trailing slash). Topics use storage/google-sheets/<object>/<verb>. See the base guide: REST API Connectors.
A1 encoding: put the sheet range in {value.json.range}. URL-encode ! as %21 and : as %3A if the publisher or broker does not encode path segments (example: Sheet1!A1:D10 → Sheet1%21A1%3AD10).
valueInputOption: Append and Update require query valueInputOption=RAW or USER_ENTERED. BatchUpdate places valueInputOption in the JSON body with data (array of ValueRange).
Prefer Hub secrets for access tokens (GET SECRET "GOOGLE_SHEETS_TOKEN" or "GOOGLE_ACCESS_TOKEN"). Scope: https://www.googleapis.com/auth/spreadsheets. This template has not been verified against a live Google Cloud project. Status remains blocked until an authenticated live smoke succeeds.

Basic Syntax

Auth

  1. Enable Google Sheets API on a Google Cloud project.
  2. Obtain an OAuth 2.0 user access token or a service-account access token (share the target spreadsheet with the service-account email).
  3. Scope: https://www.googleapis.com/auth/spreadsheets (read/write). Use .../spreadsheets.readonly only if you stick to GET events.
  4. Pass api_token on each MQTT payload → Authorization: Bearer {value.json.api_token}. Prefer Hub secrets / GET SECRET "GOOGLE_SHEETS_TOKEN" or "GOOGLE_ACCESS_TOKEN". Never commit real tokens.

MQTT topics

Example payloads

Append telemetry row (body is {payload} — include Sheets values array):
Update live cell:
Batch get (ranges_query is the full query string after ?):

Quotas and limits

Google Sheets API enforces per-project quotas. Burst append/update from many devices can hit write quotas — batch or throttle at the edge when possible.

Deploy notes

  • Deploy only GoogleSheetsRestApi.lot with -addRoute / Hub deploy. Do not deploy hub-metadata.lot.
  • Hub listing uses hub-metadata.lot (WITH IMAGE, WITH STATUS "beta", doclink).
  • Suggested branches (Hugo pushes): feat/rest-api-route-google-sheets, feat/docs-rest-api-google-sheets.
Last modified on October 21, 2026