# Import and export an automation

Save an automation as a file, then bring it back as a new automation or over an existing flow.

Source: https://support.rework.com/article/import-and-export-an-automation

Sometimes you want a copy of an automation outside the app: to keep before a big change, to reuse a flow that works well as the base of a new one, or to hand it to a colleague. Exporting saves the automation as a small JSON file, and importing turns that file back into a flow. Here's how to do both.

## Step 1: Export an automation

- On the **Automations** page, open the **⋯** menu on the automation's card.
  
- Click **Export**. A `.json` file with the automation's flow downloads to your computer.
  

You can also export from inside the automation with **More** > **Export**.

> **Note:** Export saves the **published** flow, the one on the **Production** tab. Changes still in the draft aren't included, and an automation that was never published exports without any steps. Publish first if you want the file to contain your latest edits.

![The card menu with Export](https://storage.googleapis.com/reworkv3-public/success/260923/aepcZwMyKclvtImCuPbNNoS1J5hfqCRg8cDkIkYaaYiD0tHQZ6IeQvJIqkxfVrgo/img.lDGC11zpkYkFu6NUaf3vHJK1h7Gx4HkuZdZBA0sH2XGqK3K1fJbo3MqAAGRGFz7a.png)

> **Warning:** The file contains the whole flow, including the addresses and settings typed into each step. Saved connection credentials aren't included, but share the file only with people who should see how the automation works.

## Step 2: Import it as a new automation

Use this to start a new automation from one you exported.

- On the **Automations** page, click **Import**.
  
- Click **Choose JSON file** and pick the exported file.
  

![The Import automation dialog with the Choose JSON file button](https://storage.googleapis.com/reworkv3-public/success/260923/blvumx0gYKiiUwSD8SRntHWwrpBIBjgESfJwxCP7BYP2tqLKsDjx1QLMhyLVCkYB/img.ha6zTQ1qOVIjfA1IVW2DvSnsYlmShMC0l1DEqLU6h0QzSgm3ql0KkU6VWjgngNoc.png)

A new automation is created and opens straight away with the steps from the file, here a copy of _Welcome new hires on day one_. Its name ends in **(imported)**, so you can tell it apart from the original. Rename it and move it to the right folder with **More** > **Edit automation**.

![A new automation created from an imported file](https://storage.googleapis.com/reworkv3-public/success/260923/YinzaNM2L8Y9n4KetuwUp1h56FlmfrPvGxik9NhGLA03LASMniZkf3o9YqQ0wjvY/img.Im2ElBgc57AsKuwbB6Q7EvPX979Gzqn2thje296nNkw0rjgxR0z82M7zwDR1GKxS.png)

> **Note:** An imported automation starts as a draft. Check its steps, especially any that point to a connection or to dataset records, then [publish it](https://support.rework.com/article/publish-an-automation).

## Step 3: Replace an existing flow with a file

Use this to bring a saved flow back into an automation that already exists, for example to undo a round of changes you exported beforehand.

- Open the automation and click **More** > **Import**. The **Update flow from template** window opens.
  
- Click **Choose JSON file** and pick the file.
  

The file's flow replaces the current draft. The automation's name, folder and other settings stay as they are, and nothing goes live until you publish.

![Importing over an existing flow, with the note that the current flow will be replaced](https://storage.googleapis.com/reworkv3-public/success/260923/Z6pjMrGPzftKG8PypgowEpxnRvHwVvPkACC1oToIA3Pgm940SfLUcFiEIMEo6293/img.wPo3kTVpRvL4JePv72YTo0KsS3171Pe10EokENnTEAqfN17wGvhC9TqZMb2bT7wG.png)

> **Note:** To go back to a flow you published before, you don't need a file at all: just use the **Versions** tab. See [Go back to an earlier version](https://support.rework.com/article/go-back-to-an-earlier-version).
