Skip to main content

Filter

Flow nodefilterlogic

The run goes on only when this holds. Otherwise it stops quietly, without failing.

At a glance​

PropertyValue
Node fieldfilter (set instead of stepRef on a FlowNode)
Side effectsno

A FlowNode sets exactly one of stepRef, branch, filter, forEach, wait and approval.

Conditions use the expression language: a field, an operator and a value, as in {field: details.total, op: gte, value: 10000}.

Settings​

The value of the node field, with these settings.

SettingTypeDefaultDescription
whenobject-When may be left out while the filter is not set up yet, as in a branch case; the webhook reports the Flow incomplete.
when.exprstring-Expr is the condition as text. Every field in it is a node or trigger upstream on every path to this one, and one of its outputs.
when.fieldstring-Field is <nodeId>.<field>: a node or trigger upstream on every path to this one, and one of its outputs.
when.opstring-

The full JSON Schema of these settings: filter.schema.json.

Use it in a flow​

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
name: my-email-forward
namespace: tenant-acme
spec:
classRef: {name: email-forward}
config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: filter-example
namespace: tenant-acme
spec:
displayName: "Filter"
triggers:
- id: start
ref: {name: email-arrives}
connectorRef: {name: my-email-forward}
next: [from-suppliers]
nodes:
- id: from-suppliers
filter:
when: {field: start.from, op: contains, value: "@supplier.example"}
next: [text]
- id: text
stepRef: {name: read-text}