# Get all nodes in the same flow

**URL:** <https://discourse.nodered.org/t/get-all-nodes-in-the-same-flow/78285>\
**Category:** Developing Nodes\
**Tags:** function-node\
**Created:** [9 May 2023 03:35 UTC](https://discourse.nodered.org/t/get-all-nodes-in-the-same-flow/78285 "2023-05-09T03:35:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kakyoism](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kakyoism/32/46283_2.png) [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Post date:** [9 May 2023 03:35 UTC](https://discourse.nodered.org/t/get-all-nodes-in-the-same-flow/78285/1 "2023-05-09T03:35:01Z")

</div>

How do I find all nodes in the same flow at run time?

I found Nick's answer in [this post](https://discourse.nodered.org/t/how-can-i-set-the-error-indicator-little-red-triangle-of-a-node-in-the-editor/51481), but with NR 3.0.2, I don't have access to the API `RED.nodes.getAllFlowNodes()` and the like.

```auto
9 May 11:29:19 - [error] [my_node:bc80cdc0359d37e3] TypeError: RED.nodes.getAllFlowNodes is not a function

```

---

<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:** [13 May 2023 22:16 UTC](https://discourse.nodered.org/t/get-all-nodes-in-the-same-flow/78285/2 "2023-05-13T22:16:41Z")

</div>

> [@kakyoism](#):
>
> `TypeError: RED.nodes.getAllFlowNodes is not a function`

RED.nodes.getAllFlowNodes is a client side thing not server side.

> [@kakyoism](#):
>
> How do I find all nodes in the same flow at run time?

Do you mean on a **tab** or all nodes connected upstream and downstream by wires? Does that also include nodes connected indirectly (e.g link-in ~ link-out, link-call ~ link-in),

---

<div class="post-metadata">

**Author:** ![nru2023](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@nru2023](https://discourse.nodered.org/u/nru2023)\
**Post date:** [19 May 2023 11:28 UTC](https://discourse.nodered.org/t/get-all-nodes-in-the-same-flow/78285/3 "2023-05-19T11:28:49Z")

</div>

For me the solution is to read the "start"-file in the .node-red directory. All flows has the type "tab" and an id. The nodes whiche are also inside the "start" file - have a reference (property "z") to the Flow-IDs.  
If you'll find the connection and so the "wires" reference to the following node(s) of a node. This ways for me works and seems to be the best.

---

<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:** [18 July 2023 11:29 UTC](https://discourse.nodered.org/t/get-all-nodes-in-the-same-flow/78285/4 "2023-07-18T11:29:40Z")

</div>

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