How Flow works
An Unstract Flow workflow goes from a spec to a prepared workflow to runs. You write the spec, Prepare turns it into a workflow with fixed steps, and each run follows those steps. A deployment then runs a tagged version on its own.
The spec
The spec is the workflow written in plain English. It lives in main.md in the editor, and it can span more Markdown files that you add from the editor's file tabs. Preparing reads every file, in tab order. For someone who can't change the workflow, the editor opens read only and saves nothing; Members and roles says who can change it.
The spec names each system it uses with an @mention, such as @email_gmail, @unstract or @hitl. Connectors, instances and credentials covers mentions in detail. Two mentions name the project's own data instead of a system: @file: names an input file, and @table: names a reference table, such as @table:Items.
Preparing
Prepare reads the spec and builds the workflow. At this point Flow settles which steps run, how the branches and loops work, and which connector action each step calls. Those decisions hold for every run until you prepare again.
Preparing runs a sanity check on the spec, then, unless the Architect setting is Off · compile directly, the Architect. When the spec leaves out something that has a usual answer, the Architect writes it in, such as whether a saved file replaces the one already there, and saves the result as a new version of the spec. It asks you only about decisions no usual answer settles, such as which of two rules wins. Flow then generates, validates and builds the workflow. Prepare a workflow covers the Architect's modes, and Build your first workflow walks through each stage.
Preparing the same spec twice can produce two slightly different workflows that both do what the spec says. Treat each prepare as a new build, and check the result before you tag it.
Running
A run follows the last prepared version, step by step. Flow reads credentials and connector settings while the run goes, and a change can take up to 2 minutes to reach a run, so a connector without a working credential fails at the step that uses it, even when preparing succeeded.
Each call to an action its connector marks as not safe to repeat, such as sending an email, inserting a row, an extraction, taking the next item from a pipeline or a website or terminal session, gets one attempt. When that attempt returns an error, times out or loses the worker running it, the step fails and Flow doesn't make the call again. Runs and run statuses lists the calls Flow does repeat.
Which step runs next, and every branch and loop, comes from the prepared workflow. A few kinds of step use AI while they run:
- Agent Node steps (
@agent_node) produce text or structured output from a prompt. - Unstract steps (
@unstract) extract structured data from documents through a deployed Unstract API. - Website and terminal sessions (
@browserless,@terminal_ssh,@terminal_3270) use AI to carry out each step of the session. - Matching against a reference table (
@table:) asks AI to pick among the records close spelling found, when no key, exact value or learned phrase found one, close spelling's match isn't final, and the table's AI weighs close matches setting is on, as it is by default.
A step that asks @hitl for a review can pause the run until a person answers. Human review explains how.
Deploying
A deployment runs one tagged version of the workflow on a schedule, from a webhook, or when you press Run now. It keeps the steps of that version after you edit the workflow. It still uses the workflow's current credentials, secrets, connector settings, default inputs, call limits, input files and reference tables, so a change in the editor's Files, Tools or Settings tab, on the project's Secrets tab, or an import made current in a table, reaches the deployment too. While a deployment is active, the Tools and Settings tabs show a note saying so. One default stays with the version: Key Mappings on a 3270 step. Workflows, versions and tags covers tags.