Publish to Google Sheets
Publishes selected metadata using Google Sheets API
Overview
This node is capable of publishing the pipeline metadata periodically in a Google Spreadsheet or when a trigger condition is met.
Inputs & Outputs
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : None
Pipeline usage
Place this node after every metadata producer whose output should be written. Use Auto trigger for standard delta fields, Custom trigger for a precise condition, or Interval for regular sampling. Share the destination sheet with the configured service account and select the smallest metadata set needed so rows remain manageable.
Properties
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
trigger_type | When to collect metadata. Options: Custom trigger (custom_trigger); Auto trigger (auto_trigger): When significant node properties change; Interval (periodic); Scheduled (scheduled). | enum | auto_trigger | Yes |
trigger | Publish when this condition evaluates to true. Conditional on trigger_type being custom_trigger. | trigger-condition | null | No |
interval | Set to 0 to publish every time metadata is collected. Unit: seconds. | number | 5 | Yes |
schedule_publishing | Schedule publishing. Options: Disabled (null); Daily (day); Hourly (hour); Every 30 minutes (30min); Every 15 minutes (15min). Conditional on trigger_type being scheduled. | enum | null | No |
meta_to_publish_type | Metadata to publish. Options: Node Metadata (node_meta); Object Metadata (object_meta); Custom (custom). | enum | custom | Yes |
meta_to_publish_regex | Comma-separated regular expressions to select the metadata to publish. Conditional on meta_to_publish_type being custom. Format: comma-separated metadata paths or patterns. | string | nodes.*.*_delta,nodes.*.*.*.*_delta | No |
objects_to_publish | ex. car, vehicle, truck. If specified, only objects of these types will be published. Conditional on meta_to_publish_type being object_meta. | model-labels | null | No |
objects_only_new_updated | If true, only publish objects the first time they are seen else publish both new and updated objects. Conditional on meta_to_publish_type being object_meta. | bool | true | No |
use_lumeo_gsheets_account | Use Lumeo-managed Google account to publish to Sheets. Easier to setup, but requires you to share your Google sheet with [email protected]. | bool | false | No |
gsheets_client_email | Email address to use on Google Sheets API requests. See docs for registration instructions. Conditional on use_lumeo_gsheets_account being false. | string | null | No |
gsheets_private_key | Google Sheets private key. Conditional on use_lumeo_gsheets_account being false. | string | null | No |
gsheets_spreadsheet_id | Needs to be shared with Lumeo or accessible by the Google Sheets client email. See docs for setup instructions. | string | null | No |
gsheets_sheet_name | Name of the tab/sheet within the Google Sheet referenced above to publish to. | string | Sheet1 | No |
Google Sheets API registration
To use the Google Sheets API service with your own API account, you need to get OAuth 2.0 credentials from the Google API Console.
Using your Google account, visit the Google API Console website.
Click On Library and search for Google Sheets API
Press Enable button (Fig 1)

Fig 1
You should be redirected to the Google Sheets API Service page.
On the Credentials menu press Create Credentials -> Service account (Fig 2)

Fig 2
On the "Create service account page" you need to introduce the name you want to use for the Service account, the Service account email address, and a short description.
Press Done when finished (Fig 3)

Fig 3
On the next window you can grant the service account access to your project resources (Fig 4)

Fig 4
After the service account is created, you need to open the Keys separator.
Now click on Add Key -> Create new key (Fig 5)

Fig 5
Chose JSON Key type and press Create. (Fig 6)
This should start the download of a JSON file containing your service account credentials.

Fig 6
Open the JSON file with a text editor. (Fig 7)
Here you can find on each line a set of key/value pairs.
The client_email and the private_key are required for the node configuration.
You should use their values (without enclosing quotes) to fill respectively the following fields of the node properties: Google Sheets Client Email and Google Sheets Private Key

Fig 7
On the Google Drive, create a new Spreadsheet. Right-click on the file and press Share
Add the client_email of your service account as Editor. (Fig 8)

Fig 8
To find the Spreadsheet ID, open the spreadsheet file on Google Drive.
You will see an URL like this: https://docs.google.com/spreadsheets/d/10Rx6088O56gDDPpy0FYB9FDZ30Dzj13P-4b5wXwzXTD/edit#gid=0
The 10Rx6088O56gDDPpy0FYB9FDZ30Dzj13P-4b5wXwzXTD part is the spreadsheet ID that should be introduced on the node property Google Spreadsheet ID
To fill the Google Sheet Name node property, check the name on the bottom left corner, in this case Sheet1 (Fig 9)

Fig 9
Metadata to Publish
In this field you can insert multiple path expressions, separated by comma, to include or exclude the metadata that should be published by the node.
Example:
When parsing metadata augmented by the Line Counter Node we can select the total objects that crossed both directions of the lines specified on the Line Counter Node using the following regular expression:
nodes.annotate_line_counter1.lines.*.dir*.*crossed*
Fields appended on-the-fly to metadata published on the Google Sheets
| Key | Value |
|---|---|
system_timestamp | Current system timestamp in UTC ISO format. Example: 2021-04-14T09:22:24.617855Z |
frame_timestamp | Timestamp based on the difference in frames since pipeline start. Example: 0:04:00 |
Output Metadata
Node does not insert any output metadata; upstream metadata continues through the pipeline
Updated 11 days ago
