Workflow Triggering
Workflows can trigger other workflows — composing modular units of work at runtime rather than merging everything into one giant workflow. A "Research" workflow stays independent and reusable, but an "Optimize" workflow can trigger it on demand, wait for results, and proceed with fresh data.
There are two triggering patterns:
| Pattern | Who decides | When | How to enable |
|---|---|---|---|
| Agent-initiated | The agent at runtime | An agent decides it needs results from another workflow | Enable Trigger Workflows on the assignment |
| Outcome-routed | Deterministic routing | A stage outcome maps to a workflow target | Configure a workflow target in outcome routing |
Both patterns run the triggered workflow as a separate run, wait for it to complete, and capture its results. The triggered workflow executes normally — it does not know it was triggered by another workflow.
Agent-Initiated Triggering
An agent mid-workflow decides it needs results from another workflow. This is an autonomous decision — the agent assesses its context and determines that fresh data from a separate workflow would improve its output.
How It Works
When an agent has the Trigger Workflows capability enabled on its assignment, it can start another workflow by name, optionally pass context to it, and wait for the results. The calling agent blocks until the triggered workflow completes.
The agent provides:
- Which workflow to trigger (by name — must be in the same project)
- Context (optional) — a message that agents in the triggered workflow see as their starting input
- Timeout (optional) — how long to wait before giving up (defaults to 5 minutes)
What Happens During Triggering
- The triggered workflow starts as a new, independent run.
- The calling agent blocks until the triggered workflow completes or times out.
- Other agents in the calling workflow continue working — only the agent that initiated the trigger is paused.
- When the triggered workflow finishes, the calling agent receives the results and resumes.
Workflow: "Optimize Website"
Stage: "Analyze & Improve"
Agent "Optimizer" starts work
→ Decides: "I need fresh analytics data"
→ Triggers the "Analyze Website" workflow
with context: "Focus on landing page conversion"
→ Optimizer waits...
... Meanwhile, other agents in this stage continue working ...
... "Analyze Website" runs as a separate workflow ...
... Its agents complete their analysis ...
... Results are captured ...
→ Optimizer receives the analysis results
→ Proceeds to optimize based on fresh data
Results
The triggered workflow's output is returned to the calling agent:
- Structured data — if agents in the triggered workflow shared results, those are merged and returned.
- Narrative output — if the triggered workflow produced text rather than structured data, the final output is returned.
- Completion notice — if the triggered workflow produced no explicit output, a generic completion message is returned.
Failure and Timeout
If the triggered workflow fails or times out, the calling agent receives the error and decides what to do — retry, proceed without the data, or report the issue. The platform does not make recovery decisions for the agent.
Enabling the Capability
The ability to trigger workflows is only available to agents with the Trigger Workflows capability enabled on their assignment. See Assignments for the full list of capabilities.
In the Workflow Builder, open an assignment drawer and toggle Trigger Workflows in the capabilities section. The capability icon appears on the assignment node when enabled.
Example Use Case
A weekly content workflow has two independent workflows in the same project:
- "Analyze Engagement" — Pulls analytics data, identifies top-performing topics, and produces a structured report.
- "Write Newsletter" — Researches topics and writes a newsletter draft.
Without triggering, you would either merge both workflows into one (losing modularity) or run them independently and hope the data is fresh. With triggering:
- The "Write Newsletter" workflow starts.
- The writer agent triggers the "Analyze Engagement" workflow with context: "Focus on this week's blog posts".
- The analytics workflow runs independently and produces its report.
- The writer agent receives the report and uses it to inform the newsletter content.
Both workflows remain independently runnable. The analytics workflow can still be triggered on its own schedule, used by other workflows, or run manually.
Outcome-Routed Triggering
Beyond agent-initiated triggering, workflows can be triggered deterministically through outcome routing. When a stage completes with a particular outcome, the routing target can be a workflow instead of another stage — no agent decision required.
This is particularly powerful when combined with blocking hooks and approval gates: a human approves via Telegram, the outcome routes to a deployment workflow, and the parent workflow ends.
Configuration
In a stage's outcome routing, any outcome can target a workflow instead of a stage. You configure this in the Stage Drawer under outcome routing, specifying:
| Field | Description |
|---|---|
| Target workflow | The workflow to trigger (must be in the same project). |
| Input | Initial context for the triggered workflow — what it should do. |
| Continue at | Where the parent workflow goes after the triggered workflow completes. A stage name, or end the workflow. |
For example: the "approve" outcome triggers the "Deploy to Production" workflow, while "reject" routes to the Archive stage and "revise" loops back to the Draft stage.
What Happens
Stage "Review" completes → outcome is "approve"
→ Outcome routing resolves to a workflow target
→ "Deploy to Production" starts as a separate run
→ Parent workflow waits for it to complete
→ Triggered workflow's results become available to subsequent stages
→ Parent workflow follows the "continue at" directive (e.g., ends)
Combined Example: Human Approval Triggers a Workflow
A content review workflow where human approval triggers a separate publishing pipeline:
Stage: "Quality Review"
- Agents complete their review work.
- A blocking exit hook sends the result to a reviewer via Telegram with options: Approve, Reject, Revise.
- The reviewer's response becomes the stage outcome.
- Outcome routing maps "Approve" to the "Publish Content" workflow.
The flow: agents complete the review → the exit hook messages the product manager on Telegram → the PM taps "Approve" → the "Publish Content" workflow runs to completion → the parent workflow ends.
Error Handling
If the triggered workflow fails, the error is logged and the "continue at" directive is followed regardless. This prevents a failed triggered workflow from leaving the parent workflow stuck indefinitely.
Scope and Limits
Same Project Only
Workflow triggering is scoped to the same project. A workflow can only trigger other workflows that belong to its project. Cross-project triggering is not supported.
Recursion Depth
Triggered workflows can themselves trigger other workflows, creating a chain. A hard depth limit of 3 prevents infinite chains:
Workflow A (depth 0)
→ triggers Workflow B (depth 1)
→ triggers Workflow C (depth 2)
→ triggers Workflow D (depth 3) → ERROR: depth limit exceeded
Direct recursion (Workflow A triggers Workflow A) is caught at depth 1 the second time.
Triggering vs. Other Composition Patterns
| Pattern | What it does | When to use |
|---|---|---|
| Workflow triggering (agent-initiated) | Agent starts a full workflow, waits for results | When an agent needs results from an independent multi-stage process |
| Workflow triggering (outcome-routed) | Stage outcome launches a different workflow | When a deterministic decision should launch independent work |
| Subagents | Spawns lightweight parallel task runners | When you need quick parallel work within a single stage |
| Subagents + Triggering (Swarm) | Subagents trigger workflows in parallel | When you need N independent multi-stage workflows running simultaneously |
| Outcome routing (to a stage) | Routes to a different stage in the same workflow | When branching within the current workflow is sufficient |
| Triggers (scheduled) | Starts a workflow on a time-based schedule | When workflows should run on a recurring basis |
| Triggers (webhook) | Starts a workflow when an external system sends an event | When external events (CI/CD, GitHub, Zapier) should fire a workflow |
Related
- Subagents — Parallel task runners, including the Swarm Pattern
- Assignments — Where you enable the Trigger Workflows capability
- Outcomes & Routing — How outcome routing works, including workflow targets
- Hooks — Blocking hooks for approval gates
- Human-in-the-Loop — Approval gate pattern that pairs naturally with workflow triggering