Skip to main content

Automation run history, tests and debugging

Every time an automation runs, and every time a call goes through a call flow, the PBX keeps a run: what started it, which version of the flow ran, how it ended and each step it took. This page explains how to read the history, how to try an automation with sample data, how to repeat or stop a run, and how to look at full values when something goes wrong.

You can do all of this in the automation designer (the Runs tab and the test panel); this page describes what happens behind it and the API.

You need the permission to read call flows to see the history, and the permission to change call flows to cancel runs and to test. Repeating a run, turning on debugging and really sending from a test need the permission Debug automations (flow_runs:debug), which the Owner role has by default.

The history​

GET /api/v1/flows/runs lists runs, newest first, in pages (limit, cursor). Narrow it with flow_id, status (queued, running, waiting, ok, failed, cancelled, refused_quota), trigger (for example call.missed), kind (call or event), test (only test runs, or none), and from and to (start time).

GET /api/v1/flows/runs/{id} shows one run with its trigger and every step in order: the node, how long it took, the exit it took, the error code if it failed, and what it was given and produced.

To keep the history safe to read, step values are redacted: phone numbers and other long digit runs keep only their last four digits, long texts are shortened, and passwords, tokens and secrets are never stored.

Finished runs are kept for 30 days unless your company chose another time, and never while a legal hold applies.

Cancel and re-run​

  • Cancel (POST /api/v1/flows/runs/{id}/cancel) stops a run that is queued, running or waiting. A run that already ended cannot be cancelled.
  • Re-run (POST /api/v1/flows/runs/{id}/rerun) starts a new run with the same trigger data, on the newest live version, or with {"same_version": true} on the version the first run used. Calls that went through a call flow, and runs refused by a limit, cannot be repeated. Your company's automation limits apply.

Both are recorded in the audit log.

Test with sample data​

POST /api/v1/call-flows/{id}/test runs the live version of an automation without waiting for a real event. Choose where the data comes from with source:

  • sample (default): a built-in example for the automation's trigger. GET /api/v1/call-flows/{id}/test/sample shows it, so you can edit it and send it back as custom.
  • last_event: the newest real event of that kind in your history, redacted.
  • custom: your own payload.

By default a test is a dry run: steps that only read, such as a CRM lookup, run for real, but steps that write or send (a message, a CRM note, a call, a payment link, a notification) are only described in the run's steps, and waits and approvals are skipped. Send "dry_run": false to really send; this needs the debug permission and is audited. A paused automation can still be tested. Test runs are marked in the history.

Debug for 24 hours​

If a step does something unexpected, turn on debugging for that automation: PUT /api/v1/call-flows/{id}/debug with {"enabled": true}. For 24 hours its steps keep their full input and output (secrets are still removed). The switch turns itself off after 24 hours, and the full values are cleared 24 hours after each step. Turning it on and off is recorded in the audit log.

Turn an automation on or off​

POST /api/v1/call-flows/{id}/disable pauses an automation without publishing a new version: new events start nothing, runs already waiting go on. POST /api/v1/call-flows/{id}/enable turns it on again.

See also Automation triggers and limits and Automation templates.