workflow

YAML configuration reference for Workflow blocks

Schema Definition

type: object
required:
  - type
  - name
  - inputs
properties:
  type:
    type: string
    enum: [workflow]
    description: Block type identifier
  name:
    type: string
    description: Display name for this workflow block
  inputs:
    type: object
    required:
      - workflowId
    properties:
      workflowId:
        type: string
        description: ID of the workflow to execute
      inputMapping:
        type: object
        description: Map current workflow data to sub-workflow inputs
        additionalProperties:
          type: string
          description: Input value or reference to parent workflow data
      environmentVariables:
        type: object
        description: Environment variables to pass to sub-workflow
        additionalProperties:
          type: string
          description: Environment variable value
      timeout:
        type: number
        description: Maximum execution time in milliseconds
        default: 300000
        minimum: 1000
        maximum: 1800000
  connections:
    type: object
    properties:
      success:
        type: string
        description: Target block ID for successful workflow completion
      error:
        type: string
        description: Target block ID for error handling

Connection Configuration

Connections define where the workflow goes based on sub-workflow results:

Examples

Simple Workflow Execution

Content Generation Pipeline

Multi-Step Analysis Workflow

Conditional Workflow Execution

Parallel Workflow Execution

Error Handling Workflow

Input Mapping

Map data from the parent workflow to the sub-workflow:

Output References

After a workflow block completes, you can reference its outputs:

Best Practices

  • Use descriptive workflow IDs for clarity

  • Map only necessary data to sub-workflows

  • Set appropriate timeouts for workflow complexity

  • Include error handling for robust execution

  • Pass environment variables securely

  • Test sub-workflows independently first

  • Monitor nested workflow performance

  • Use versioned workflow IDs for stability

Was this helpful?