Google Sheets v2

Google Sheets is a spreadsheet service used to store tabular data, collaborate on workbooks, calculate values, and organize ranges, sheets, and shared spreadsheet files.

The Flowgear Google Sheets Node lets a Workflow discover accessible spreadsheets, read workbook metadata, read cell values, update ranges, and append rows by using a Google service account, which makes it useful for spreadsheet-driven integrations and lightweight operational data flows.

Revision History

0.0.0.1 - Initial release with spreadsheet discovery, workbook metadata, value reads, value updates, and row appends.
0.0.0.3 - Improved retry handling, simplified the public Connection surface, and improved pasted service-account private-key handling.
0.0.0.4 - Removed the legacy status, statusMessage, and errorMessage output fields and added normalized provider detail fields.
0.0.0.5 - Aligned the connector contract.
0.1.0.0 - Maintenance release.
0.1.1.0 - Added detached request snapshots to update and append responses.
0.1.1.2 - Updated Runtime compatibility.

Connection

This Connection stores the Google service-account settings and optional spreadsheet defaults used by the Node.

Property Type Description
Client Email String Google service-account email used as the JWT issuer.
Private Key Masked Google service-account private key used to sign JWT assertions.
Scopes String Space-delimited scopes requested during service-account token minting. The default is https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.metadata.readonly.
Default Spreadsheet Id String Optional default spreadsheet ID used when preconfigured requests omit SpreadsheetId.
Default Sheet Title String Optional default sheet title used when preconfigured ranges omit an A1 sheet prefix.
Access Token Masked Cached access token minted from the Google service-account flow.

Setup Notes

  • Create or obtain a Google service-account JSON key, then copy its client_email and private_key values into the Connection.
  • Client Email and Private Key are required.
  • Paste Private Key exactly as copied from the JSON key, including the BEGIN PRIVATE KEY and END PRIVATE KEY lines. JSON-style escaped newlines are accepted.
  • Leave Scopes at its default unless you need different access. The default scopes cover spreadsheet reads and writes plus Drive metadata reads for spreadsheet discovery.
  • Share target spreadsheets with the service-account email when you want the Node to discover them, expand templates from them, read them, or write to them.
  • Set Default Spreadsheet Id when you want omitted SpreadsheetId values to resolve to a known workbook.
  • Set Default Sheet Title when you want ranges without an A1 sheet prefix to resolve automatically to a known sheet.
  • Access Token is managed by the Node and refreshed automatically from the service-account credentials.
  • Connection test performs a lightweight spreadsheet discovery call.

Methods

The Node exposes methods for spreadsheet discovery, metadata reads, value reads, value updates, and row appends.

ListSpreadsheets

Lists spreadsheets visible to the configured service account.

Parameter Type Description
Connection Connection Google Sheets Connection including service-account credentials and defaults.
NameContains String Optional case-sensitive name fragment used to narrow spreadsheet discovery.
Return Type Description
Spreadsheets Array One row per discovered spreadsheet, including spreadsheetId, name, mimeType, webViewLink, trashed, and raw.

GetSpreadsheet

Gets workbook metadata for one spreadsheet.

Parameter Type Description
Connection Connection Google Sheets Connection including service-account credentials and defaults.
Request Object Metadata request containing SpreadsheetId and optional metadata controls such as Ranges and IncludeGridData. SpreadsheetId falls back to Default Spreadsheet Id when omitted.
Return Type Description
Spreadsheet Object One workbook metadata row including spreadsheetId, title, sheetCount, sheets, and raw.

GetValues

Reads one or more spreadsheet ranges and emits one row per returned inner array.

Parameter Type Description
Connection Connection Google Sheets Connection including service-account credentials and defaults.
Request Object Values request containing SpreadsheetId, Ranges, and optional render controls ValueRenderOption and DateTimeRenderOption. Ranges must contain at least one range. MajorDimension defaults to ROWS.
Return Type Description
Rows Array One row per returned inner array, including spreadsheetId, range, majorDimension, itemIndex, values, and raw.

UpdateValues

Updates spreadsheet values for one or more ranges.

Parameter Type Description
Connection Connection Google Sheets Connection including service-account credentials and defaults.
Request Object Update request containing SpreadsheetId, ValueInputOption, optional response settings (IncludeValuesInResponse, ResponseValueRenderOption, and ResponseDateTimeRenderOption), and Data entries. Data must contain at least one item. Each Data item includes Range, optional MajorDimension, and at least one entry in Rows, where each row contains Values. ValueInputOption defaults to RAW.
Return Type Description
Result Object One result row including update counters, provider payload fragments, and the Flowgear object with IsSuccess, Message, and a detached input snapshot under Request.

AppendValues

Appends rows to a spreadsheet table range.

Parameter Type Description
Connection Connection Google Sheets Connection including service-account credentials and defaults.
Request Object Append request containing SpreadsheetId, Range, Rows, and optional write controls such as IncludeValuesInResponse, ResponseValueRenderOption, and ResponseDateTimeRenderOption. Rows must contain at least one row, and each row contains Values. MajorDimension defaults to ROWS, ValueInputOption defaults to RAW, and InsertDataOption defaults to INSERT_ROWS.
Return Type Description
Result Object One result row including append counters, nested updates, and the Flowgear object with IsSuccess, Message, and a detached input snapshot under Request.

Usage Notes

  • Query and read rows do not include the Flowgear object.
  • Cell values must be primitive JSON values such as strings, numbers, or Booleans.
  • Ranges without an A1 sheet prefix resolve to Default Sheet Title when it is set.
  • ListSpreadsheets, GetSpreadsheet, and GetValues return zero rows for valid empty data outcomes and do not convert first-call provider failures into success-shaped rows.
  • If the first provider call for ListSpreadsheets, GetSpreadsheet, or GetValues fails, that Google API error surfaces to the Workflow.
  • UpdateValues and AppendValues return the Flowgear object with default success or failure metadata.
  • Mutation failure rows preserve message, providerCode, providerStatus, providerReason, and httpStatusCode when that detail is available.
  • Drive spreadsheet discovery handles pagination internally.
  • Live template expansion depends on the service account already having access to the target spreadsheets.

Known Issues

  • The Node is service-account-first and does not implement delegated end-user OAuth or domain-wide impersonation.
  • Structural workbook operations such as spreadsheets:batchUpdate, sheet creation, formatting, and protection management are not currently supported.