Workflow Parallel Branches
Let several AI employees in a workflow each do a step at the same time: how to build it (asking AI to help is the easiest way), the rules for parallel branches, how the merge step waits, structure warnings, and how to inspect each branch in the run details
Last updated:
Parallel Branches Overview
When a step has two or more outgoing paths with no condition, the branches behind those paths start running at the same time. These are parallel branches. They suit several independent jobs that can run together (for example, several AI employees each fetching one set of data). The total time is roughly that of the slowest branch instead of the sum of all steps.
How this differs from Conditional Branch: a conditional branch has conditions on its outgoing paths and takes only the one whose condition is met each time. In parallel branches, no path has a condition, so every path runs.
On the canvas, a group of parallel branches is surrounded by a dashed box. The corner of the box says how many branches there are and that they start at the same time, and the first step of each branch is labeled A, B, C above it. When you select the step where the flow splits, or any step inside a branch, the top of the configuration panel on the right tells you which branches it starts together with.
Prerequisites and Rules
- Only people who can edit the workflow can change it. For permissions, see Build a Workflow.
- Only Hand Off to AI Employee steps can go inside a branch. Put other step types before the split or after the merge.
- Every branch needs at least one step. A branch cannot connect directly from the split to the merge.
- The last step of every branch must connect to the same Merge Branches step, and its Wait Mode must be Wait for All Branches: For use after parallel branches. Continues downstream after all branches finish; if any branch fails, the others stop and the run fails. This merge can only take this one group of branches. If other lines need to join in, add another merge step after it and set it to Continue by Executed Branch.
- When the upstream is parallel branches, you cannot choose Continue by Executed Branch. A merge after a Conditional Branch is the opposite and must use Continue by Executed Branch. When you add a new merge step whose upstream is parallel branches, Wait for All Branches is selected automatically. An existing merge shows the hint The upstream of this step is parallel branches. We recommend choosing "Wait for All Branches".
- A step cannot have both conditional outgoing paths and two or more unconditional ones, and two unconditional paths cannot lead to the same step.
- The step that a loop step returns to cannot be inside a branch.
- Branches cannot reference each other's results. Steps after the merge must reference the merge step's output, not steps inside a branch. The Upstream Parallel Branches and What This Step Outputs sections in the merge step's panel list the last step of each branch and its results, told apart by step identifier.
- A run can execute at most 4 Hand Off to AI Employee steps at the same time. Extra steps wait in a queue and start automatically when one finishes. Queue time does not count toward the step's maximum run time.
- If any branch fails, the other branches stop right away, the whole run fails, and steps after the merge do not run. Emails already sent and files already written are not undone.
How to Build It
- Ask AI to help: click Ask AI to Help at the top left of the canvas and explain which AI employees should do what at the same time, and how to combine the results. It builds the split, each branch and the merge step. Only Hand Off to AI Employee can go in a branch; it places other steps before the split or after the merge and explains why they are not in a branch. For how to use the chat bar, see Build a Workflow.
- Edit it yourself on the canvas: you cannot drag connection lines on the canvas, and there is no dedicated button for building parallel branches. There is only one place to add an outgoing path to a step: select a Conditional Branch step, click Add Branch under Outgoing Edges (Branches), and create a new step or choose Connect to Existing Step. Then, in the Edge Condition panel that opens, clear Trigger Condition (when) so that the path has no condition.
- Apart from Conditional Branch, other steps have no way to add new connections after them, so a step newly created from Add Branch cannot be connected to a merge step. There is no canvas action that connects a branch directly back to a merge.
- For a workflow that already has parallel branches (for example, one shared, imported or copied from someone else), you can still edit the configuration of every step inside the branches on the canvas, as well as the Wait Mode of the merge step.
Structure Warnings
- A step with a problem is marked red on the canvas. Select it and the top of the configuration panel on the right describes the problem and how to fix it. A branch line that is not connected to a merge is drawn as a red dashed line.
- The issue list under Warnings in the toolbar has the same descriptions. Issues marked Blocks Publishing prevent publishing; you cannot publish until you fix them.
- While the draft has this kind of structure problem, the Test Run button is grayed out, and the bottom of the issue list says you must fix structure problems before you can test.
What to Check While It Runs
- At the top of the Run tab in the run details, a summary line shows how many branches have started and how many of them are running, queued, awaiting human input or completed. When all are done, it says the merge step has continued downstream. On failure, it says which step of which branch failed and why, and how many other branches were stopped or completed; when several fail at once, each is listed.
- On the canvas, queued steps show a clock icon (Queued), and steps that were stopped show a Stopped icon, in a color different from the red used for failures.
- Click a step on the canvas and the top of Node Details shows its status:
- Queued: The number of "Hand Off to AI Employee" steps running at the same time in this run has reached the limit. This step starts automatically when one of them finishes. Queue time does not count toward the maximum run time.
- When a merge step is waiting: Waiting: Waiting for all parallel branches to finish.
- Not executed: An upstream step failed, so this step did not start.
- Stopped: it says whether this is because a step in a particular branch failed, someone stopped the run manually, a new debug round was started, or someone took over editing. An operation that was in progress when the run stopped may still finish.
- Executed before stop: This step finished before the run stopped. External writes that were already made are not undone.
- When a branch pauses to wait for a person, the whole run shows Awaiting Human while the other branches keep running. When several steps wait for people at the same time, the Run tab shows a separate form for each, and you submit them one by one.
- Click Stop Run to stop all branches.
Parallel Branches FAQ
- Why didn't the AI employees all start at the same time? A run can execute at most 4 Hand Off to AI Employee steps at once. Extra steps show Queued and start automatically when one finishes.
- Can I put an approval, code execution or email step inside a branch? No. Only Hand Off to AI Employee can go in a branch. Place those steps after the merge and use the merge step's output.
- If one branch fails, are the results of the other branches kept? The whole run counts as failed and steps after the merge do not run. Steps in other branches that already finished are marked Executed before stop: This step finished before the run stopped. External writes that were already made are not undone.
- The Test Run button is grayed out? The draft has a parallel structure problem. Open the issue list under Warnings and fix what it points out, then you can test.