Your first flow
A flow is a chain of steps on a canvas. Each step is a script, a query, an HTTP call, a condition, a loop — and each one can use what an earlier step returned. In this lesson you build report-pipeline: it runs daily-report, hands its result to a second step that writes a sentence, and shows the whole run on the canvas.
- Create a flow and add steps with the + between them
- Reuse a project script as a step
- Bind a step’s input to an earlier step’s output
- Run the flow and inspect each step on the canvas
A flow is a column of steps
Every flow begins at Start, where its inputs are declared, and runs downward. You never place or wire nodes by hand: the canvas lays the steps out for you, one under the other, and the only way to add one is the + on the line between two steps (or under the last one). Conditions, loops and parallel branches open into columns of their own and close again below.
A step does not see the previous step’s result automatically. Each input of a step is either a fixed value or a binding — “take this from that step’s output” — and you set it explicitly. That is what makes a flow readable: every arrow of data has a name.
Build report-pipeline
- Create the flow
In Code, press + New → Flow, type
report-pipelineas the Flow name and press Create flow. The canvas opens with a single Start step. - Add daily-report as a step
Click the + under Start. In Add Node, pick Existing Script (“Link a project script”) and choose
daily-report. It lands under Start and its side panel opens. - Add a step that formats the message
Click the + under
daily-reportand pick Python (or TypeScript, JavaScript). Paste the code below into the step and name itformat-message. Itsreportinput shows a warning: it has no value yet. - Bind the input
On the
reportinput, press From node and pickdaily-report→output. The row now reads daily-report → output. Pickingoutput.passedinstead would pass just that field. - Run the flow
Press Run Flow at the top. The Run tab opens and the canvas paints the run: each step is marked running while it works and turns green when it succeeds, with its duration beside it.
- Open a step’s result
Click
format-messageon the canvas: its panel shows the inputs it received and the output it returned. The flow’s own result is the output of its last step.
def main(report: dict):
return {"message": f"{report['passed']} of {report['total']} passed (average {report['average']})"}{
"message": "2 of 3 passed (average 85)"
}Reading a run on the canvas
- A failed step turns red and the flow stops there; its panel holds the error. Start debugging at the first red step, not at the flow’s status. See Debugging flows.
- The Runs tab lists the flow’s past runs; pick one to paint it on the canvas again. Back to editing takes the run off the canvas.
- On the project’s Runs page, the flow is one row; unfold it to see the step runs it started.
Flows are published too
A flow has a draft and a published version, exactly like a script. Run Flow runs the draft; a schedule or an API endpoint runs the published one. Press Publish on the flow page before the next lesson if you want to schedule the flow instead of the script.