JustPaid Workflows
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
inputJSONInput data to pass to the sub-workflow
waitForCompletionbooleanWait for the sub-workflow to finish (default: true)

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

On this page