Google Data Studio Trigger

Google Data Studio Trigger

Certified

Watch Data Studio assets

Poll reports or data sources and start an execution when an asset is created or updated after the watermark stored in the namespace KV store. The watermark key includes the flow id and the trigger id, so two flows in the same namespace do not share state. The first poll records the current assets and does not start an execution. A search that exceeds maxPages (default 50) fails and does not move the watermark.

yaml
type: io.kestra.plugin.datastudio.assets.Trigger

Run a flow when a report is created or updated

yaml
id: on_datastudio_change
namespace: company.team

triggers:
  - id: watch
    type: io.kestra.plugin.datastudio.assets.Trigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}"
    assetTypes:
      - REPORT
    interval: PT5M

tasks:
  - id: handle_event
    type: io.kestra.plugin.core.log.Log
    message: "Event received: {{ trigger.title }}"
Properties

Access token

OAuth access token with the datastudio.readonly scope. When set, the service account exchange is skipped.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

SubTypestring
Default["REPORT"]
Possible Values
REPORTDATA_SOURCEUNKNOWN

Asset types

Asset types to watch. Each value is queried separately. Allowed values are REPORT and DATA_SOURCE. UNKNOWN is output-only and is rejected here.

Defaulthttps://datastudio.googleapis.com/v1

API base URL

Data Studio API root. Defaults to https://datastudio.googleapis.com/v1.

DefaultPT5M
Formatduration

Interval

How often to poll Data Studio. Minimum practical value is PT30S.

Default100

Maximum assets in the output

Cap on assets in the trigger variables. size stays the full number of changed assets. Default 100.

Default50

Maximum pages

Fail when one asset type needs more pages than this. Default 50. The watermark is not moved, and the partial asset list is discarded.

Service account JSON

Google service account key JSON. The trigger requests https://www.googleapis.com/auth/datastudio.readonly through domain-wide delegation in a Google Workspace or Cloud Identity organization. Use this or accessToken.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Delegated user

Workspace user email the service account impersonates. Required for domain-wide delegation. Ignored when accessToken is set.

Defaulthttps://oauth2.googleapis.com/token

Token URI

OAuth token endpoint used to exchange a service account JWT.

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

Possible Values
REPORTDATA_SOURCEUNKNOWN

Type of the first changed asset

Changed assets

At most maxAssetsInOutput assets. size is the full count.

Definitions
assetTypestring
Possible Values
REPORTDATA_SOURCEUNKNOWN

Asset type

REPORT or DATA_SOURCE. An unexpected API value is UNKNOWN, so one asset does not fail the whole response.

createTimestring
Formatdate-time

Creation time

creatorstring

Creator email

descriptionstring

Description

namestring

Asset name

The Data Studio asset ID.

ownerstring

Owner email

titlestring

Title

trashedboolean

Trashed

True when the asset is in the trash.

updateTimestring
Formatdate-time

Update time

Name of the first changed asset

Number of changed assets

Title of the first changed asset

Formatdate-time

Update time of the first changed asset