> For the complete documentation index, see [llms.txt](https://tekos.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tekos.gitbook.io/doc/flow-builder/tekos-flow/building-your-first-flow/import-export-flow.md).

# Import / Export Flow

Tutorial credits: https\://nodered.org/docs/user-guide/editor/workspace/import-export

It is sometimes useful to reuse a piece of code you or someone else wrote. For that flows can be imported and exported from the editor using their JSON format, making it very easy to share flows with others&#x20;

{% tabs %}
{% tab title="Importing Flows" %}

### **Importing flows**

The Import dialog can be used to import a flow by the following methods:

* pasting in the flow JSON directly,
* uploading a flow JSON file,
* browsing the local flow library,
* browsing the example flows provided by installed nodes.

In all cases, the dialog offers the option to import the nodes into the current flow, or to create a new flow for them.

| Reference    |                           |
| ------------ | ------------------------- |
| Key shortcut | `Ctrl/⌘-i`                |
| Menu option  | `Import`                  |
| Action       | `core:show-import-dialog` |

![Import Dialog](https://2146957470-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSqSDdProPIpKBElfLq%2F-MRQ8ZnWLgz9fU9mWvx1%2F-MRQFHwPfkhCoQepOapH%2Fimage.png?alt=media\&token=6f4736f1-bc6a-4d44-81aa-0c574f5c45f3)

#### **Importing json code**

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43166844376/original/BxsK6nhuVaUBPlFq8st1nOTJzJi8GjGjHA.gif?1603205025)

**Importing json file**

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43166849801/original/wGfTkErui4IQvmf0SaowizqETJga7HRW9A.gif?1603205805)
{% endtab %}

{% tab title="Exporting Flows" %}

### **Exporting flows**

The Export dialog can be used to copy flow json out of the editor by the following methods:

* copying the JSON to the system clipboard,
* downloading the JSON as a file,
* saving it to the local flow library.

It can export either the selected nodes, the current flow (including its tab node) or the complete flow configuration.

It offers the option to export compact or formatted JSON. The compact option generates a single line of JSON with no whitespace. The formatted JSON option is formatted over multiple lines with full indentation - which can be easier to read.

| Reference    |                           |
| ------------ | ------------------------- |
| Key shortcut | `Ctrl/⌘-e`                |
| Menu option  | `Export`                  |
| Action       | `core:show-export-dialog` |

![Export Flows dialog](https://2146957470-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSqSDdProPIpKBElfLq%2F-MRQ8ZnWLgz9fU9mWvx1%2F-MRQFYWhpLnjscmH6mXL%2Fimage.png?alt=media\&token=60a9deeb-88e7-4424-9572-b9a007dcf710)

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43166843248/original/cyMf3AEvrzpYvSrEb39Ek57iWLNaZIPHxQ.gif?1603204864)
{% endtab %}
{% endtabs %}
