# How can I run example flows provided as JSON snippets?

**URL:** <https://discourse.nodered.org/t/how-can-i-run-example-flows-provided-as-json-snippets/97437>\
**Category:** General\
**Created:** [5 June 2025 21:18 UTC](https://discourse.nodered.org/t/how-can-i-run-example-flows-provided-as-json-snippets/97437 "2025-06-05T21:18:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedro\_uno](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pedro\_uno](https://discourse.nodered.org/u/pedro_uno)\
**Post date:** [5 June 2025 21:18 UTC](https://discourse.nodered.org/t/how-can-i-run-example-flows-provided-as-json-snippets/97437/1 "2025-06-05T21:18:49Z")

</div>

Hello,

I have been reading forum posts and I see that answers often contain example flows as JSON snippets. It is a very attractive feature of Node-Red that flows can be shared as clear text but what is the best way to run an example flow provided as JSON text?

Where would I paste the example JSON code, into my flows.json file?

I don't want to break anything that I have working.

Should I save my working flows.json off to a temporary location and replace its contents with the example snippet? How do you guys work?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [5 June 2025 21:34 UTC](https://discourse.nodered.org/t/how-can-i-run-example-flows-provided-as-json-snippets/97437/2 "2025-06-05T21:34:47Z")

</div>

> [@pedro\_uno](#):
>
> Where would I paste the example JSON code, into my flows.json file?

In the node-red editor go to import, paste the code there and click the button.

Sometimes NR complains that its not valid code.  
Sometimes it imports but you get a bunch of "unknown" nodes.  
Occasionally it successfully imports,into the current flow or a new one, you have to take pot luck.  
You can then decide whether to deploy or ctrl-z to undo the import.  
Actually even if you import and undo, you will often find configuration nodes and dashboard groups have been created.

In the light of the above, I never import code from here onto my working Node-red servers.

I have a collection of Raspberry Pies for such imports.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [5 June 2025 22:45 UTC](https://discourse.nodered.org/t/how-can-i-run-example-flows-provided-as-json-snippets/97437/3 "2025-06-05T22:45:13Z")

</div>

The docs here explain importing and exporting flows, [Importing and Exporting Flows : Node-RED](https://nodered.org/docs/user-guide/editor/workspace/import-export) . As well as the editor workspace, pallette and sidebars.

---

<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:** [3 September 2025 22:45 UTC](https://discourse.nodered.org/t/how-can-i-run-example-flows-provided-as-json-snippets/97437/4 "2025-09-03T22:45:51Z")

</div>

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