add_flow_to_scenario
Append a flow or saved scenario to a scenario's sequence, resolving dataset tokens or YAML for multiple runs and capturing output from flow targets.
Instructions
Append a flow OR another already-saved scenario to a scenario's composed sequence, as a RUN CONFIG -- the exact same dataset-tokens/raw-YAML pair live_replay_flow's own dataset/params resolve, not a per-field override map. Pass exactly one of flowId (the common case) or composeScenarioId (compose another scenario instead -- both are plain functions now, so calling one from another is no different from calling a flow; rejected if it would create a composition cycle, directly or transitively). datasetTokens is a comma/space-separated list of the target's own dataset indices/names (blank = its first/default dataset); naming more than one makes this ONE entry run its target multiple times in sequence, right here in the scenario. useYaml+yaml is the raw fallback for a one-off value not worth saving as a named dataset -- a YAML/JSON object (one run), or a list of objects (one run per entry), each used as the target's own params directly (yaml is ignored unless useYaml is also true). postprocess is an expression evaluated over EACH resolved run's own params object right before it fires, receiving params (that run's own object) plus every other name already in scope (global variables, this scenario's own dataset fields, and any EARLIER entry's own captured output) -- expected to return the (possibly modified) whole params object; only meaningful for live_replay_scenario/live_start_scenario_run, evaluated in the connected tab's own page context. Output capture is automatic, not an opt-in field here, and only ever applies to a FLOW target: when it declares output fields (set_output_field) and populates its own out object via a setVariable step, that output becomes a scenario-scoped variable every LATER entry can reference by name -- <camelCase flow name>Output (a numeric suffix added only if this scenario references the same flow more than once), holding a single value normally, or an array of every run's own output if this entry resolved to more than one run. A composed-scenario entry never captures output -- scenarios don't declare an output shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| yaml | No | ||
| flowId | No | ||
| project | No | Path to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted. | |
| useYaml | No | ||
| scenarioId | Yes | ||
| postprocess | No | ||
| datasetTokens | No | ||
| composeScenarioId | No |