# Multiple Instances of a Flow

**URL:** <https://discourse.nodered.org/t/multiple-instances-of-a-flow/36732>\
**Category:** General\
**Created:** [29 November 2020 21:52 UTC](https://discourse.nodered.org/t/multiple-instances-of-a-flow/36732 "2020-11-29T21:52:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidmarch](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@davidmarch](https://discourse.nodered.org/u/davidmarch)\
**Post date:** [29 November 2020 21:52 UTC](https://discourse.nodered.org/t/multiple-instances-of-a-flow/36732/1 "2020-11-29T21:52:27Z")

</div>

I have a flow that I want to be able to create multiple instances of and have them run independently. I am controlling a number of IoT devices but each device sees different circumstances so each needs to be controlled by the Flow independently. The flow is the same in all instances only different variables will be added. Not sure how to create the multiple flow instances. Thank you for your help.  
Dace

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 November 2020 22:07 UTC](https://discourse.nodered.org/t/multiple-instances-of-a-flow/36732/2 "2020-11-29T22:07:37Z")

</div>

Have you looked at subflows?  
Alternatively, [this](https://flows.nodered.org/node/node-red-contrib-web-components) node acts like a subroutine.

But, that all said, if you design your flow correctly (pure), it is likely you can just use it for independent variables.

If you provide more info and share your flow, someone will advise.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [28 January 2021 22:07 UTC](https://discourse.nodered.org/t/multiple-instances-of-a-flow/36732/3 "2021-01-28T22:07:47Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
