# Runs and Versions

Check, test and publish an automation, keep earlier versions, and follow every run step by step

An automation goes through three stages: you build it, you take it live, and it runs every time its trigger fires. This page covers taking it live safely — checking, testing, publishing and restoring versions — and reading the history of its runs.

## Automation status

The editor's toolbar shows the automation's status next to its name:

| Status | Meaning |
|--------|---------|
| **Draft** | Not live yet. Edits are saved directly with **Save** |
| **Active** | Live: every matching event starts a run |
| **Paused** | Not starting new runs. Runs already in progress carry on |

Click **Activate** to take a draft or paused automation live, and **Pause** to stop it starting new runs. A new automation must be saved before you can activate it.

## Checking for problems

Before an automation can go live, Qwetty checks that it is complete — for example that it has a trigger and that every step has its required settings.

Click **Problems** in the toolbar, then **Save and check**. The panel lists anything that would stop the automation from going live, grouped by step; click an entry to jump to that step. Steps with problems also carry a red badge on the canvas, such as "2 problems". When everything is in order, the panel says "No problems — this automation can go live."

If you click **Activate** or **Publish** while there are problems, nothing goes live and a message such as "2 problems keep this automation from going live — see Problems" points you to the list.

## Drafts and publishing

Once an automation is **Active** or **Paused**, your edits no longer change it straight away. They are kept as a draft, and a bar above the canvas says **Unpublished changes.** — the live automation keeps running the last published version until you publish.

| Button | What it does |
|--------|--------------|
| **Save draft** | Saves your edits to the draft. The live automation is unchanged |
| **Publish** | Makes the draft live and records it as a new version, for example "Published as version 4". The draft must pass the problem check |
| **Discard draft** | Throws away every change since the last publish, saved or not, and takes the editor back to the live version |

Runs already in progress when you publish carry on through the new version from the step they had reached.

## Versions

Click **Versions** in the toolbar to see what has been published. Each entry shows its number, when it was published, and **Published by** whom. The last 20 publishes are kept.

- **Preview** — opens that version on the canvas, read-only ("Previewing version 3."). Click **Back to editing** to return.
- **Restore** — copies that version into the editor. On a live automation it replaces the current draft and any unsaved changes, and the live automation doesn't change until you **Publish**. On a draft automation it replaces the steps directly.

To roll back a live automation, restore the version you want and publish it.

## Test runs

Click **Test run** to try the automation without affecting anyone. Unsaved changes are saved first, and the draft is tested if there is one.

1. Under **Run it as if the event came from**, choose **A chat**, **A contact** or **Neither**, then pick the chat or contact
2. Optionally fill in **Event data (JSON, optional)** — the rest of the trigger's event, such as `{"body": "Hello", "type": "TEXT"}` for **Message Received**. The chat and contact come from step 1
3. Under **When a step waits**, choose whether waits get what they wait for (**It gets what it waits for**) or time out (**It times out**)
4. Click **Run test**

The result shows each step in order, the branch it **Took**, and its outputs:

- Conditions, delays, sentiment and language detection really run against the chat or contact you chose, so branches follow real data.
- Every other step is **simulated** — labeled "Step 2 · simulated" — and shows what it **Would do**, with variables filled in. Nothing is sent or changed, and no AI model or integration is called; **Classify** takes its first category's branch.
- Delays and waits aren't waited out; a delay shows how long it **Would wait**.
- If the trigger's own settings wouldn't have matched this event, a note says so, and the steps show what would have happened if they had.

Test runs don't appear in the run history. Click **Run again** to repeat with the same input.

## Run history

Every real run is recorded. Open it from the automations list: click the run count in the **Runs (7d)** column, or choose **View Runs** in the row's menu.

The **Run history** page lists runs newest first, with their **Status**, **Trigger**, **Subject** (the chat or contact the run acted on), **Started**, **Duration**, and for a waiting run, what it is waiting for and when it resumes ("Resumes in 2 hours"). While any run is running or waiting, the page refreshes on its own every few seconds, so you can watch runs progress without reloading.

### Run status

| Status | Meaning |
|--------|---------|
| **Running** | Working through its steps |
| **Waiting** | Paused at a delay or a wait step |
| **Completed** | Reached the end of its branch |
| **Failed** | A step failed and the run stopped |
| **Cancelled** | Stopped by a team member |
| **Timed out** | Ended by a timeout |

### Step details

Expand a run to see its steps in order. Each step shows its status, its **Inputs** and its **Outputs** — including, for a failed step, the reason it failed. Use **Copy JSON** to copy them.

| Step status | Meaning |
|-------------|---------|
| **OK** | The step did its job |
| **Branched** | A condition, AI or wait step chose a branch |
| **Waiting** | The run is paused at this step |
| **Skipped** | The step didn't run |
| **Failed** | The step failed |

A send step whose contact has opted out of automated messages succeeds without sending anything; its outputs say why.

### Retrying and cancelling

Open the **⋮** menu on a run:

- **Retry from failed step** — for a **Failed** run. Starts a new run from the step that failed, keeping what earlier steps produced. Fix the cause first, for example reconnect an integration. A run can be retried once.
- **Cancel run** — for a **Running** or **Waiting** run.

**Cancel all running** at the top of the page (available while any run is running or waiting) cancels every running and waiting run of this automation. It does **not** pause the automation — new events still start new runs. Pause the automation to stop those.

### How long runs are kept

Finished runs are kept for 30 days and then deleted with their step details. Runs still running or waiting are never deleted.

To protect the system from loops — such as an automation that tags a contact on **Contact Tagged** — each organization can start at most 600 runs a minute. Events beyond that start no run.

## Permissions

| To | You need |
|----|----------|
| See automations, run history and versions | Automations → **View** |
| Create an automation | Automations → **Create** |
| Edit, check, test, activate, pause, publish, restore, retry or cancel runs | Automations → **Edit** |
| Delete an automation | Automations → **Delete** |

## Next steps

- [Nodes Reference](/en/automations/nodes-reference) — Every trigger and step
- [Building Workflows](/en/automations/building-workflows) — Build on the canvas
- [Roles & Permissions](/en/team/roles-and-permissions) — Grant automation access
