
Google Cloud Trigger
CertifiedTrigger on periodic Pub/Sub pulls
Google Cloud Trigger
Trigger on periodic Pub/Sub pulls
Polls a subscription every interval (default 60s) via the Consume task and starts a Flow when messages are fetched. Use RealtimeTrigger for one-execution-per-message.
type: io.kestra.plugin.gcp.pubsub.TriggerExamples
id: gcp_trigger
namespace: company.team
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Received: {{ trigger.data }}"
triggers:
- id: trigger
type: io.kestra.plugin.gcp.pubsub.Trigger
projectId: test-project-id
subscription: test-subscription
topic: test-topic
maxRecords: 10
Properties
topic *Requiredstring
The Pub/Sub topic
The Pub/Sub topic. It must be created before executing the task.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
autoCreateSubscription booleanstring
trueAuto-create subscription
Create the subscription when missing; default true
impersonatedServiceAccount string
The GCP service account to impersonate
interval Non-dynamicstring
PT1MdurationInterval between polling.
The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.
maxDuration string
Max duration
Duration limit for a polling run (ISO-8601); optional
maxRecords integerstring
Max records
Stop polling iteration after this many messages
projectId string
The GCP project ID
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serdeType string
STRINGSTRINGJSONSerde type
Serializer/deserializer for message payloads; defaults to STRING
serviceAccount string
The GCP service account
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
subscription string
Subscription
Subscription name; auto-created if autoCreateSubscription is true
when string
trueA 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.
Outputs
count integer
Consumed message count
uri string
uriMessages file URI
Kestra storage URI of the file containing consumed messages