Appearance
Node reference overview
FlowRunner ships with ten built-in nodes. This page lists every one — its category, what it does, and the ports it exposes — so you can pick the right building block for a flow.
What a node is
A flow is a graph of nodes joined by connections. When a request hits your flow's URL, FlowRunner starts at the Start node and follows connections from one node's output port to the next node's input, running each node in turn until it reaches an End node.
Every node reads and writes a shared bag of references (refs). A node stores its output under a variable name — a namespace — and later nodes read values back with a dotted reference like start.email or response.body. The inputs that arrived with the request land under the Start node's namespace (start by default).
NOTE
Node behaviour on this reference is documented directly from the flow engine (src/lib/flow/engine.ts). Config field names below are the exact keys the engine reads.
The ten nodes
| Node | Category | Kind | Purpose | Output ports |
|---|---|---|---|---|
| Start | Trigger | Built-in | The entry point — declares the HTTP method and validates the request into start.* | one (next) |
| End | Terminal | Built-in | Shapes the HTTP response (statusCode, responseBody) and stops the flow | none |
| If | Control flow | Built-in | Branches on a condition or structured expression | true, false |
| Switch | Control flow | Built-in | Routes on a value, matching cases to named ports | your case ports, default |
| ForEach | Control flow | Built-in | Loops over an array, running a sub-branch per item | loop, next |
| Set | Data | Built-in | Copies a ref or a literal into a new variable | next |
| Template | Data | Built-in | Renders a ${...} string into a variable | next |
| HTTP | I/O | I/O | Calls an external API and stores { status, ok, body } | next, error |
| I/O | I/O | Sends a transactional email via Resend | next, error | |
| MongoDB | I/O | I/O | Reads or writes a MongoDB collection | next, error |
Built-in nodes run entirely inside the engine — no network, no external service. I/O nodes reach out to the world (an API, an email provider, a database) and can fail for reasons outside your flow, which is why each carries an error port.
The error port is universal
Any non-terminal node that fails follows the same rule:
- If you have wired a connection from its
errorport, the failure is routed there — a try/catch branch you control — and the flow keeps running. - If nothing is wired to
error, the node falls through on its default port (next, orfalsefor If), and an unhandled failure surfaces as a top-level500response.
On any failure the engine also writes error.message and error.nodeId into refs, so an error-handling branch can read what went wrong.
Reading the values a node produces
Each node stores its result under a variable you name (resultVar, var, itemVar) with a sensible default. Downstream, reference a field with variable.field:
text
start.email # a request input
response.status # from an HTTP node with resultVar: response
result.value # a scalar wrapped by Set / Template / Mongo
error.message # set whenever a node fails