# Importing nodes - existing nodes/subflows - question

**URL:** https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384
**Category:** General
**Created:** [28 November 2021 01:32 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384 "2021-11-28T01:32:55Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 November 2021 01:32 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/1 "2021-11-28T01:32:55Z")

</div>

## Please read it all before replying.

OK, I have kind of asked before but I am still not understanding it.  
(Though it does seem a bit better than before)

Saying NR 1.3.5  
I have subflows.

I import a flow (code) from another machine and an existing subflow is included.

I get a _warning_ (_notification?_) about the conflict and I pick `view nodes` then unselect the existing subflow.

When imported, the node is not loaded.  
So I have to then drag the existing subflow node and wire it up.

Now, before you say: _That's an old version of NR!_  
I tried it on 2.0.5 and it simply imported it all. No requesters at all.

So I'm confused - and I know it is not an easy thing to do - but if I import code/nodes with existing subflow nodes (in this case)..... what is the process needing to be done so I don't get duplicate subflow nodes?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 November 2021 07:19 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/2 "2021-11-28T07:19:48Z")

</div>

Does it work on the latest node red?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 November 2021 20:18 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/3 "2021-11-28T20:18:07Z")

</div>

That depends on what you mean by `work`.

On NR `2.0.1` (the latest I have I think) it just imports the code.  
Duplicate subflow included.

Just did it again and I have 2 iterations of the subflow listed.

is that what you call _Working_? Not to me.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 November 2021 20:40 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/4 "2021-11-28T20:40:41Z")

</div>

I know what I am asking in the bigger picture is complicated.

Here is a few pictures to show the _problem_ as I see it.

 ![Screenshot from 2021-11-29 07-28-46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/adf848430e30197499af336e36582cca7df0b94e.png)

On a machine running an older version of NR.

I am exporting this _code_.

 ![Screenshot from 2021-11-29 07-28-53](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/4/64f9eb81ada9cce286d47a39d983b7e1820f794a.png)

This is the other machine running NR 2.0.1. Note I have a `subflow` called `time stamp`.

 ![Screenshot from 2021-11-29 07-29-02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/003874756a115d5ca195803b5d763f385eb65ca8.png)

(to be sure to be sure)

Import and paste.

 ![Screenshot from 2021-11-29 07-29-13](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/1/d18a71bc582010bb22ddda0c0d50c9dcf36c2bf3.png)

Now I have 2 iterations of the subflow.

Ok, I know it is hard to do what I am talking about.  
But when exporting I am asking what/which nodes to include.  
Fair enough.

But when importing..... Nothing.

Now I get that this may be a version issue.

I think once when I imported I was prompted which nodes to include.  
I don't know how easy it is but saying I deselect the nodes to include and which to not - to get around conflicts.  
Then would it be expected that the node/s with the conflict are replaced with the existing one/s?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 November 2021 20:43 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/5 "2021-11-28T20:43:24Z")

</div>

> [@Trying\_to\_learn](#):
>
> On NR `2.0.1` (the latest I have I think) i

The question is, does it work on the latest node-red?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 November 2021 20:45 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/6 "2021-11-28T20:45:35Z")

</div>

Its a bit difficult for me to say if I don't have THE latest.

I am asking with what I have. If that which I am asking is only recently added, then I get that it won't work on earlier versions.

---

<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: [28 November 2021 20:51 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/7 "2021-11-28T20:51:09Z")

</div>

> [@Trying\_to\_learn](#):
>
> don't know how easy it is but saying I deselect the nodes to include and which to not - to get around conflicts.  
> Then would it be expected that the node/s with the conflict are replaced with the existing one/s?

If you deselect a node in the import-conflicts dialog, then it won't be imported.

If it is selected, there's another option as to whether it should replace or import a copy.

That ought to work exactly as described.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 November 2021 21:03 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/8 "2021-11-28T21:03:28Z")

</div>

Thanks.

I have seen that request (but that is going from a new version to an old version of NR)

I get the requester and deselect the _node of conflict_ it imports the flow.  
But there is a big hole in that which I then get imported.

I can't replicate this happening.  
(Well, I can but it is even more confusing for me and I think I am getting off topic)

Shouldn't the _existing_ node on the machine which has a conflict with the nodes/code being imported be put in the place of the node from the imported code?

But as an example this is what I saw the time I did deselect the conflicting node.

Exporting:

 ![Screenshot from 2021-11-29 08-00-22](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/49282c1b122f55fa03c3f262cbb9b8a7069e3461.png)

This is what I get when I import:

 ![Screenshot from 2021-11-29 08-00-27](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/77c2b293e397bf1ae7fce64865d941f9a05eb448.png)

Why isn't the existing `time stamp` subflow put in the flow when it is imported?

This is an example. I can't remember how I got it to ask me and all the fine details of what I did.

---

<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: [28 November 2021 21:23 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/9 "2021-11-28T21:23:28Z")

</div>

I can't remember the precise behaviour of old versions of Node-RED.

We improved the import dialogue to better handle import conflicts in more recent releases.

---

<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: [27 January 2022 21:24 UTC](https://discourse.nodered.org/t/importing-nodes-existing-nodes-subflows-question/54384/10 "2022-01-27T21:24:01Z")

</div>

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