This guide demonstrates the syntax for using Ports and Expressions to control the flow of execution in Vellum Workflows.
Below is a basic example:
Prefer using Ports directly on Nodes rather than using legacy Conditional Nodes.
A common use case for Ports is to branch based on the result a node’s own outputs. For example, if a Prompt Node classifies text as “positive” or “negative”, you can use a Port to immediately branch based on the result.
In this case, the node needs to reference its own outputs in port conditions, use LazyReference to do so:
Ports use Expressions to evaluate which Port to route to. Below is a list of all available expression operators.
Access JSON fields using bracket notation:
Use the & operator to combine conditions with AND logic:
Use the | operator to combine conditions with OR logic: