This node is capable of publishing the pipeline metadata periodically in a Google Spreadsheet or when a trigger condition is met.
- Inputs : 1, Media Format : Raw Video
- Outputs : 1, Media Format: Raw Video
- Output Metadata : None
The email address to use on Google Sheets API requests
Google Sheets API Private Key
Google Spreadsheet ID
Google Sheet Name
Comma separated regular expressions to select the metadata that should be published
If set, the metadata is only published when this trigger condition evaluates to True, subject to the minimum interval as specified below.
The trigger expression must be a valid Dot-notation expression that operates on Pipeline Metadata and evaluates to
ex. `nodes.annotate_line_counter1.lines.line1.total_objects_crossed_delta > 0
Minimum time, in seconds, between consecutive Google Sheets publishing actions.
If a trigger is not specified, the metadata will be published on the spreadsheet at this interval.
If set, ignores the Min Interval property and schedules publishing at a synchronized time.
If true, collects metadata between the publishing intervals, and sends it as a batch. Else sends just a specific frame's metadata, discarding the metadata of the frames between each publishing interval.
In order to use the Google Sheets API service, 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)
You should be redirected to the Google Sheets API Service page.
On the Credentials menu press Create Credentials -> Service account (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)
On the next window you can grant the service account access to your project resources (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)
Chose JSON Key type and press Create. (Fig 6)
This should start the download of a JSON file containing your service account credentials.
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
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)
To find the Spreadsheet ID, open the spreadsheet file on Google Drive.
You will see an URL like this:
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)
In this field you can insert multiple regular expressions, separated by comma, to include or exclude the metadata that should be published by the node.
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:
Current system timestamp
Timestamp computed based on frames difference, since the start of the pipeline execution
This node does not add any new metadata to the frame.
Updated 6 months ago