Appearance
Variables and Parallel Execution
Variables and parallel execution are what make workflows truly powerful. Variables let you customize each run without changing the template. Parallel execution lets you process many videos at once.
Variables
What Are Variables?
Variables are placeholders in your workflow steps that get replaced with actual values when the workflow runs. Instead of hardcoding "Episode 42" into your template, you use a placeholder like , and the actual value gets filled in at runtime.
How to Use Variables
Variables are written with double curly braces around the variable name:
"Create a 90-second cutdown from episode focusing on ."
When the workflow runs with episodeNumber = 42 and topic = "hiring mistakes", the AI receives:
"Create a 90-second cutdown from episode 42 focusing on hiring mistakes."
Where Do Variable Values Come From?
Variables can be set in several ways:
- Workflow setup — You provide values when you launch the workflow (e.g., episode number, target duration, topic)
- Starter variables — When creating a workflow instance (via the management UI or the API), you can supply starter variables as a JSON object. These values are available to all steps from the start. In the management UI, expand the Advanced: starter variables section to edit them with the built-in JSON editor, or copy/paste a JSON object directly.
- Clone branch data — Each parallel branch can receive its own set of variable values
- Task results — Values generated during earlier steps can feed into later steps
Built-in Operations
Variables support more than simple substitution. Templates can also perform:
- Math operations — Add, subtract, multiply, divide values
- String manipulation — Format text, change case, concatenate values
- Comparisons — Check if values are equal, greater than, less than
- Boolean logic — Combine conditions with AND, OR, NOT
These operations are useful for building templates that adapt to different inputs without needing separate templates for each scenario.
How Comparisons Treat Your Values
When a template compares or branches on a variable, it doesn't matter how the value was typed: true matches "true" and 1, and 5 matches "5". In a conditional block, the values false, "false", 0, "0", and empty text all count as "off" — everything else counts as "on". Number comparisons always compare numerically, so 1200 is greater than 200 even when both are written as text. Plain text (anything that isn't a number or true/false) still has to match exactly, including capitalization.
Previewing Templates
The template editor includes a live preview pane that shows what the rendered output will look like with your current variable values. As your templates grow and use nested blocks (loops and conditionals), the preview color-codes each nesting level so you can see which parts of the output come from which block. Hover over any highlighted section to see a tooltip showing the full nesting path — which blocks produced that piece of text, from outermost to innermost. This makes it easy to debug complex templates with multiple levels of looping or conditional logic.
Parallel Execution
How It Works
The Clone step is what makes parallel execution possible. When a workflow hits a Clone step, it splits into N independent branches. Each branch:
- Runs completely separately from the others
- Runs its remaining steps independently
- Can have its own variable values
- Runs simultaneously with all other branches
A Practical Example
Imagine you have 10 podcast episodes and want a 60-second cutdown from each:
- Message step — "You are creating podcast cutdowns."
- Clone step — Create 10 branches, each with a different
episodeNumbervariable - Task step (runs in each branch) — "Create a 60-second cutdown from episode with captions. Render in 9:16."
All 10 branches run at the same time. Instead of processing episodes one by one, you get all 10 cutdowns produced in parallel.
Nested Clones
Cloned branches can themselves contain Clone steps, creating nested parallelism. For example, you could clone into 5 branches for 5 episodes, and then each branch clones into 3 sub-branches to create 3 different cutdowns per episode — giving you 15 cutdowns running simultaneously.
In practice, one level of cloning is usually enough. Nested clones are available for advanced use cases but aren't commonly needed.
What Happens When Branches Finish
Results from all branches are collected as they complete. The workflow tracks the status of each branch, so you can see which ones have finished and which are still running. When all branches complete, the workflow itself is marked as complete and can trigger callbacks.
Putting It All Together
Here's a real-world example of a batch processing workflow:
Template: "Weekly Podcast Batch"
- Message — "You are creating social media clips from podcast episodes. Target audience: tech professionals."
- Set Agent Settings — Use a capable model for creative work
- Clone — Create one branch per episode, with variables:
episodeNumber,episodeTitle,guestName - Task (in each branch) — "From episode ( with ), find a strong self-contained story. Create a 60-second cutdown. Add word-by-word captions. Render in 9:16 low quality."
Launch this workflow on Monday morning with 5 episodes, and come back to 5 ready-to-review cutdowns.
