Loopfour
Blocks

Sub-workflow Block

Call another workflow as a step for composable automation

The Sub-workflow block calls another workflow as a step within the current workflow. Use it to build reusable workflow components -- for example, a standard invoice creation workflow that can be called from multiple trigger workflows.

Configuration

OptionTypeDescription
workflowIdstringThe ID of the workflow to call
inputJSON objectPassed to the sub-workflow as its input, so the child reads it as {{input.<field>}}
waitForCompletionbooleanWait for the sub-workflow to finish (default: true)
timeoutMinutesnumberHow long to wait for the sub-workflow when waitForCompletion is on (default: 5, maximum: 1440)

input must be a JSON object. The step fails before starting the sub-workflow if input is text, an array, or a single value, or if it leaves out (or leaves empty) a field the sub-workflow's input schema marks as required. Without that check, every {{input.<field>}} in the sub-workflow would resolve to an empty value and the run would fail later, at a step far from the cause.

Workflows saved before this field was renamed may still use inputMapping (for input) or timeout in milliseconds (for timeoutMinutes). Both are still read, and the next save in the editor moves them to the current names. A value that cannot be moved (it differs from the current field, or it is a templated timeout) appears in the editor as a Legacy field until you clear it.

Outputs

OutputTypeDescription
resultJSONThe sub-workflow's final output
runIdstringThe run ID of the sub-workflow execution
statusstringFinal status: completed or failed

Example Pattern

Reusable Invoice Creator

Main workflow:

Salesforce (deal won) -> Transform (extract deal data)
    -> Sub-workflow (Standard Invoice Creator)
    -> Slack (notify finance)

Sub-workflow ("Standard Invoice Creator"):

Start -> Stripe (create customer) -> Stripe (create invoice)
    -> Loop (add line items) -> Stripe (finalize) -> Stripe (send)

Frequently Asked Questions

Yes, but there is a depth limit of 25 nested calls to prevent infinite loops. The execution engine tracks the call chain and stops execution if the limit is exceeded.

Yes. Sub-workflows run in the same company context and have access to the same integration connections as the parent workflow.

If waitForCompletion is true and the sub-workflow fails, the Sub-workflow block follows the parent workflow's error handling strategy (fail, continue, or retry).

On this page