Skip to content

Glossary · Workflow design

Sub-workflow

Also called: child workflow, nested workflow, reusable workflow

A sub-workflow is a workflow that another workflow calls as one of its steps, passing data in and getting a result back, so shared logic is built once and reused.

Sub-workflows are functions for automation. When three workflows all need to "find or create the customer in the CRM, then log the interaction", you can copy those steps three times and fix bugs three times, or build them once as a sub-workflow and call it.

When to extract one

  • The same steps appear in more than one workflow. Customer lookup, address normalization, a standard Slack alert format.
  • One part changes on its own schedule. Pricing rules owned by finance, while the surrounding workflow is owned by ops.
  • A loop body is getting long. "For each line item" plus ten steps is easier to read as "for each line item, run Process line item".

Pitfalls

  • Hidden failures. If the child fails, does the parent stop, skip or carry on? Decide explicitly.
  • Contract drift. The child expects email; a parent sends customer_email. Treat inputs like an API contract and validate them at the top of the child.
  • Too much nesting. Two levels is readable. Five is a maze. If you need a diagram to explain the call chain, flatten something.

In Fluxo Flow

The Sub-workflow node runs another workflow in your workspace as a step; the child's output comes back as the node's output. A common pattern is a nightly sync: a cron schedule fetches changed records, a Loop runs a shared "upsert the record" sub-workflow for each one, and an Error Handler posts failures to Slack. Sub-workflows count toward your plan's workflow limit like any other workflow.

All 40 glossary terms

Build your first workflow today.

Build and Dry Run on the Free plan, no credit card. Run live on a paid plan, on your own AI key at cost.

Free to explore · No credit card · 30-day money-back guarantee on paid plans