Neo4j Trigger

Neo4j Trigger

Certified

Poll Neo4j and trigger on query results

Periodically executes a Cypher query and starts a flow execution when it returns at least one row. The trigger keeps no state between polls and fires again on every interval while the query returns rows. Make the query idempotent, for example by filtering on a processed flag and updating it after processing. The trigger polls the default Neo4j database only. Database selection and query parameters are not currently configurable. storeType: NONE is unsupported and fails with an error.

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

Trigger a flow when Neo4j returns rows

yaml
id: neo4j_trigger
namespace: company.team

tasks:
  - id: process_rows
    type: io.kestra.plugin.core.debug.Return
    format: "{{ trigger.size }}"

triggers:
  - id: watch
    type: io.kestra.plugin.neo4j.Trigger
    url: "{{ secret('NEO4J_URL') }}"
    username: "{{ secret('NEO4J_USERNAME') }}"
    password: "{{ secret('NEO4J_PASSWORD') }}"
    query: |
      MATCH (p:Person)
      RETURN p {.name} AS person
    interval: PT1M
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-neo4j --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties

Cypher query to execute

Neo4j endpoint URL

Defaultfalse

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

Bearer token

DefaultPT1M
Formatduration

Polling interval

Time between query executions. Defaults to 60 seconds.

Password for basic authentication

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

DefaultFETCH
Possible Values
STOREFETCHFETCHONENONE

Result handling mode

Controls how query results are handled. FETCH (default) returns all rows, FETCHONE returns the first row, and STORE writes results to internal storage. NONE is unsupported for triggers and fails with an error.

Username for basic authentication

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 fetched row

Populated when storeType is FETCHONE. A map keyed by the column names of the RETURN clause (e.g. RETURN count(n) AS total gives row.total).

SubTypeobject

Fetched rows

Populated when storeType is FETCH. One map per record, keyed by the column names of the RETURN clause (e.g. RETURN p gives rows[0].p.name); nodes and relationships are exposed as their properties.

Row count

Number of rows fetched or stored.

Formaturi

Stored result URI

Populated when storeType is STORE; points to internal storage.