Couchbase Trigger

Couchbase Trigger

Certified

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.

yaml
type: io.kestra.plugin.couchbase.Trigger

Wait for a N1QL query to return results, and then iterate through rows.

yaml
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
Min length1

Couchbase connection string

Full connection string (e.g., couchbase://host) rendered with flow variables before opening the cluster.

Min length1

Cluster password

Renderable password for authenticating to the cluster; prefer secret storage.

Min length1

Renderable N1QL statement to run

Rendered with flow variables before execution against Couchbase. Ensure bucket, scope, and collection references are accessible to the provided credentials.

Min length1

Cluster username

Renderable username for authenticating to the cluster; store sensitive values in secrets.

Defaultfalse

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

DefaultSTORE
Possible Values
STOREFETCHFETCH_ONENONE

How 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.

DefaultPT1M
Formatduration

Interval 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.

SubTypestring

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.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

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.

First row returned

Present when fetchType resolves to FETCH_ONE; null if the query returns no rows.

SubTypeobject

All rows returned

Present when fetchType resolves to FETCH; each row is returned as a JSON map.

Number of rows returned

Set when fetchType is FETCH or STORE; useful for branching or triggers.

Formaturi

Stored result URI

Present when fetchType resolves to STORE; points to the Kestra internal storage object containing all rows.