ZelaxyDocs
Core Blocks
Block

Workflow Block

Call another workflow as a sub-workflow for modular composition

Workflow Block

The Workflow block executes another saved workflow as a reusable sub-workflow. This enables modular, composable automation — build complex systems by combining smaller, tested workflows.

Overview

PropertyValue
Typeworkflow
CategoryCore Block
Color#6366f1 (Indigo)

When to Use

  • Reuse a workflow across multiple parent workflows
  • Break complex logic into smaller, testable units
  • Call a shared "send notification" or "process data" workflow from multiple places
  • Build layered agent systems (orchestrator → specialist agents)

Configuration

SettingTypeDescription
Workflow IDDropdownSelect from your saved workflows
InputLong textData to pass to the sub-workflow's Starter block
Wait for CompletionToggleWait for sub-workflow to finish (default: true)

Outputs

FieldTypeDescription
resultanyThe sub-workflow's Response block output
statusstringExecution status (completed, failed)
executionTimenumberDuration in milliseconds

Example: Orchestrator Pattern

Goal: A master workflow routes tasks to specialized sub-workflows.

Master Workflow:

[Starter] → [Router] → [Workflow: Email Handler]     (Route 1)
                      → [Workflow: Research Agent]    (Route 2)
                      → [Workflow: Data Analyzer]     (Route 3)

How it works:

  1. User sends a request to the master workflow
  2. Router classifies the intent
  3. The appropriate sub-workflow is called with the user's input
  4. Sub-workflow executes its own blocks and returns its Response
  5. Master workflow gets the result in {{workflow.result}}

Tips

  • Test sub-workflows independently before calling them from parent workflows
  • Pass structured data as input for clarity: {"task": "...", "context": "..."}
  • Avoid deep nesting — 2–3 levels of sub-workflows is manageable; deeper gets hard to debug
  • Sub-workflows share credentials from the same workspace