
Neo4j Trigger
CertifiedPoll Neo4j and trigger on query results
Neo4j Trigger
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.
type: io.kestra.plugin.neo4j.TriggerExamples
Trigger a flow when Neo4j returns rows
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
Properties
query *string
Cypher query to execute
url *string
Neo4j endpoint URL
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
bearerToken string
Bearer token
interval string
PT1MdurationPolling interval
Time between query executions. Defaults to 60 seconds.
password string
Password for basic authentication
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
storeType string
FETCHSTOREFETCHFETCHONENONEResult 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 string
Username for basic authentication
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 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).
rows array
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.
size integer
Row count
Number of rows fetched or stored.
uri string
uriStored result URI
Populated when storeType is STORE; points to internal storage.