Skip to main content
GET
Get an automation
Returns one automation with its configuration and current execution state. Participant-scoped automations report participants_total and participants_processed. A filter can leave the processed count below the total after completion, so read execution_status to know whether the run has finished. Program-scoped automations omit these progress fields.
See Automations for scheduling and run progress.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Path Parameters

program_id
string<uuid>
required

The program's id.

automation_id
string<uuid>
required

The automation's id.

Response

Automation details

An automation: an event that Scrip sends on a schedule, with its trigger, status and run history.

created_at
string<date-time>

When this automation was created

Example:

"2027-01-15T10:30:00Z"

description
string

Optional human-readable description of what this automation does

Example:

"Sends a weekly reminder event to VIP participants"

error_message
string

Error message if the one-time automation failed

Example:

"participant not found"

event_data
object

Event data submitted when this automation fires

event_type
string

The name of the events this automation sends, such as weekly_reminder. Rules read it as event.type.

Example:

"weekly_reminder"

execution_completed_at
string<date-time>

When the current fan-out execution completed

Example:

"2027-01-15T10:30:00Z"

execution_error
string

Error message if the fan-out execution failed, or JSON-encoded diagnostics for completed runs with CEL eval skips

Example:

"fanout aborted: program is archived"

execution_started_at
string<date-time>

When the current fan-out execution started

Example:

"2027-01-15T10:30:00Z"

execution_status
enum<string>

Progress of the current fan-out run, separate from status.

  • IDLE: no run is in progress.
  • EXECUTING: sending events to matching participants.
  • COMPLETED: latest run finished.
  • FAILED: latest run stopped with an error.
Available options:
IDLE,
EXECUTING,
COMPLETED,
FAILED
Example:

"COMPLETED"

filter_hints
Automation filter hint · object[]

Checks derived from participant_filter that narrow the participants to consider. Scrip still evaluates the full CEL filter for each candidate.

guard_condition
string

CEL expression evaluated at trigger time; skips the participant if false

Example:

"participant.counter.purchases >= 1"

id
string<uuid>

Unique identifier for this automation

Example:

"6b2d4f81-0e93-4c5a-b7d6-3a8c1e5f9b13"

last_error
string

Error message from the most recent cron execution, if any (cron trigger only)

Example:

"failed to enqueue event: queue unavailable"

last_evaluated_at
string<date-time>

When participant filters were last evaluated (PARTICIPANT_STATE trigger only)

Example:

"2027-01-15T10:30:00Z"

last_run_at
string<date-time>

When this automation last fired (cron trigger only)

Example:

"2027-01-15T10:30:00Z"

name
string

Human-readable label for this automation

Example:

"Weekly points reminder"

next_run_at
string<date-time>

When this automation will next fire (cron trigger only)

Example:

"2027-12-31T23:59:59Z"

participant_filter
string

CEL expression that determines which participants are enrolled

Example:

"participant.tags.exists(t, t == 'vip')"

participant_id
string<uuid>

Target participant for program-scoped one-time automations

Example:

"f7a8b9c0-1d2e-4f3a-b4c5-d6e7f8a9b006"

participants_processed
integer

Participants Scrip has sent the event to in the current run so far.

Example:

150

participants_skipped_error
integer

Participants skipped because participant_filter or guard_condition CEL evaluation errored

Example:

0

participants_total
integer

Total candidate participants in the current fan-out run.

Example:

150

processed_at
string<date-time>

When this one-time automation was processed

Example:

"2027-01-15T10:30:00Z"

program_id
string<uuid>

The program this automation belongs to

Example:

"8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"

scope
enum<string>

Whether the automation sends one event to the program (PROGRAM) or one event to each matching participant (PARTICIPANTS).

Available options:
PROGRAM,
PARTICIPANTS
Example:

"PARTICIPANTS"

source
enum<string>

How the automation was created.

  • API: created through the automations API.
  • RULE_ACTION: created by a SCHEDULE_EVENT or BROADCAST rule action.
  • SYSTEM: created by Scrip for scheduled work such as tier expiration.
Available options:
API,
RULE_ACTION,
SYSTEM
Example:

"API"

source_event_id
string<uuid>

The event whose processing created this automation. Omitted when no source event is recorded, for example on automations created through the API.

Example:

"e5dc1b6a-7f3d-4e2a-8c1b-9a0f4d7e6c05"

source_rule_id
string<uuid>

The rule whose action created this automation. Omitted when no rule action created it, including automations created through the API.

Example:

"c9f0f895-fb98-4b39-9f86-1e5a0d3e2b03"

status
enum<string>

Whether the automation can fire.

  • ACTIVE: fires when its trigger is due.
  • PAUSED: does not fire until you set it back to ACTIVE.
  • COMPLETED: a one-time automation that has fired; it cannot fire again.
  • FAILED: stopped after a failure; set it to ACTIVE to try again.
  • ARCHIVED: removed from use; it never fires again.
Available options:
ACTIVE,
PAUSED,
COMPLETED,
FAILED,
ARCHIVED
Example:

"ACTIVE"

trigger
object

Trigger configuration (type, schedule, and timing)

Example:
updated_at
string<date-time>

When this automation was last updated

Example:

"2027-01-15T10:30:00Z"

warnings
object[]

Advisories about participant_filter and guard_condition, such as a counter, tag or attribute key that no rule in the program writes. They appear on create and update only, and they never block the save.