# Run flow

The Run Flow action node calls a [flow](/reference/flows.md) from within an [app](/reference/apps.md) action or from another [flow](/reference/flows.md).

### Usage

This action node is useful in the following cases:

* When integration logic or business logic should be shared across apps in a solution. The logic can be maintained in a flow and called from any app using Run Flow.
* When a flow needs to call another flow, for example, to chain an authentication step before a data retrieval step.

### Input mapping

When a flow and flow action are selected, the flow action's [action params](/reference/actions/action-params.md) are displayed on the action node. Each param is bound to a value from the calling context, e.g., a data source, an app variable, an action variable, or a function result. Params marked as required must have a value bound; optional params can be left unbound, in which case the action uses the param's default value.

If an action param has a [schema](/reference/platform-concepts/schemas.md) as its data type, click the three-dot menu on the param to open the data binding popover and select **Add schema**. This lets you bind data from the calling context directly to the individual properties of the action param's schema.

### Return mapping

When the flow action completes, any [action variables](/reference/actions/action-variables.md) and [action data sources](/reference/actions/action-data-sources.md) that are marked as returned from the action are available for mapping back into the calling context. The return mapping determines where the output data lands and how it is applied.

Each returned item is mapped to a target in the calling context — either an app data source, an action data source, an app variable, or an action variable. The target must match the returned data: a returned data source must be mapped to a data source backed by the same object class, a returned action variable must be mapped to a variable of the same data type, and if the data type is a schema, the schemas must have a matching structure.

The mapping mode controls how the returned data is applied to the target:

* **Replace** replaces the contents of the target data source with the returned data.
* **Add to Data Source (merge duplicates)** appends the returned data to the existing contents of the target data source and merges any duplicates. This mode is only available when the target is a data source with cardinality many.

If the returned data contains runtime properties that do not exist on the target, those properties are silently dropped.

### Properties

| Property                | Description                                                                                                                                                                     |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flow**                | Select the flow to call.                                                                                                                                                        |
| **Flow Action**         | Select the action from the selected flow to run.                                                                                                                                |
| **Action Params Input** | *Displayed if the selected flow action has action params.* Bind values from the calling context to each of the flow action's input params.                                      |
| **Return Data Mapping** | *Displayed if the selected flow action returns action variables or action data sources.* Map each returned item to a target in the calling context and select the mapping mode. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appfarm.io/library/action-nodes/run-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
