Control flow demos¶
Five tasks demonstrating task composition, loops, JS conditions, and nested recording.
call¶
Run another task's flow inside the current window, then use its results.
flowchart TD
A["control/call starts"]
B["call basics/title<br/>(reuses same window)"]
C["page.title available<br/>in template context"]
D["return title string"]
A --> B --> C --> D
Concepts: call action, task reuse, template context from called task.
Build libraries of small tasks and compose them — the Concio bundle uses
this heavily (setup → list-chats → get-messages).
loop¶
Repeat steps while a condition holds — iterate over pages, retry on failure.
Concepts: loop with a while condition and a body, pagination.
See also Crawl → quotes-paginated.
loop-fn¶
Same as loop but the condition comes from a JS module.
Concepts: fn modules in loop conditions, cleaner complex logic.
await-js¶
Block until a JavaScript expression returns true.
Concepts: waiting for JS-driven UI state, SPAs, lazy widgets.
record-step¶
Record a GIF of a single step (not the whole flow).
Concepts: combining Recording with granular step control.
Control flow cheat sheet¶
| Action | Purpose |
|---|---|
call |
Run another task inline |
loop |
Repeat while condition true |
await-js |
Poll until JS returns true |
set |
Bind a variable |
return |
Early exit with value |
for-each |
Iterate over an array |
Full reference: Actions