# Export / import flows

**URL:** <https://discourse.nodered.org/t/export-import-flows/46870>\
**Category:** General\
**Created:** [8 June 2021 19:35 UTC](https://discourse.nodered.org/t/export-import-flows/46870 "2021-06-08T19:35:31Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacad](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jacad](https://discourse.nodered.org/u/Jacad)\
**Post date:** [8 June 2021 19:35 UTC](https://discourse.nodered.org/t/export-import-flows/46870/1 "2021-06-08T19:35:31Z")

</div>

In Node Red v0... I saved a copy of my flow with the export function.  
After a problem with my Raspberry Pi I installed a new version of NR.  
In NR v1.3.4. I can't get the saved flow back, dozens of errors.  
I there a conversion necessary?

---

<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:** [8 June 2021 19:37 UTC](https://discourse.nodered.org/t/export-import-flows/46870/2 "2021-06-08T19:37:39Z")

</div>

The flow format has not changed.

What sort of errors are you getting?

---

<div class="post-metadata">

**Author:** ![Jacad](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jacad](https://discourse.nodered.org/u/Jacad)\
**Post date:** [8 June 2021 19:48 UTC](https://discourse.nodered.org/t/export-import-flows/46870/3 "2021-06-08T19:48:33Z")

</div>

SyntaxError: Unexpected token } in JSon at pos 169  
260,"wires":},{"id.........

---

<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:** [8 June 2021 19:51 UTC](https://discourse.nodered.org/t/export-import-flows/46870/4 "2021-06-08T19:51:50Z")

</div>

Something has corrupted your JSON file.

How did you save it? Where you are copy and pasting it from?

From the error message we can see a `wires` property missing its value.

```auto
260,"wires":},{"id.........

```

That is a common symptom when people paste their flows into this forum without wrapping it properly as a code block. The markdown parser sees the `[]` value of the wires property and treats it as a link syntax and strips it out.

The question is whether that corruption is in the source file you're copying from, or an artefact of how/where you are copying it from.

---

<div class="post-metadata">

**Author:** ![Jacad](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jacad](https://discourse.nodered.org/u/Jacad)\
**Post date:** [8 June 2021 19:57 UTC](https://discourse.nodered.org/t/export-import-flows/46870/5 "2021-06-08T19:57:58Z")

</div>

The SD card of my RPi failed and I was forced to install all my programs again.  
Sadly I didn't save the flow on a separate drive and copied the flow from the forum.

I understand that I didn't put it correctly on the forum.  
Now I have to build the flow again and I will save the flows in the correct manner.

Thank you for your help.

---

<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:** [8 June 2021 19:59 UTC](https://discourse.nodered.org/t/export-import-flows/46870/6 "2021-06-08T19:59:29Z")

</div>

If you are copying it from the forum, then rather than copy it from the page directly, first click the pencil icon next to the post (maybe hidden behind the ... icon). That will take you to the edit page for the post where you'll see the original content before the markdown formatter is applied.

---

<div class="post-metadata">

**Author:** ![Jacad](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jacad](https://discourse.nodered.org/u/Jacad)\
**Post date:** [8 June 2021 20:10 UTC](https://discourse.nodered.org/t/export-import-flows/46870/7 "2021-06-08T20:10:11Z")

</div>

I tried to copy from the edit page, same errors.

My post from 18 jul 2020: Controlling model train.  
Is it possible for you to open my post?

---

<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:** [8 June 2021 20:10 UTC](https://discourse.nodered.org/t/export-import-flows/46870/8 "2021-06-08T20:10:33Z")

</div>

If you paste a link to it to save me searching - sure.

---

<div class="post-metadata">

**Author:** ![Jacad](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jacad](https://discourse.nodered.org/u/Jacad)\
**Post date:** [8 June 2021 20:11 UTC](https://discourse.nodered.org/t/export-import-flows/46870/9 "2021-06-08T20:11:45Z")

</div>

> [@Controlling model train](https://discourse.nodered.org/t/controlling-model-train/30276):
>
> Node-Red, Raspberry Pi 4 and 0, Esp32, MQTT. In the last months, a lot of spare time, I build my 40 year old model train set and tried to control it with Node-Red. First step: Manually controlling with the Dashboard. Second step: I build a SVG layout on the screen to mouse-control the turnouts Third step: With the node "finite state machine" it is possible to run a program for the train. If anyone is interested I will publish the code and the hardware in this topic. My excuses for the use…

---

<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:** [8 June 2021 20:13 UTC](https://discourse.nodered.org/t/export-import-flows/46870/10 "2021-06-08T20:13:32Z")

</div>

I have edited that post to show the flow in a proper code block. You _should_ now be able to copy and paste from the post directly.

---

<div class="post-metadata">

**Author:** ![Jacad](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Jacad](https://discourse.nodered.org/u/Jacad)\
**Post date:** [8 June 2021 20:18 UTC](https://discourse.nodered.org/t/export-import-flows/46870/11 "2021-06-08T20:18:08Z")

</div>

Success.  
The build of the SVG layout of the traintracks took a lot of time and sweat.

Thank you very much for the help.

---

<div class="post-metadata">

**Author:** ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)\
**Post date:** [8 June 2021 20:25 UTC](https://discourse.nodered.org/t/export-import-flows/46870/12 "2021-06-08T20:25:27Z")

</div>

Wow! that was super nice of you Nick.

---

<div class="post-metadata">

**Author:** ![paulkeates](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@paulkeates](https://discourse.nodered.org/u/paulkeates)\
**Post date:** [9 June 2021 01:39 UTC](https://discourse.nodered.org/t/export-import-flows/46870/13 "2021-06-09T01:39:56Z")

</div>

Nick has previously 'rescued' a flow for me that had some kind of internal issue; he's the best!

I really appreciate what he (and others) has built and the support provided. It is the main tool my team of 10 engineers use daily and I have never experienced that level of support even from a tool we paid $80K / year for.

Cheers!

Paul

---

<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:** [9 June 2021 09:47 UTC](https://discourse.nodered.org/t/export-import-flows/46870/14 "2021-06-09T09:47:00Z")

</div>

> [@Jacad](#):
>
> The build of the SVG layout of the traintracks took a lot of time and sweat

I trust you have now started a regular backup scheme

---

<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:** [23 June 2021 09:47 UTC](https://discourse.nodered.org/t/export-import-flows/46870/15 "2021-06-23T09:47:39Z")

</div>

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