Skip to main content

Automation

BETAThis API is an internal beta and is not released yet. Endpoints and payloads are not final and may change โ€” or be withdrawn โ€” at any time.
Not final

While the Automation API is in beta, the endpoints, payloads and behaviour described on these pages may change, or be withdrawn, at any time without notice. Use at your own risk, and pin nothing you cannot change.

An automation is made up of a trigger that starts it, an optional filter that decides whether to proceed, and an ordered list of actions that it runs โ€” all scoped to a single app. This API lets you discover what an automation can be built from, create and version automations, validate them, and run or simulate them against a record.

Automations live above their executions. Each time an automation fires it produces an automation run; this API manages the definitions, and you read their executions through the existing Automation Run resource.

This overview covers the concepts, the shared authentication rules, the shape of the automation object, and the resource-wide conventions. The individual endpoints live on the pages listed under Working with automations.

The anatomy of an automationโ€‹

PartCardinalityWhat it is
Trigger0 or 1The event that starts the automation โ€” a record being created, a date arriving, a schedule, an inbound webhook, and so on. See the trigger object.
Filter0 or 1A recursive and/or tree of conditions the triggering record must match. Omitted or null means the automation always runs. See filters.
Actions0 or moreAn ordered list of steps โ€” send an email, create a record, branch, loop, and so on. See the action object.

The catalog of available trigger types, action types and filter operators โ€” and the exact config each one accepts โ€” is served live by the discovery endpoints. Build against those rather than hard-coding the vocabulary: new types appear there without a change to this API. The full token lists are also collected in the reference pages.

Authentication and permissionsโ€‹

Requires a user API key

Every endpoint on this resource requires a user API key, with two exceptions: the discovery endpoints and the two Advanced / Sandbox endpoints (call-automation and generate-weblink) each accept either a user or an automation API key. Everywhere else, an automation API key authenticates an automation, not a person, and therefore carries no workspace role to check; using one there returns a 401. See Authentication.

You may work with the automations of any app in a workspace you administrate. Concretely, for every automation-scoped call the caller must be an administrator of the workspace the automation's app belongs to, and that workspace must be in your own organization.

Discovery is the exceptionโ€‹

The three discovery endpoints (meta/trigger, meta/action, meta/filter) return a static catalog that is identical for everyone. They require only a valid API key of either kind and carry no workspace scope.

Unavailable automations return 404โ€‹

Tape IDs are globally unique, so an ID belonging to another organization is still a perfectly well-formed ID. To avoid turning these endpoints into a way of probing which IDs exist, every automation that is not available to you answers the same 404 โ€” whether it does not exist, was deleted, is an unsaved draft, or lives in a workspace you do not administrate. A request authenticated with the wrong kind of key still returns 401, and a malformed ID (one that is not an integer) returns 400.

The automation objectโ€‹

A single retrieve returns the automation wrapped under automation. Create, update, activate, pause and delete return the automation in the same envelope, so the shape below is the one you will handle throughout the resource.

โฌ…๏ธ Response
{
"automation": {
"id": 4021,
"app_id": 87,
"workspace_id": 12,
"name": "Email the owner on a new high-priority lead",
"description": "Notifies the record owner whenever a lead is created.",
"paused": false,
"broken": false,
"broken_reason": null,
"trigger": {
"type": "record_created",
"config": { "app_id": 87 }
},
"filter": null,
"actions": [
{
"id": "3f9a2c",
"type": "send_email",
"group": "action",
"config": {
"subject": ["A new lead was created"],
"smtp_account_id": 5
}
}
],
"created_at": "2024-05-14 09:12:31",
"updated_at": "2024-05-20 16:03:08"
}
}

Fields

FieldTypeDescription
idintegerID of the automation.
app_idintegerThe app the automation belongs to. Only database apps can have automations.
workspace_idintegerThe workspace the app belongs to.
namestringName of the automation.
descriptionstringOptional description. Absent when the automation has none.
pausedbooleanWhether the automation is paused. See Status and lifecycle.
brokenbooleanWhether the automation's definition is not executable.
broken_reasonobject | nullThe reasons the automation is broken, or null when it is not. See Broken reasons.
triggerobject | nullThe single trigger, or null when none is configured.
filterobject | nullThe root filter group โ€” a recursive and/or condition tree. null when the automation has no filter.
actionsarrayThe ordered list of actions. An empty array when the automation has none.
created_atstringWhen the automation was created, in UTC.
updated_atstringWhen the automation was last modified, in UTC.

The trigger objectโ€‹

A trigger is { type, config }. The type is one of the public trigger types; config holds the trigger's settings, keyed exactly as the trigger's config_schema from GET /v1/automation/meta/trigger describes.

FieldTypeDescription
typestringThe trigger type, e.g. record_created.
configobjectThe trigger's settings. Keys and value types follow the trigger's config_schema.

Config values may be dynamic โ€” see Dynamic values.

The filterโ€‹

The filter is a recursive tree of groups and conditions. A group combines its rows with and or or; a condition tests a field against an operator. The root group has no id; nested nodes do.

FieldTypeDescription
operatorstringand (match all) or or (match any) โ€” on a group.
rowsarrayA group's children โ€” nested groups or conditions.
subjectobjectOn a condition: a reference to the field, record-metadata, trigger-output or action-output being tested.
operatorstringOn a condition: one of the 22 operators, e.g. is, contains, is_any_of.
valueobjectOn a condition: the tagged comparison value. Absent for value-less operators such as is_empty.

The operators valid for a given field type are returned by GET /v1/automation/meta/filter?field_type=โ€ฆ. See filters for the full model, including script conditions.

Dynamic valuesโ€‹

Wherever a value can reference live data โ€” a trigger/action config field, a filter comparison โ€” it is a dynamic value: an ordered array that interleaves literal strings with references resolved against the record at run time. A subject like "the record's Name field" is a reference; "Hi " is a literal. See Dynamic values for the reference model and the full source/value vocabularies.

The action objectโ€‹

Each entry in actions is one step. Leaf actions do work (group: "action"); control-flow actions (group: "control_flow" โ€” a for_loop or a conditional) nest other actions under an action_rows array inside their config.

FieldTypeDescription
idstringStable identifier of the action within the automation.
typestringThe action type, e.g. send_email. See action types.
groupstringaction for a leaf step, or control_flow for a for_loop / conditional.
custom_namestringOptional label for the step. Absent when unset.
deactivatebooleanWhether the step is deactivated (skipped). Absent when unset.
continue_on_errorbooleanWhether the run continues when this step errors. Absent when unset.
configobjectThe action's settings, keyed as the action's config_schema from GET /v1/automation/meta/action describes. Dynamic values inside are normalized to the reference model. For conditional / for_loop, config also carries the branch/loop structure (condition, action_rows, else_action_rows, iterable, break_condition, continue_condition).
Control-flow shapes

For conditional / for_loop, the branch/loop members live inside config โ€” see actions for the full structure. Each branch is gated by presence: an omitted member is disabled.

Broken reasonsโ€‹

When broken is true, broken_reason is an object with an errors array; each entry has a machine-readable code, an English message, and optional references to the app, field or action at fault. The full list of codes is on the reference page. To check an automation on demand rather than reading the stored flag, use validate.

Status and lifecycleโ€‹

An automation has no single status field. Its state is the pair of booleans paused and broken:

pausedbrokenMeaning
falsefalseLive โ€” the automation runs when its trigger fires.
truefalsePaused โ€” a valid automation that is not fired automatically by its trigger. It can still be manually run or simulated.
anytrueBroken โ€” the definition is not executable and will not run.
  • A newly created automation lands paused and not broken โ€” a valid draft you configure, then activate.
  • Activate re-checks the definition and refuses a broken one with a 409; pause always succeeds.
  • Every change mints a new immutable revision.

The lifecycle endpoints (create, update, activate, pause, delete) are on the Manage page.

Identifiers and timestampsโ€‹

Most IDs on this resource are plain JSON integers (id, app_id, workspace_id, and the automation_id you pass in a path). The one exception is a revision ID, which is a 64-bit value returned as a string so it is safe to handle in any language โ€” see revisions. Action ids are opaque strings; treat them as handles, not numbers.

All timestamps use the Tape API datetime format โ€” UTC, YYYY-MM-DD HH:mm:ss, with no T separator, no Z suffix and no milliseconds. See Date & Timezone.

Rate limit creditsโ€‹

EndpointsCost
The list endpoints (app, workspace, org)2x base credits
Everything else โ€” discovery, retrieve, create, update, lifecycle, revisions, validate, run, simulate1x base credits

This is separate from the automation action credits a real run consumes as it executes (reported as num_consumed_actions on the resulting run). See Request limits for how rate limiting works. Runtime limits โ€” the per-run action cap, the 1000-record collection cap, and the shared email send quota โ€” are covered under Automations โ†’ Limitations.

Errorsโ€‹

Errors use the standard envelope โ€” status_code, endpoint, error_code and error_message. Across this resource:

  • 400 โ€” a malformed body or a path ID that is not an integer.
  • 401 โ€” the request is not authenticated with a user API key (where one is required).
  • 404 โ€” the automation, app, workspace or revision is not available to you (see above).
  • 409 โ€” a lifecycle conflict, e.g. activating a broken automation.

See Errors for the full list of error codes.

Working with automationsโ€‹

PageWhat it covers
QuickstartThe whole lifecycle end to end โ€” discover, create, configure, validate, activate, run, observe.
DiscoveryThe catalog of trigger, action and filter types, with their config schemas.
ManageCreate, retrieve, list, update, replace the trigger, activate, pause and delete.
RevisionsThe immutable version history of an automation.
ExecutionRun and simulate against a record, and validate a definition.
Advanced / SandboxThe call-automation and generate-weblink endpoints that back those actions.
Dynamic valuesHow values reference live record and run data.
Reference โ€” object ยท triggers ยท filters ยท actions ยท errorsThe full object, vocabularies and error codes.