Skip to main content

Subflow Node

Purpose: Execute reusable workflow components Subflow nodes contain nested workflows that can be reused across multiple parent workflows.
Subflow node visual representation showing nested workflow canvas
Subflow node visual representation showing nested workflow canvas
Node Structure: Subflows contain a nested canvas with their own Start and End nodes. The image above shows:
  • Left: Start node (entry point to subflow)
  • Right: End node (exit point from subflow)
  • Canvas: Isolated workflow area for building reusable logic
Parent Workflow ConnectionWhen viewed from the parent workflow, subflow nodes have standard handles:
  • Input Handle (Left): Receives data from parent workflow
    • Passes data to subflow’s Start node
    • Triggers subflow execution
  • Output Handles (Right):
    • PARALLEL: Main output after subflow completes
      • Returns data from subflow’s End node
      • Continues parent workflow
    • ERROR: Error handling path
      • Activated on subflow execution errors
      • Passes error details to parent
Features:
  • Encapsulation: Isolated execution context
  • Reusability: Use same subflow in multiple places
  • Iteration: Can loop within subflow (agent patterns)
  • Parameters: Pass data in/out via start/end nodes
  • Resizing: Adjust canvas size to fit nested workflow
Agent Subflow Pattern:
The subflow loops internally until the LLM completes its task, then returns results to the parent workflow.

Configuration

Common Configuration

Description: A user-defined name to identify this subflow node in your workflow.Type: StringRequired: YesExample:
"Process Items"
"Agent Loop"
"Batch Processor"
Description: Choose what to iterate over in this subflow.Type: SelectRequired: YesOptions:
  • Number of Times (Count) - Execute subflow N times
  • List of Items - Execute subflow once for each item in a list
When to Use:
  • Count: Fixed number of iterations (e.g., retry 3 times, generate 10 variations)
  • Items: Process dynamic lists (e.g., batch processing, multi-item workflows)
Description: How iterations should be executed.Type: SelectRequired: YesOptions:
  • Sequential (one after another) - Execute iterations in order, one at a time
  • Parallel (all at once) - Execute all iterations simultaneously
When to Use:
  • Sequential: When order matters, rate limiting needed, or processing depends on previous results
  • Parallel: For independent tasks, faster processing, batch operations
Example:
Sequential: Process queue messages in order
Parallel: Generate thumbnails for 100 images simultaneously
Parallel execution may hit API rate limits. Use sequential mode with delays for rate-limited services.

Count-Based Iteration

These fields appear when Iterate Over = “Number of Times (Count)”
Description: How many times to execute the subflow.Type: NumberRequired: YesMinimum: 1Example:
3     # Retry logic (3 attempts)
10    # Generate 10 variations
100   # Process 100 times
Use Cases:
  • Retry mechanisms
  • Bulk generation (multiple outputs)
  • Fixed batch processing
  • Agent thinking loops (max iterations)
Description: Wait time between sequential iterations.Type: NumberRequired: NoDefault: 0Minimum: 0Visibility: Only when Execution Mode = “Sequential”Example:
0     # No delay
1     # 1 second between iterations
5     # 5 seconds between iterations
60    # 1 minute between iterations
Use Cases:
  • Rate limiting (avoid API throttling)
  • Polling with intervals
  • Controlled execution speed
  • Respect service quotas
Use delays to stay within API rate limits. For example, 1 second delay = max 60 requests/minute.

List-Based Iteration

These fields appear when Iterate Over = “List of Items”
Description: The items to iterate over.Type: Editor (Pongo template)Required: YesHow It Works: Provide items in the format selected below. Each item becomes one subflow execution.Supports:
  • Template variables: {{ start.items }}
  • Static data
  • Dynamic lists from previous nodes
Example (JSON Array):
{{ start.user_list }}
Example (Plain Text):
item1
item2
item3
Description: How the items are formatted.Type: SelectRequired: YesOptions:
  • Plain Text (one per line) - Each line is one item
  • JSON Array - Standard JSON array format
  • CSV - Comma-separated values
Plain Text Example:Each line = one subflow executionJSON Array Example:
[
  {"name": "Alice", "email": "[email protected]"},
  {"name": "Bob", "email": "[email protected]"},
  {"name": "Charlie", "email": "[email protected]"}
]
Each object = one subflow executionCSV Example:
name,email,age
Alice,[email protected],30
Bob,[email protected],25
Charlie,[email protected],35
Each row (except header) = one subflow execution
Accessing Item Data: Inside the subflow, use {{ start.item }} to reference the current iteration’s item.
Description: Wait time between sequential iterations.Type: NumberRequired: NoDefault: 0Minimum: 0Visibility: Only when Execution Mode = “Sequential”Example:
0     # No delay
1     # 1 second between items
5     # 5 seconds between items
Use Cases:
  • Process items with rate limiting
  • Batch operations with controlled speed
  • API calls with quotas
When processing large lists sequentially with delays, total execution time = items × (subflow_time + delay).

Node Handles