parallel

Schema Definition

type: object
required:
  - type
  - name
  - inputs
  - connections
properties:
  type:
    type: string
    enum: [parallel]
    description: Block type identifier
  name:
    type: string
    description: Display name for this parallel block
  inputs:
    type: object
    required:
      - parallelType
    properties:
      parallelType:
        type: string
        enum: [count, collection]
        description: Type of parallel execution
      count:
        type: number
        description: Number of parallel instances (for 'count' type)
        minimum: 1
        maximum: 100
      collection:
        type: string
        description: Collection to distribute across instances (for 'collection' type)
      maxConcurrency:
        type: number
        description: Maximum concurrent executions
        default: 10
        minimum: 1
        maximum: 50
  connections:
    type: object
    required:
      - parallel
    properties:
      parallel:
        type: object
        required:
          - start
        properties:
          start:
            type: string
            description: Target block ID to execute inside each parallel instance
          end:
            type: string
            description: Target block ID after all parallel instances complete (optional)
      success:
        type: string
        description: Target block ID after all instances complete (alternative format)
      error:
        type: string
        description: Target block ID for error handling

Connection Configuration

Parallel blocks use a special connection format with a parallel section:

Alternative format (legacy):

Child Block Configuration

Blocks inside a parallel block must have their parentId set to the parallel block ID:

Examples

Count-Based Parallel Processing

Collection-Based Parallel Processing

Complex Parallel Processing Pipeline

Concurrent AI Analysis

Parallel Variables

Inside parallel child blocks, these special variables are available:

Output References

After a parallel block completes, you can reference its aggregated results:

Best Practices

  • Use appropriate maxConcurrency to avoid overwhelming APIs

  • Ensure operations are independent and don't rely on each other

  • Include error handling for robust parallel execution

  • Test with small collections first

  • Monitor rate limits for external APIs

  • Use collection type for distributing work, count type for fixed instances

  • Consider memory usage with large collections

Was this helpful?