Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypha-docs.plinqx.app/llms.txt

Use this file to discover all available pages before exploring further.

The SUBFLOW node calls another flow, allowing you to reuse flow logic and create modular, composable workflows.

Overview

SUBFLOW nodes enable:
  • Flow Reusability: Reuse existing flows as building blocks
  • Modular Design: Break complex flows into smaller, reusable flows
  • Composition: Build complex workflows from simpler flows
  • Async Execution: Execute subflows synchronously or asynchronously

How It Works

1

Select Flow

Choose the flow to call as a subflow.
2

Map Inputs

Map current flow variables to subflow inputs.
3

Execute Subflow

Subflow executes with provided inputs.
4

Access Output

Subflow output available in subsequent nodes.

Configuration

Flow Selection

Select the flow to call:
  • Available Flows: Choose from flows in your tenant
  • Published Flows: Only published flows can be called
  • Version: Use specific flow version or latest

Input Mapping

Map current flow variables to subflow inputs:
{
  "userId": "{{START.userId}}",
  "action": "{{START.action}}",
  "data": "{{transform.output}}"
}

Execution Mode

Choose execution mode:
  • Sync (Await): Wait for subflow to complete
  • Async (Fire and Forget): Don’t wait for completion
Sync mode returns subflow output. Async mode returns immediately with flow run ID.

Accessing Subflow Output

Access subflow output in subsequent nodes:
{{subflow_node.output.result}}
{{subflow_node.output.data}}
{{subflow_node.flowRunId}}

Error Handling

Subflow errors propagate to parent flow:
  • Error Propagation: Subflow errors cause parent flow to fail
  • Error Details: Access error details in error handling nodes
  • TRY Node: Use TRY node to handle subflow errors gracefully

Best Practices

Modular Design

Design flows to be reusable

Clear Interfaces

Define clear input/output schemas

Handle Errors

Use TRY nodes for subflow error handling

Avoid Circular

Avoid circular subflow dependencies

Use Cases

  • Reusable Logic: Common operations used in multiple flows
  • Complex Workflows: Break complex flows into manageable pieces
  • Team Collaboration: Share flows across teams
  • Versioning: Update subflow logic without changing parent flows

Next Steps

TRY Node

Handle subflow errors

Transform Node

Transform subflow outputs