Runs
Monitor and debug your automation executions.
Every time an event triggers an automation, MailBlastr creates a run.
A run tracks the execution of each step in the workflow, including its status and timing, along with any errors.
How it works
Each run has one of the following statuses:
| Status | Description |
|---|---|
running | The automation is currently executing steps. |
completed | All steps finished successfully. |
failed | A step encountered an error and the run stopped. |
cancelled | The run was cancelled before completing. |
skipped | The run ended on a Send Email step that was skipped because the contact has unsubscribed. |
Skipped steps
When a contact unsubscribes, any remaining Send Email steps in the automation will be skipped automatically. Other step types (such as Delay, Condition, or Contact Update) will still be executed as normal.
Listing runs
In the dashboard, select an automation to view its runs — each run shows its status, when it started, and its duration. Over the API, list all runs for an automation with GET /automations/:id/runs.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.runs('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd');
console.log({ data, error });{
"object": "list",
"has_more": false,
"data": [
{
"object": "automation_run",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_id": "26e2b838-bf6d-4515-b6a7-17525b12b05a",
"contact_email": "jordan@acme.com",
"status": "completed",
"started_at": "2026-10-01T12:00:00.000Z",
"completed_at": "2026-10-01T12:05:00.000Z",
"created_at": "2026-10-01T12:00:00.000Z"
}
]
}View the List Automation Runs API reference for more details.
Filtering runs by status
You can filter runs by status to find specific executions. Over the API, filter by multiple statuses using a comma-separated list.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.runs('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', { status: running,completed });
console.log({ data, error });Viewing a single run
In the dashboard, click on a run to view its details and select the step you want to debug. Over the API, retrieve the full details of one run — including the steps array — with GET /automations/:id/runs/:runId. The first entry in steps is the trigger step.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.getRun('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd', 'a1b2c3d4-e5f6-7890-abcd-ef1234567890');
console.log({ data, error });{
"object": "automation_run",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"automation_id": "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
"contact_id": "26e2b838-bf6d-4515-b6a7-17525b12b05a",
"contact_email": "jordan@acme.com",
"status": "completed",
"error": null,
"started_at": "2026-10-01T12:00:00.000Z",
"completed_at": "2026-10-01T12:05:00.000Z",
"created_at": "2026-10-01T12:00:00.000Z",
"steps": [
{
"key": "start",
"type": "trigger",
"status": "completed",
"started_at": "2026-10-01T12:00:00.000Z",
"completed_at": "2026-10-01T12:00:01.000Z",
"output": null,
"error": null
},
{
"key": "welcome",
"type": "send_email",
"status": "completed",
"started_at": "2026-10-01T12:00:01.000Z",
"completed_at": "2026-10-01T12:00:02.000Z",
"output": {
"to": "user@example.com",
"email_id": "6278820d-2421-42d0-85f0-80e9e28c1c69",
"template": {
"id": "caa9851e-e7bf-4a50-a408-56024edc19c0",
"variables": null
}
},
"error": null
}
]
}Each step in the response includes:
| Field | Description |
|---|---|
key | The unique key of the step in the automation graph. |
type | The step type (e.g. trigger, send_email, delay). |
status | The step's execution status: completed, failed, or skipped. |
started_at | When the step started executing. |
completed_at | When the step finished. |
output | Output data from the step (if any). |
error | Error details if the step failed. |
View the Retrieve Automation Run API reference for more details.
Debugging failed runs
When a run fails, use the step-level details to identify the issue:
- List failed runs — filter runs by
status=failedto find problematic executions. - Retrieve the run — get the full run details, including the
stepsarray. - Find the failed step — look for the step with a
failedstatus. - Check the error — the
errorfield on the failed step contains details about what went wrong.
Common failure scenarios:
- Condition error — a referenced field may not exist in the event payload. See Condition for how conditions are evaluated.
- Wait for event timeout — the expected event was not received within the timeout window. See Wait for Event.
- Send email failed — the template may not be published, or the sender address may not be verified. See Send Email.
Stopping an automation
In the dashboard, click the Stop button to stop an automation. Over the API, stop it with POST /automations/:id/stop — this sets the status to disabled.
import { MailBlastr } from 'mailblastr';
const mb = new MailBlastr('mb_xxxxxxxxx');
const { data, error } = await mb.automations.stop('c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd');
console.log({ data, error });View the Stop Automation API reference for more details.
Viewing metrics
In the dashboard, you can view overall metrics for any automation. In the Observability panel for any automation, select Metrics.