# Node-RED doesn't like to import to current flow

**URL:** <https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261>\
**Category:** General\
**Created:** [25 November 2022 20:04 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261 "2022-11-25T20:04:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [25 November 2022 20:04 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261/1 "2022-11-25T20:04:00Z")

</div>

I'm facing the issue, that my NR (3.0.2) doesn't like to import to the current flow - anymore?!  
Has anyone else already seen such an effect?

![Import](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/734560dbe57052c57630b142faf0567dabb47c35.gif)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 November 2022 20:15 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261/2 "2022-11-25T20:15:59Z")

</div>

If the imported json includes a node of type `tab` then it will get imported and the nodes added to it.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [25 November 2022 20:28 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261/3 "2022-11-25T20:28:19Z")

</div>

Thank you for this explanation; makes sense!

Would it be an option to consider & reflect this in the Import dialog, e.g. disabling the `Current Flow` button in case there's a `tab` defined in the JSON pasted (or loaded) ?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 November 2022 20:32 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261/4 "2022-11-25T20:32:17Z")

</div>

It can get a bit complicated. For example, if the imported json contains nodes from two different tabs, but only includes one of the 'tab' nodes, we then have some nodes that have been orphaned. Those nodes will get imported into the current flow or a new flow depending on the option, but the others will get imported along with their flow/tab.

We also have to consider that the flow can include env vars in its definition - so to drop it would potentially break what is being imported.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [25 November 2022 20:45 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261/5 "2022-11-25T20:45:55Z")

</div>

That's reasonable. 👍  
Thank you for those explanations; helped me to get to know NR even better!

---

<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:** [9 December 2022 20:46 UTC](https://discourse.nodered.org/t/node-red-doesnt-like-to-import-to-current-flow/71261/6 "2022-12-09T20:46:42Z")

</div>

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