Skip to content

app.automation_runs

TableRow level security on

The automation runs ledger (Section 7.3, ADR 0047): one run per automation and domain event, so an event never runs an automation twice. Written by the fan-out trigger and the worker RPCs only; readable by holders of org.automations.write.

Primary key: id

Columns of app.automation_runs
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.automations on insert; never accepted from the caller and never changed.References app.organizations.id
automation_iduuidNoAutomation that ran.References app.automations.id
domain_event_iduuidNoDomain event that started the run.References app.domain_events.id
parent_run_iduuidYesRun whose action raised the event, when an automation caused it.References app.automation_runs.id
depthsmallintNoHow many automation runs led to this one: 0 for an event a person or the system raised.
run_statusapp.automation_run_statusNoQueued, Running, Retrying, Succeeded, Failed or Skipped.
event_payloadjsonbNoThe event as webhooks send it (id, type, occurred_at, project_id, subject, data): the run's input, a provider payload (ADR 0002).
owner_person_iduuidYesPerson the run acted as, set when it started.References app.people.id
job_iduuidYesautomation.run job that carries the run and its retries.References app.job_queue.id
attemptssmallintNoTimes the worker started the run.
error_codetextYesRule code of the failure or skip, such as owner_left_org, loop_depth or rate_limited.
error_messagetextYesWhy the run failed or was skipped, in words.
started_attimestamp with time zoneYesWhen the worker first started the run.
finished_attimestamp with time zoneYesWhen the run reached Succeeded, Failed or Skipped.
duration_msintegerYesMilliseconds from the first start to the end.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.