# Using flows as subflow

**URL:** <https://community.homey.app/t/using-flows-as-subflow/145254>\
**Category:** Flows\
**Created:** [November 12, 2025, 11:39am UTC](https://community.homey.app/t/using-flows-as-subflow/145254 "2025-11-12T11:39:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 12, 2025, 11:39am UTC](https://community.homey.app/t/using-flows-as-subflow/145254/1 "2025-11-12T11:39:34Z")

</div>

I know it is possible to execute a flow from a flow, but is it possible to call a subflow from a mainflow and that after the subflow has been executed the mainflow will continue? As is the case when calling a subroutine in a program?

---

<div class="post-metadata">

**Author:** ![Hsd1965](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hsd1965/32/30160_2.png) [@Hsd1965](https://community.homey.app/u/Hsd1965)\
**Post date:** [November 12, 2025, 1:50pm UTC](https://community.homey.app/t/using-flows-as-subflow/145254/2 "2025-11-12T13:50:38Z")

</div>

No. Unless you built a mechanism yourself. For example: Start sub flow from main flow. Wait for sub flow to set a logic variable to indicate it has run. Then continue main flow.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [November 12, 2025, 2:08pm UTC](https://community.homey.app/t/using-flows-as-subflow/145254/3 "2025-11-12T14:08:28Z")

</div>

You can use the ‘flow is started with texttag’ and use it kindof like a label.

Mainflow

[do mainflowthings] - Start mainflow with texttag ‘subflow’

If flows is started with texttag and textag is ‘subflow’  
[do subflow things] - Start mainflow with texttag ‘mainflow2’

If flows is started with texttag and textag i ‘mainflow2’  
[do rest of mainflowtings]

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [November 12, 2025, 3:13pm UTC](https://community.homey.app/t/using-flows-as-subflow/145254/4 "2025-11-12T15:13:08Z")

</div>

Are you sure?

Because if you put the flow cards in series, then the card that follows the flowcard that runs the sub flow, is not executed before the sub flow completes:

Main flow

 ![IMG_2215](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/3/e3aaf4f3f42fa5a88da29b31ed970d31375d36e7.jpeg)

Sub flow

 ![IMG_2216](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/1/01a574c39f4907ff34aced9b5f5bfbf34a4ffab7.jpeg)

Timeline

 ![IMG_5993](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/3/e3fa159ea6b55b4ed2269d659ac0b2a20e27dc49.jpeg)

As you can see, the time line message of the main flow is only posted after the sub flow (that includes a 5 sec delay) completes.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 12, 2025, 11:07pm UTC](https://community.homey.app/t/using-flows-as-subflow/145254/5 "2025-11-12T23:07:25Z")

</div>

But that is just like subroutines in program code work, the code is executed sequentially, and after the subroutine is executed the program continues with the next statement of the main program.

The idea is to put the subflow on a different canvas, to keep the main flow clear.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [November 13, 2025, 7:06am UTC](https://community.homey.app/t/using-flows-as-subflow/145254/6 "2025-11-13T07:06:22Z")

</div>

> [@Rmb](#):
>
> The idea is to put the subflow on a different canvas, to keep the main flow clear.

That is precisely my example: the first (main) and second (sub) flow are on two separate canvases.

Maybe I am misunderstanding you 🤔?

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 13, 2025, 8:39am UTC](https://community.homey.app/t/using-flows-as-subflow/145254/7 "2025-11-13T08:39:55Z")

</div>

You understand me very well, and I will try your example.

---

<div class="post-metadata">

**Author:** ![Anders\_Gregow](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/anders_gregow/32/61721_2.png) [@Anders\_Gregow](https://community.homey.app/u/Anders_Gregow)\
**Post date:** [November 14, 2025, 6:41am UTC](https://community.homey.app/t/using-flows-as-subflow/145254/8 "2025-11-14T06:41:47Z")

</div>

You may also do this with Advanced Trigger app.
