Skip to main content

Flow editor

Windmill's Flow editor allows you to build flows with a low-code builder.

Workflows are graphs (DAG) that represent job specifications. A workflow engine is a distributed system that takes a workflow and orchestrates it to completion on workers while respecting among others all the dependency constraints of each job. There exists a great variety of workflows and many software are domain-specific workflow engines and workflow specs (if you are a software engineer, you probably already wrote one without realizing it).

The goal of an orchestrator or workflow engine is to execute the steps on different workers that respect that graph's dependencies, and pass the required data defined in the steps' inputs while applying parallelism when possible.

In Windmill, each step is code with a main function in TypeScript, Python, Go, PHP, Bash or raw queries to databases. The result of a flow is the result of the last step executed, unless error was returned before or Early return is set.



Another approach is to write a program that defines the jobs and their dependencies, and then execute that program. This is known as workflows as code.

Flow groups

Flow groups visually cluster related steps in the flow editor. A group renders as a colored border around its contained nodes with a header card, and behaves as a single unit for comments, navigation, and run-page display.

Creating and editing groups:

  • Select multiple nodes (drag-box selection or shift-click), then create a group from the bounding-box action menu.
  • Each group has an overlay action bar with: collapse/expand, a color picker, a "collapsed by default" toggle, and an ungroup action.
  • Double-click the group header to add a markdown description; groups support GitHub-flavored Markdown for rich documentation on the canvas.

Collapsible groups:

  • Click the minimize button on the group to collapse it into a single node (similar to a subflow). Click again to expand.
  • The runtime collapsed/expanded state is ephemeral (per-session).
  • Toggling "Collapsed by default" is a persistent setting saved in the flow YAML — the group will render collapsed the next time the flow is loaded.
  • Groups and notes are shown in the flow status viewer, both on the run page and in the editor preview, so the visual grouping you designed is preserved when reviewing runs.

See also Sticky notes for free-floating markdown notes on the canvas.

Node manipulation

Windmill's flow editor supports several ways to rearrange, duplicate, and remove nodes:

Drag-and-drop reordering

  • Each flow node has a move handle; drag it to reorder the node anywhere in the flow.
  • Dragging a subflow (for-loop, branchall, branchone) shows a live ghost of the full subflow graph — scaled to viewport zoom — so you can see exactly what you're moving.
  • Valid drop zones are highlighted in green as you approach them, with proximity cues guiding the drop.
  • All nested descendants of a dragged subflow fade visually so you can see which nodes will move together.
  • Press Escape during a drag to cancel cleanly.

Node context menu

Right-click any node in edit mode to open its context menu:

  • Move — enters the legacy click-to-move mode (same as the hover-button move).
  • Duplicate — clones the node and all of its nested children, reassigning IDs, and inserts the clone right after the original.
  • Delete — removes the node (shown in red as a danger action).
  • Add note — attaches a sticky note to the node.

Multi-select actions

  • Enter selection mode from the top-right of the flow pane, then drag-box or shift-click to select multiple nodes.
  • The bounding-box action menu supports multi-select move, duplicate, and delete in one action.
  • Per-node action buttons (ellipsis, delete, test/run, output picker, expand subflow) are hidden during multi-selection so the canvas stays clean.
  • While in selection mode, hold Ctrl/Cmd to temporarily pan the canvas; while in pan mode, hold Ctrl/Cmd to temporarily select nodes.

Features

The Flow editor has the following features which are the subject of specific pages:

Triggering flows
Trigger scripts and flows on-demand, by schedule or on external events.
Testing flows
Iterate quickly and get control on your flow testing.
Flow editor components
Details on the flow editor's major components.
AI-generated flows
Generate flows from prompts.
AI Agents
Integrate AI agent steps directly into your Windmill flows.
Error handling in flows
There are four ways to handle errors in Windmill flows.
Branches
Split the execution of the flow based on a condition.
For loops
Iterate a series of tasks.
While loops
While loops execute a sequence of code indefinitely until the user cancels or a step set to Early stop stops.
Error handler
Configure a script to handle errors.
Trigger scripts
Trigger scripts are designed to pull data from an external source and return all of the new items since the last run, without resorting to external webhooks.
Retries
Re-try a step in case of error.
Concurrency limits
The Concurrency limit feature allows you to define concurrency limits for scripts and inline scripts within flows.
Job debouncing
Job debouncing prevents redundant job executions by canceling pending jobs with identical characteristics.
Custom timeout for step
If the execution takes longer than the time limit, the execution of the step will be interrupted.
Priority for steps
Prioritize a flow step in the execution queue.
Lifetime / Delete after use
The logs, arguments and results of this flow step will be completely deleted from Windmill once the flow is complete.
Cache for steps
Re-use a step's previous results.
Early stop / Break
Stop early a flow based on a step's result.
Early return
Define a node at which the flow will return at for sync endpoints. The rest of the flow will continue asynchronously.
Suspend & Approval / Prompts
Suspend a flow until specific event(s) are received, such as approvals or cancellations.
Sleep / Delays in flows
Executions within a flow can be suspended for a given time.
Step mocking / Pin result
When a step is mocked, it will immediately return the mocked value without performing any computation.
Sticky notes
Annotate flows with documentation using free notes and group notes.

Example of a flow

Example of a flow in Windmill.