# Automation runs and stats

> Follow an automation's runs, read the overview and per-step statistics, debug failed runs, and fetch runs and stats with the API.

Every time a trigger fires, the automation creates a run. This page shows where to see runs and their results, what the statistics on each step mean, how to find out why a run failed, and how to read the same data with the API.

## Overview tab

Open an automation from **Email Marketing → Automations**. The **Overview** tab shows:

- **Total executions**, **Completed**, **Failed** and **Running** counts.
- A read-only diagram of the flow. Select any step to see its **Stats**.
- **Edit**, which opens the editor while the automation is a draft or paused.

While the automation is running, the numbers refresh every 10 seconds.

## Step stats

Each step's **Stats** count how many runs reached it and what happened there. What you see depends on the step:

| Step | Stats |
| --- | --- |
| **Send email** | A funnel of **Accepted**, **Delivered**, **Opened** and **Clicked**, each as a share of accepted emails, plus counts of **Bounced**, **Failed**, **Complained** and **Unsubscribed**. The counts follow each email after the step sent it. |
| **Condition (If/Else)** | **Matched** (the run took **Yes**) and **Not matched** (it took **No**). |
| Call webhook (API) | **2xx Success**, **4xx Client Error**, **5xx Server Error**, **Timeout** and **Network Error**. |
| Random split (API) | Runs per variant. |
| Every other step | Runs per status, such as **Completed**, **Waiting** and **Failed**. |

Automation emails aren't tracked for loads and clicks, so **Opened** and **Clicked** stay at 0 for them. See [Send email](/docs/automations/steps/#send-email).

## Runs tab

The **Runs** tab lists every run, newest first, with its **Status**, the **Event** that started it, and when it **Started** and **Completed**, with the **Duration**. Filter by status, event or creation date.

Select a run to see its details: its status, start and end times, and each step it went through, in order, with the step's status and duration. Expand **Output data** on a step to see what it returned, such as the ID of the email it sent, the branch a condition took or the error that made it fail.

| Run status | Meaning |
| --- | --- |
| **Running** | Working through its steps, or waiting in a **Wait** step. |
| **Completed** | Every step on its path finished. |
| **Failed** | A step failed, or the workspace didn't have enough credits to start the run. |
| **Canceled** | The automation was stopped with the API while the run was in progress. |

## Debug a failed run

1. **Find the failed runs.** On the **Runs** tab, filter by **Status** `failed`.

2. **Open a run.** The failed step is marked in red.

3. **Read the error.** Expand **Output data** on the failed step. The `error` field says what went wrong, for example `send_email: Sending domain is not verified or not found`. See [When a step fails](/docs/automations/steps/#when-a-step-fails) for common errors and their fixes.

4. **Fix the cause.** For a step setting, select **Pause**, correct the step on the **Editor** tab, select **Save** and then **Start**. For a workspace problem, such as missing credits or an unverified domain, fix it under **Workspace** or **Email API**.

A failed run with no steps usually failed because the workspace didn't have the 3 credits needed to start it. With the API, its `meta` shows `"failure_reason": "insufficient_credits"`. [Top up credits](/docs/billing/credits/) or turn on [auto-refill](/docs/billing/auto-refill/) so runs don't fail.

Failed runs aren't retried. New triggers start new runs as usual. To run the automation again for a contact or email that failed, fire its trigger again, for example by removing the contact from the audience and adding it back.

A run that stays **Running** for a long time is usually in a **Wait** step. Open it to see which step it's on.

## Use the API

[List runs](/docs/api-reference/automations/runs/) returns an automation's runs, newest first. Filter with `filter[status]` (`running`, `completed`, `failed` or `canceled`) and page with `page` and `per_page` (up to 100):

```bash
curl -G "https://api.emailit.com/v2/automations/aut_3Mv8Xq2nKp5Lt/runs" \
  --data-urlencode "filter[status]=failed" \
  --data-urlencode "per_page=25" \
  -H "Authorization: Bearer $EMAILIT_API_KEY"
```

```json
{
  "data": [
    {
      "id": "aur_7Kp2Vx9mQt4Lw",
      "automation_id": "aut_3Mv8Xq2nKp5Lt",
      "contact_id": "con_2kq8Vt4xLm7Rz",
      "email_id": null,
      "event_id": null,
      "event": "contact.added_to_audience",
      "payload": { "object": { "id": "sub_7Rt2vX9kLm3Qp", "object": "subscriber" } },
      "meta": { "source_event_id": "evt_2Hn6Wq8rTc3Mz" },
      "status": "failed",
      "started_at": "2026-10-01T09:30:00Z",
      "completed_at": "2026-10-01T09:30:02Z",
      "created_at": "2026-10-01T09:30:00Z",
      "updated_at": "2026-10-01T09:30:02Z"
    }
  ],
  "total_records": 1,
  "per_page": 25,
  "current_page": 1,
  "total_pages": 1
}
```

[Retrieve a run](/docs/api-reference/automations/run/) adds `run_steps`, with each step's `step_id`, `status`, `data` (the output, including any `error`), `started_at` and `completed_at`.

[Retrieve statistics](/docs/api-reference/automations/stats/) returns the stats of every step, keyed by step key. Narrow them with `since` and `until` (ISO 8601) or `run_ids[]`. [Retrieve step statistics](/docs/api-reference/automations/step-stats/) returns one step's stats:

```json
{
  "data": {
    "send_email-1": {
      "total": 120,
      "by_status": { "completed": 118, "failed": 2 },
      "by_outcome": { "delivered": 110, "bounced": 3, "accepted": 5, "error": 2 },
      "funnel": { "accepted": 115, "delivered": 110, "loaded": 0, "clicked": 0, "bounced": 3, "failed": 0, "complained": 0, "unsubscribed": 0 }
    }
  }
}
```

`by_status` counts how the step ended in each run. `by_outcome` counts its results, such as the latest status of the email it sent or `matched` and `not_matched` for a condition. `funnel` appears for **Send email** steps.

## Related

  - [Steps](/docs/automations/steps/): Step settings and common errors.
  - [Automations overview](/docs/automations/): Statuses, credits and the API.

---
Source: https://emailit.com/docs/automations/runs/
