FlowsGuide

Subflows and AI Scraper steps

A flow does not have to do everything itself. A Flow step runs another flow of the project; an AI Scraper step runs one of its scrapers. Either way the callee keeps its own inputs, its own runs and its own versions — the caller binds the inputs, waits, and gets the result as the step’s output.

What you will learn
  • Call another flow as a step and bind its Start inputs
  • Know which version a caller runs, and why publishing matters
  • Open and expand the child run from the parent’s run
  • Run a published AI Scraper as a step and read its rows

One step, a whole flow behind it

Split a long flow into pieces you can reuse: one flow that loads a customer, another that sends the report, a third that calls both. On the parent’s canvas a call is a single step; the work happens in the child, which records a run of its own.

A Flow step and an AI Scraper step in one run: each waits for the run it started, then hands its result down.

A caller always runs the callee’s latest published version, never its draft. That is the contract that makes reuse safe: you can edit a child freely, and nothing that calls it changes until you publish it.

Call a flow

  1. Add a Flow step

    Click the + and pick Flow (“Run another flow as a step”). Call a flow opens with every flow of the project and a search box. A flow that would call back into this one is disabled — That would make a loop of flows.

  2. Bind its inputs

    The Parameters tab lists the child’s Start parameters under Inputs, each a binding row with the four modes. A child with none says This flow takes no inputs. If the child later drops a parameter you had bound, the panel names it: Bound to inputs the flow no longer has.

  3. Try the child alone

    Run test → Run this flow runs the child on its own with the values shown — the parent does not run. Inputs bound to an earlier step have no value yet, so the tab asks you for one (test only — not saved to the bindings).

  4. Use its output

    The step’s output is the child flow’s output — what its last step returned. Bind a later input to output.result, or whatever the child returns.

The child’s run

Each call creates a separate run of the child, linked to the parent. On the parent’s run canvas the Flow step carries an Expand this flow button: the child’s executed steps open inline, in their own shaded region marked Flow, with their statuses and times; Collapse this flow folds them back. Expansion goes one level deep — a subflow inside the expanded child stays a single step there. A step that never ran has nothing to expand.

View child run opens the child’s run on its own page, and Edit flow opens the child itself. On the project’s Runs page the child is not a separate top-level row: it unfolds under its parent.

The child…The parent’s step
succeedssucceeds with the child’s output
failsfails: flow 'name' failed: … with the child’s error
ends Completed with errorssucceeds, and the parent run also ends Completed with errors
waits for an approvalthe parent waits too, and follows the child’s decision

Run an AI Scraper as a step

An AI Scraper that you have published is callable the same way. Pick AI Scraper in the add menu; Choose a scraper lists the project’s published scrapers (none yet: No published scraper in this project yet — publish one on the Scrapers page).

  • Inputs are the inputs the published version declares (text, number or date), each a binding row. A constant of the wrong type, or a binding onto an input the scraper does not declare, is refused at publish and at run with invalid_parameter.
  • Step timeout bounds the scraper run: past it the scraper run is cancelled and the step fails with timeout. Empty (No step timeout) means only the flow’s own time limit applies.
  • Run test → Run this scraper runs the published scraper alone and reports Test passed — 20 rows. Open scraper opens it in the Studio.

The output carries the rows. When the result is too big to keep in the run (over 5 MB), rows is empty and downloadPath points at the stored result; a later loop still reads every row. In a run, Open scraper run opens the scraper’s own run with its screenshots.

Expected outputSuccessAn AI Scraper step’s output; bind output.rows or output.count
{
  "rows": [
    {
      "title": "A Light in the Attic",
      "price": 51.77
    }
  ],
  "count": 1,
  "runId": "2f4c…",
  "downloadPath": null
}

Rules and error codes

  • A caller runs the latest published version of the child flow or scraper; the flow file records no version pin.
  • scraper_not_found — the scraper is missing or belongs to another project; scraper_not_published — it has no published version. Both are checked at publish and at run.
  • scraper_failed — the scraper run failed; its own error comes along (a credit problem stays credit_exhausted).
  • A step timeout on a Flow step bounds the child run too; cancelling or timing out the parent cancels the child.