# Start a subflow

Source: https://neondeerdata.com/docs/platform/automations/triggers/start-subflow/

Trigger · Subflows

Starts this workflow when another workflow calls it for a record.

[Subflow setup and worked example](https://neondeerdata.com/docs/platform/automations/subflows/)

## Inputs

| Label  | Key      | Type   | Required | Notes                                         |
| ------ | -------- | ------ | -------- | --------------------------------------------- |
| Object | `object` | Object | Yes      | Choose the same object the calling step uses. |

## Outputs

| Label               | Key                   | Type      | Always set | Notes |
| ------------------- | --------------------- | --------- | ---------- | ----- |
| Record              | `record`              | Record    | Yes        |       |
| Record ID           | `record_id`           | Text      | Yes        |       |
| Subflow ID          | `subflow_id`          | Text      | Yes        |       |
| Triggered at        | `triggered_at`        | Timestamp | Yes        |       |
| Started by workflow | `started_by_workflow` | Text      | Yes        |       |
| Calling run URL     | `calling_run_url`     | Text      | Yes        |       |
| Input 1             | `input_1`             | Text      | Yes        |       |
| Input 2             | `input_2`             | Text      | Yes        |       |
| Input 3             | `input_3`             | Text      | Yes        |       |
| Input 4             | `input_4`             | Text      | Yes        |       |
| Input 5             | `input_5`             | Text      | Yes        |       |

## How it behaves

- Turn the workflow on before selecting it in a Call a subflow step for the same object.
- The trigger supplies the record, the input values, and a Subflow ID identifying this call. An input not passed by the caller arrives as empty text.
- Map this trigger's Subflow ID into Return from a subflow to send the result to the calling workflow.

## Errors

Turning the workflow on or off fails when

- If the workflow cannot be registered, check Automations setup and your plan, then turn the workflow on again.

Triggers have no error branch. When something goes wrong inside a trigger, no run starts. See [Troubleshooting](https://neondeerdata.com/docs/platform/automations/troubleshooting/).

## Example

A demo-request workflow calls a shared Companies routing workflow.

**Example inputs**

| Event    | Value     |
| -------- | --------- |
| `Object` | Companies |

**Example outputs**

| Output     | Value                         |
| ---------- | ----------------------------- |
| Record     | Acme Corp (Companies)         |
| Subflow ID | The ID supplied for this call |
| Input 1    | North America                 |

Use the returned Subflow ID when sending values back to the caller.
