Skip to main content
View as Markdown

Approval & Delay Actions

These two families pause a running workflow. The approval family waits for a human decision (human-in-the-loop). The delay family waits for a duration, a datetime, an external webhook callback, or paces a queue of items.

Approval — Human-in-the-Loop

One operator, request. It suspends the run, notifies approvers, and resumes once a decision is recorded (or the timeout fires). Requires app.auth to be configured.

Prop Description
approvers all-admins, or an array of email addresses / role names. Required.
message Message shown to approvers (templatable). Required.
options Approval choices, minimum 2 ({ value, label? }). Default [{ value: approve }, { value: reject }]. The chosen value becomes the step output.
timeout How long to wait (e.g. 24h, 7d). No timeout by default.
onTimeout On timeout: approve (auto-approve), reject (auto-reject), or escalate (notify escalation).
notifyVia Notification channel: email (default), webhook, or both.
app.yaml
- name: approveRefund
  type: approval
  operator: request
  props:
    approvers: all-admins
    message: 'Approve refund of ${{trigger.data.amount}} for order {{trigger.data.id}}?'
    options:
      - { value: approve, label: 'Approve refund' }
      - { value: reject, label: 'Deny' }
    timeout: 48h
    onTimeout: reject
    notifyVia: email

Delay — Wait, Queue, Webhook

Three operators that pause execution differently.

wait

Pause for a fixed duration or until a specific datetime.

Prop Description
duration Delay as number + unit (ms/s/m/h/d), e.g. 30s, 24h, 7d.
until ISO 8601 datetime (or template) to wait until, e.g. 2025-12-01T09:00:00Z.
app.yaml
- name: cooldown
  type: delay
  operator: wait
  props: { duration: 15m }

queue

Process queued items one at a time with configurable spacing — ideal for rate-limited downstream APIs.

Prop Description
interval Minimum delay between processing each item — number + unit (ms/s/m/h), e.g. 500ms, 2s. Required.
maxQueueSize Max items in the queue before new entries are rejected (default unlimited).
app.yaml
- name: paceApiCalls
  type: delay
  operator: queue
  props: { interval: 1s, maxQueueSize: 1000 }

webhook

Pause until an external webhook callback is received (e.g. an async third-party job completes).

Prop Description
callbackId Custom callback identifier (templatable). Auto-generated when omitted.
timeout Max time to wait for the callback — number + unit, e.g. 1h, 7d.
onTimeout On timeout: continue, stop, or error (default error).
expectedData Expected shape used to validate the inbound callback payload.
app.yaml
- name: awaitProcessing
  type: delay
  operator: webhook
  props:
    callbackId: 'job-{{trigger.data.id}}'
    timeout: 2h
    onTimeout: error

Last updated August 11, 2026

This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.

Built with Sovrium