Skip to content
APIANT
GuidePlatformv1

Subroutines

Reusable sub-flows with formal input/output fields — synchronous, same-account, returns data.

Subroutines are reusable sub-flows that other automations can call. The counterpart to Execute Automation — same "call one automation from another" idea, but synchronous and data-returning.

What it's good for

  • Logic shared across automations — one place to update, one place to test.
  • Calls that need a real return value — the caller continues with the subroutine's output, not just a success/failure signal.
  • Avoiding duplication across automations that all need the same transform, lookup, or calculation.

Subroutine vs Execute Automation

MethodData returnSync / asyncParameter passingCross-account
SubroutineYes — formal output_fieldsAlways syncFormal input fields on triggerSame account only
Execute AutomationNo — only error propagatesSync or fire-and-forgetQuery stringAny account

Related docs

Last updated May 4, 2026