Flow is the same thing you build in Studio’s flow editor, written as a graph. You add blocks and link them.
The pieces
Using values: ctx and P
Block settings are templates over what has happened so far:
Conditions (
control.if_, control.while_, transform.filter) use P over the same values: P.input.x, P.steps.total.output > 100000, P.vars.z, P.item.w.
Rules the server enforces (and validate checks)
- Templates are lookups.
{{ steps.load.output.id }}plus the filtersdefault,upper,lower,length,int,float,str,bool,first,last,keysand a few more. They don’t run code. - What
inputholds depends on how the flow starts: an HTTP trigger with no path gets the body; one with a path gets{params, query, body, headers}. - Loops.
ctx.itemandctx.indexare the current element; a nested loop shadows the outeritem, so keep what you need withblocks.control.set(values={...}). validate.schemais strict: declare every optional input too, or it is refused.- The graph is checked: every block exists, every link points to a real block and handle, nothing is unreachable, and each block’s settings are valid.
Test a deployed flow
Open it in Studio’s flow editor and use Test run, or call it from your app (Server logic: flows). See The flow editor.Flow blocks
All 69 blocks by family.
Routes
Give a flow a URL.