# Run another flow

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2Fr4ZM6GNuNNmlZKVMjF43%2Fimage.png?alt=media&#x26;token=92615f8c-e97a-45b0-9eee-6c8a97ee3826" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FuPsY7W4irTy8noq81USM%2Fimage.png?alt=media&#x26;token=0915d6eb-7cdd-4417-b53b-8f0733bcd527" alt=""><figcaption></figcaption></figure>

## I. Description <a href="#description" id="description"></a>

*<mark style="color:red;">\*\*Just apply with flow, have type = App</mark>*

#### What it does

* Calls a **sub-flow** synchronously during the parent flow’s execution.
* Passes selected inputs (files, text, objects) from the **parent** to the **sub-flow**.
* Waits for the sub-flow to complete, then **exposes the sub-flow’s outputs** on the **Run another flow** node.

#### When to use

* You want to **reuse** a standardized mini-workflow (e.g., “Extract text from PDF”, “Normalize entities”, “Post to CRM”).
* You want to **decompose** a large flow into smaller maintainable units.
* Multiple teams/flows should **share** the same logic with one change point.

#### Concepts

* **Parent flow (Main flow):** the flow you’re currently building; it contains the **Run another flow** node.
* **Sub-flow:** a separate, reusable flow referenced by the parent. Its outputs are returned to the parent.

## II. How to use <a href="#description" id="description"></a>

### Step 1: Create Sub-flow

*<mark style="color:red;">\*\*Just apply with flow, have type = App</mark>*

Please follow step - by - step

Create a flow with type = **App**

(1) At "Trigger node":

* Switch toggle "Use this as a sub-flow" to Enable

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FNRsuYUkNSPFCLuQGAhvz%2Fimage.png?alt=media&#x26;token=385091b4-f8c8-4198-b83d-c0bcd3a45a9e" alt=""><figcaption></figcaption></figure>

(2) Add another node to the flow\
\
(3) Publish the Sub-fllow

**Rule**

<table><thead><tr><th width="151.0390625">Case</th><th>Rule</th></tr></thead><tbody><tr><td>(1) Sub-flow compatibility with restricted nodes</td><td><p>A flow that is marked as a <strong>sub-flow</strong> must not use the following nodes:</p><ul><li><strong>“Branch”</strong></li><li><strong>“Loop”</strong></li><li><strong>“Delay”</strong></li><li><strong>“Run another flow”</strong>.</li></ul></td></tr><tr><td>(2) Flow is already marked as sub-flow, user adds a restricted node</td><td><p></p><ul><li><strong>Trigger:</strong> User tries to add any of the restricted nodes to a flow that has <strong>Sub-flow</strong> enabled.</li><li><strong>Behavior:</strong> Block the action and show an inline error toast/banner on the canvas.</li><li><strong>Error message (exact):</strong><br><strong><code>This node is not available in sub-flow</code></strong></li></ul></td></tr><tr><td>(3) Flow already contains a restricted node, user turns on Sub-flow</td><td><p></p><ul><li><strong>Trigger:</strong> User toggles <strong>Sub-flow</strong> on in a flow that currently contains at least one restricted node.</li><li><strong>Behavior:</strong> Do not allow enabling. Keep the toggle <strong>off/disabled</strong>.</li><li><strong>Hover tooltip over the disabled toggle (exact text):</strong><br><strong><code>This flow cannot be marked as a sub-flow if nodes "Run another flow", "Branch", "Delay", "Loop" are being used</code></strong></li></ul></td></tr><tr><td>(4) Unmarking a published sub-flow</td><td><p><strong>Rule:</strong> If a flow is <strong>already marked as sub-flow</strong> and has been <strong>published</strong>, unmarking it must require explicit confirmation.</p><p><br></p><h4>Behavior</h4><ul><li><strong>Trigger:</strong> User turns <strong>off</strong> the <strong>Sub-flow</strong> toggle on a <strong>published</strong> sub-flow.</li><li><strong>Action:</strong> Show a <strong>Confirm</strong> modal.</li><li><strong>Modal copy (exact):</strong><br><strong><code>Do you want to disable this sub-flow. It might be used as a sub-flow in another flow</code></strong></li><li><p><strong>Options:</strong></p><ul><li><strong>Confirm</strong> → proceed to unmark; downstream flows that reference this sub-flow should surface a warning on next open/run.</li><li><strong>Cancel</strong> → keep Sub-flow enabled; no changes applied.</li></ul></li></ul></td></tr></tbody></table>

### Step 2: Create Parent flow (Main flow) and refer to the sub-flow

*<mark style="color:red;">\*\*Just apply with flow, have type = App</mark>*

Please follow step - by - step

Create a flow with type = **App**

(1) Build new flow

(2) Add "Run another flow" node

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FYnIDGfQCAzIzMC4ej88d%2Fimage.png?alt=media&#x26;token=691eec77-591d-4404-bc2b-777a0ff69f48" alt=""><figcaption></figcaption></figure>

\ <br>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FcSy5BJAqAjTRlMDAGcwY%2Fimage.png?alt=media&#x26;token=74eb7c5e-2782-48e7-9f8c-bd87034d8a92" alt=""><figcaption></figcaption></figure>

Component settings

<table><thead><tr><th width="236.3203125">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>Select a flow</td><td><p>Select a sub-flow<br><br>Rule:<br></p><ul><li>Must be in the same workspace<br><strong>AND</strong></li><li>The sub-flow must be set to <strong>public</strong></li></ul></td></tr><tr><td>Field Input</td><td>Show the fields input of the Sub - Flow</td></tr><tr><td><strong>Advance configurations</strong></td><td></td></tr><tr><td>On Error when running Run another flow</td><td>Single - select:<br>- Stop workflow (default value)<br>- Skip and record error</td></tr></tbody></table>

### Step 3: Run Parent flow (Main flow)

When finish setup the Parent flow (main flow) -> Click button **"Execute"** to run the flow

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FZc5OjRTvE7yvoxu3gToC%2Fimage.png?alt=media&#x26;token=25c34c9b-3b3f-49d4-9c1c-8430e1dd2c36" alt=""><figcaption></figcaption></figure>

After run the flow, at the output of "Run another flow" node will response the data of Sub-flow

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FLTNd7qsKhJD4oPcniQyH%2Fimage.png?alt=media&#x26;token=34ea39dd-298a-4064-9610-7101c8ed2173" alt=""><figcaption></figcaption></figure>

## III. History <a href="#description" id="description"></a>

### View from the Parent flow (Main-flow)

When run success the parent flow, user can view the history

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FeT6BctJd9Q3slydYcLUb%2Fimage.png?alt=media&#x26;token=bdd0dc7f-c0a3-41c0-8b54-9a62ffe86f4b" alt=""><figcaption></figcaption></figure>

The history list, the user can click to view the details

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FneWp04QFu2ceOEo1O0wz%2Fimage.png?alt=media&#x26;token=b7d3cee8-b92c-45ca-a7fb-ebc6c56a0f23" alt=""><figcaption></figcaption></figure>

At Tab "Workflow", the user clicks details of the  "Run another flow" node

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FReCdLVxjDF8beQaFuqwk%2Fimage.png?alt=media&#x26;token=26f848f6-5af0-4980-ba62-de5fbf9967bd" alt=""><figcaption></figcaption></figure>

Will display the **"Sub-flow name"** and **"Sub-flow ID"**

User can click on the "Sub-flow name" -> The system will open a new tab and redirect to the workflow builder of the Sub-flow

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FzLXjx6LzEnaqFOF9NfCG%2Fimage.png?alt=media&#x26;token=8b7a6435-48f8-493e-a133-3ae52ef99e8c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FLF6FvAStboznXCmOQj6X%2Fimage.png?alt=media&#x26;token=9ac8f950-9a48-4691-adac-c92c1cd85ea8" alt=""><figcaption></figcaption></figure>

### View from the Subflow

When run success the parent flow, user can view the history of the subflow

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2Fbue5rYUyYi3b8HHD4hCv%2Fimage.png?alt=media&#x26;token=9e6549be-f4e6-49fd-b5e3-a30b710217bc" alt=""><figcaption></figcaption></figure>

At the History list, with the record run via Parent-flow, at the column **VIA** will show the value **"Parent flow"**

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F8uUeo5SqyRafSh5lahDW%2Fimage.png?alt=media&#x26;token=cd6b0b97-98c9-4067-8e15-da1e8660c27e" alt=""><figcaption></figcaption></figure>

User can click to view the details

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FA418ITg7ei1HdO6epGBH%2Fimage.png?alt=media&#x26;token=855e61cb-845b-4bb7-be40-9febecf0be7c" alt=""><figcaption></figcaption></figure>

At detail page

Will display the **"Parent-flow name"** and **"Parent-flow ID"**

User can click on the "Parent-flow name" -> The system will open a new tab and redirect to the workflow builder of the Parent flow

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F2Ng4vQohHRcOuxKZOMQd%2Fimage.png?alt=media&#x26;token=776687d1-dc0a-431b-928a-6839c59bb993" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F1bRDIxTdMoh9ZnQfOREF%2Fimage.png?alt=media&#x26;token=2e193513-ec24-4a95-91ac-9338ebf8edfd" alt=""><figcaption></figcaption></figure>
