# Is there a way to trigger the generation of the flow json to a file?

**URL:** <https://discourse.nodered.org/t/is-there-a-way-to-trigger-the-generation-of-the-flow-json-to-a-file/6925>\
**Category:** General\
**Created:** [17 January 2019 16:03 UTC](https://discourse.nodered.org/t/is-there-a-way-to-trigger-the-generation-of-the-flow-json-to-a-file/6925 "2019-01-17T16:03:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbove73](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gbove73/32/5078_2.png) [@gbove73](https://discourse.nodered.org/u/gbove73)\
**Post date:** [17 January 2019 16:03 UTC](https://discourse.nodered.org/t/is-there-a-way-to-trigger-the-generation-of-the-flow-json-to-a-file/6925/1 "2019-01-17T16:03:49Z")

</div>

I would like to write a custom node that write in a file the full current flow json code when triggered.  
Is that possible?

Thanks in advance.

---

<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:** [17 January 2019 16:18 UTC](https://discourse.nodered.org/t/is-there-a-way-to-trigger-the-generation-of-the-flow-json-to-a-file/6925/2 "2019-01-17T16:18:00Z")

</div>

The current flow is in the flows file. So all you need to do is to copy that file which you could do with an exec node for example.

---

<div class="post-metadata">

**Author:** ![gbove73](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gbove73/32/5078_2.png) [@gbove73](https://discourse.nodered.org/u/gbove73)\
**Post date:** [17 January 2019 16:24 UTC](https://discourse.nodered.org/t/is-there-a-way-to-trigger-the-generation-of-the-flow-json-to-a-file/6925/3 "2019-01-17T16:24:34Z")

</div>

That's a good idea! Thanks a lot.
