
Couchbase Trigger
CertifiedPoll Couchbase query and start flow
Couchbase Trigger
Poll Couchbase query and start flow
Periodically runs the rendered N1QL query and starts the flow when rows are returned. Default interval is 60 seconds and fetchType defaults to STORE, writing results to Kestra internal storage; use FETCH or FETCH_ONE to expose rows inline.
type: io.kestra.plugin.couchbase.TriggerExamples
Wait for a N1QL query to return results, and then iterate through rows.
id: couchbase_trigger
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ fromJson(taskrun.value) }}"
triggers:
- id: watch
type: io.kestra.plugin.couchbase.Trigger
interval: "PT5M"
connectionString: couchbase://localhost
username: couchbase_user
password: "{{ secret('COUCHBASE_PASSWORD') }}"
query: SELECT * FROM `COUCHBASE_BUCKET`.`COUCHBASE_SCOPE`.`COUCHBASE_COLLECTION`
fetchType: FETCH
Properties
connectionString *Requiredstring
1Couchbase connection string
Full connection string (e.g., couchbase://host) rendered with flow variables before opening the cluster.
password *Requiredstring
1Cluster password
Renderable password for authenticating to the cluster; prefer secret storage.
query *Requiredstring
1Renderable N1QL statement to run
Rendered with flow variables before execution against Couchbase. Ensure bucket, scope, and collection references are accessible to the provided credentials.
username *Requiredstring
1Cluster username
Renderable username for authenticating to the cluster; store sensitive values in secrets.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
fetchType string
STORESTOREFETCHFETCH_ONENONEHow to return or store query results
Defaults to STORE, which writes all rows to Kestra internal storage. FETCH returns all rows inline, FETCH_ONE returns the first row, and NONE skips output.
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.
parameters objectarray
Query parameters for placeholders
Renderable values for named or positional parameters. Use a map for named parameters or a list/array for positional ones; see Couchbase prepared statement syntax for details.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
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
row object
First row returned
Present when fetchType resolves to FETCH_ONE; null if the query returns no rows.
rows array
All rows returned
Present when fetchType resolves to FETCH; each row is returned as a JSON map.
size integer
Number of rows returned
Set when fetchType is FETCH or STORE; useful for branching or triggers.
uri string
uriStored result URI
Present when fetchType resolves to STORE; points to the Kestra internal storage object containing all rows.