> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ingestly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub-workflow trigger

> Start a reusable section that another workflow calls, with a declared input contract.

The sub-workflow trigger makes a workflow **callable**: another workflow can run it as a reusable section with a [Call workflow action](/nodes/call-workflow) instead of duplicating the same steps. It declares the input contract the caller must fill, and hands that data to the rest of the section.

A workflow becomes callable as soon as it has a sub-workflow trigger. Add a single [Return output](/nodes/return) when the caller should receive data back; without one the section is a terminal stage and the call completes with an empty payload. See [Reusable sections](/guides/reusable-sections) for the whole pattern.

## Configuration

| Field              | Type           | Required | Description                                     |
| ------------------ | -------------- | -------- | ----------------------------------------------- |
| **Input contract** | schema builder | Yes      | The fields this section expects from its caller |

### Input contract

The contract is the interface every caller maps into. Each field you declare here appears in the caller's mapping panel, and each field you mark required must be mapped before the caller's workflow can be saved.

Declare a contract with **no fields** when the section only needs the document itself. That is a deliberate choice, not an empty configuration: the section still runs, it just reads nothing from its caller.

<Warning>
  Changing the contract can break callers that already map into it. Adding a required field, or renaming one, makes every existing caller's mapping incomplete. Ingestly flags those callers when you save and disables them until their mappings are fixed, so they fail loudly at save time rather than silently at run time.
</Warning>

## Callers

The editor lists every workflow already calling into this one, right on this node, so you can see who depends on it before you touch the contract. Each entry names the calling workflow and links to it when it is in your current environment and workspace; a caller in a different environment or workspace is named with a badge instead of a link.

## Coexistence with other triggers

A callable workflow can keep its ordinary triggers. A workflow with both a sub-workflow trigger and an upload trigger can be called as a section **and** run on its own from an upload, which is how you test a section without a caller. Only the trigger that actually started the run executes; the others are recorded as skipped.

The sub-workflow trigger itself is only ever entered by a call. Submitting a document directly does not start it.

## Inputs and outputs

**Allowed inputs:** none. This is a trigger node.

**Output:**

| Path                         | Type   | Description                                                           |
| ---------------------------- | ------ | --------------------------------------------------------------------- |
| `payload`                    | object | The data the caller mapped into this contract, shaped by the contract |
| `metadata.subWorkflow.pages` | array  | The document's page numbers, always the whole document                |

Downstream nodes read contract fields directly, for example `{{Section input.payload.vendor.name}}`.

The section runs on the **caller's document**, over all of its pages. A section is not a page subset: splitting a document into page groups is what the Split action's fan-out is for.

## Credits

The trigger itself is free. The section's own steps bill normally, on the section's run.

## Related

<CardGroup cols={2}>
  <Card title="Call workflow action" icon="phone-arrow-up-right" href="/nodes/call-workflow">
    Call this section from another workflow
  </Card>

  <Card title="Return output" icon="arrow-turn-down-left" href="/nodes/return">
    Declare what the section hands back
  </Card>

  <Card title="Reusable sections" icon="recycle" href="/guides/reusable-sections">
    The whole pattern, end to end
  </Card>

  <Card title="Forward trigger" icon="share-from-square" href="/nodes/forward-trigger">
    Receive a forwarded document instead of being called
  </Card>
</CardGroup>
