Skip to main content
← All documentationContents ↓

API Reference: Automations

Create, configure, and inspect automations and review their execution history.

Overview

Automations execute actions automatically in response to triggers — sending messages, updating records, creating new records, running wizard steps, and more. The API supports full automation management (create, update, delete, and action ordering) plus execution history. All automation endpoints are privileged tier and require the TEAM_ADMIN_DATA_WIZARDS feature permission on your API key or token.

Key Concepts

  • Trigger — The event that starts an automation. triggerType is one of SCHEDULE, RECORD_RELATIVE, RECORD_CREATED, RECORD_UPDATED, FIELD_VALUE_CHANGED, APPROVAL_STATUS_CHANGED, WIZARD_COMPLETED, or WIZARD_COMPLETION_FAILED; triggerConfig carries trigger-specific settings (for example the schedule, the record date and offset, the watched field (dataFieldSimplyId, or archetype and contractKey to watch whichever field the Collection binds to that archetype contract when each change is judged, such as an Invoices Collection's INVOICE statusField), the wizard's dataWizardSimplyId, or for APPROVAL_STATUS_CHANGED an optional approvalStatuses list of DRAFT, PENDING_REVIEW, APPROVED, and CHANGES_REQUESTED).
  • Conditions — Optional filterConditions decide which records the actions run for: FIELD conditions (every listed operator, joined by each condition's AND/OR connector), CONTRACT_FIELD conditions, DATE_RELATIVE conditions, and REFERENCED_BY conditions. A CONTRACT_FIELD condition (archetype, contractKey, then an operator and value as for FIELD) compares whichever field the Automation's Collection binds to that archetype contract when it runs, such as an Invoices Collection's INVOICE statusField, so it follows a contract a Team Admin reassigns; an unbound contract is an error. A DATE_RELATIVE condition (operator: "WITHIN_PERIOD", period: "CALENDAR_DAY", a whole-day offset) selects records whose date, or a date range's start (its end with rangeBoundary: "END"), falls on the one day offset days from the day the Automation runs: 14 for a reminder two weeks before a date, -1 for a follow-up the day after. The day is counted in the Automation's timezone: a schedule's own timezone at its scheduled time, otherwise the Team's timezone. A daily schedule with one selects each record on one day only. With operator: "ANNIVERSARY" (and an optional minYears, default 1) it instead selects dates on that day's month and day in an earlier year, for birthdays and membership or giving anniversaries, on DATE and DATE_RANGE fields; a February 29 date matches February 28 in a non-leap year. Each FIELD condition must use an active field of the Automation's Collection (for a Smart Collection, of its record-holding ancestor); a field from another Collection is an error. Record triggers are judged when the record is written, against the record as that write leaves it, and a matching change runs once (the conditions are not checked again when it runs); an approval status change is judged once the decision is saved; schedules select only matching Collection members; record-relative occurrences act only when their record still matches when they run. On WIZARD_COMPLETED and WIZARD_COMPLETION_FAILED, the actions must select a Wizard task output (targetOutputTaskSimplyId) and conditions are evaluated against that task's Collection; non-matching output records are skipped. Enabling such an Automation, or changing its trigger, conditions, or actions while it is enabled, returns 400 VALIDATION_ERROR and changes nothing unless the actions select one task output, that task creates records in exactly one active Collection, and every FIELD condition uses a field of that Collection. A disabled Automation can be edited in any order and is checked when enabled. A run whose configuration later stops resolving (for example, the task was relinked) fails instead of ignoring the conditions. A condition that cannot be evaluated is an error, never a match: the run fails, except on record triggers, where that Automation is skipped for that change and the error is logged.
  • Actions — Ordered operations performed when the automation fires. actionType is one of SEND_EMAIL, SEND_SMS, UPDATE_FIELDS, CREATE_RECORD, RUN_WIZARD_STEP, CHARGE_PAYMENT, CHARGE_INVOICE, SEND_USER_NOTIFICATION, REMOTE_MARKETPLACE_ACTION, CREATE_RECORDS_FROM_TEMPLATE, or BILL_SUBSCRIPTIONS, with per-action actionConfig, continueOnError, retryConfig, and onFailureActions.
  • Execution log — Every run is logged with status, timing, and per-run record counts.

List Automations

GET /v1/automations supports an optional dataCollectionSimplyId filter plus limit (1–100, default 25) and offset. Each automation includes id, name, isEnabled, triggerType, triggerConfig, filterConditions, dataCollectionSimplyId, maxRecordsPerExecution, and lastRunAt.

const automations = await s360.automations.list();

for (const auto of automations.data) {
  console.log(`${auto.id}: ${JSON.stringify(auto.name)} [${auto.triggerType}] (enabled: ${auto.isEnabled})`);
}
curl -s "https://api.simply360.app/v1/automations" \
  -H "Authorization: Bearer $S360_API_KEY"

Get Automation Details

Returns the automation with its ordered actions array.

const automation = await s360.automations.get('AUTO-1234-ABCD');
console.log(automation.data.actions);
curl -s "https://api.simply360.app/v1/automations/AUTO-1234-ABCD" \
  -H "Authorization: Bearer $S360_API_KEY"

Create, Update, and Delete

// Create an automation (POST /v1/automations)
const created = await s360.automations.create({
  name: 'Welcome new volunteers',
  triggerType: 'RECORD_CREATED',
  dataCollectionSimplyId: 'XXXX-XXXX-XXXX',
});

// Update it (PUT /v1/automations/{automationSimplyId})
await s360.automations.update(created.data.id, { isEnabled: true });

// Delete it (DELETE /v1/automations/{automationSimplyId})
await s360.automations.delete(created.data.id);

Manage Actions

EndpointDescription
POST /v1/automations/{automationSimplyId}/actionsAdd an action (actionType, actionConfig, executionRank, continueOnError, retryConfig, onFailureActions).
PUT /v1/automations/{automationSimplyId}/actions/{automationActionSimplyId}Update an action.
DELETE /v1/automations/{automationSimplyId}/actions/{automationActionSimplyId}Delete an action.
PUT /v1/automations/{automationSimplyId}/actions/reorderReorder actions with orderedActionSimplyIds.
await s360.automations.createAction('AUTO-1234-ABCD', {
  actionType: 'UPDATE_FIELDS',
  actionConfig: { fieldUpdates: { 'FLDS-STAT-USXX': 'Welcomed' } },
});

A CREATE_RECORD action fills the new record from fieldMappings, keyed by target field Simply ID. Each entry copies a field of the record the Automation runs for ({ sourceFieldSimplyId }), sets a fixed value ({ staticValue }), links the new record to that record ({ sourceRecord: 'SELF' }), or copies a field one link away ({ sourceFieldSimplyId, linkDataFieldSimplyId }): linkDataFieldSimplyId is a single-record link field of the record the Automation runs for, and sourceFieldSimplyId a field of the record it points to. An empty link, or a link to a record the Automation cannot read (deleted, archived, or restricted), leaves the target field empty and the rest of the record is still written; a required target field left empty fails the action. Both fields must belong to your Team and be readable by Automations; the API refuses any other mapping with 400 VALIDATION_ERROR.

await s360.automations.createAction('AUTO-1234-ABCD', {
  actionType: 'CREATE_RECORD',
  actionConfig: {
    targetDataCollectionSimplyId: 'COLL-CRED-ITXX',
    fieldMappings: {
      'FLDS-CRED-TRAN': { sourceRecord: 'SELF' },
      'FLDS-CRED-PERS': { sourceFieldSimplyId: 'FLDS-PAGE-OWNR', linkDataFieldSimplyId: 'FLDS-GIFT-PAGE' },
      'FLDS-CRED-AMNT': { sourceFieldSimplyId: 'FLDS-GIFT-AMNT' },
    },
  },
});

Create Records from a Template

CREATE_RECORDS_FROM_TEMPLATE writes one new record, its child records, and up to eight changes to existing records in one transaction per run. Its actionConfig is { version: 1, onlyWhen?, record, children?, lookups?, relatedRecordUpdates? } (SDK type AutomationCreateRecordsFromTemplateActionConfig; OpenAPI schema AutomationCreateRecordsFromTemplateConfig). Each field value names its source: FIXED, TRIGGER_FIELD, TRIGGER_RECORD, LINKED_FIELD (one link away), SOURCE_CHILD_FIELD, and SOURCE_CHILD_RECORD (child lines made fromChildren), LOOKUP_RECORD, LOOKUP_FIELD, ACTION_OUTPUT (actions.<action Simply ID>.recordSimplyId of an earlier record-creating action), RUN_DATE (the date the Automation runs, in the Automation's timezone and the same on every retry, with an optional offset: { amount, unit } of up to 366 DAYS, 52 WEEKS, or 12 MONTHS either way, written to or compared with date fields only), or CALCULATION (a Wizard expression over named inputs: add, multiply, sum, fallback, conditional). offsetDays moves a date read from a record by whole days. A Task due 7 days after a record changes is { source: 'RUN_DATE', offset: { amount: 7, unit: 'DAYS' } }.

await s360.automations.createAction('AUTO-1234-ABCD', {
  actionType: 'CREATE_RECORDS_FROM_TEMPLATE',
  actionConfig: {
    version: 1,
    record: {
      dataCollectionSimplyId: 'COLL-JRNL-0001',
      fields: {
        'FLDS-JMEM-0001': { source: 'FIXED', value: 'Invoice posted' },
        'FLDS-JSRC-0001': { source: 'TRIGGER_RECORD' },
        'FLDS-JDUE-0001': { source: 'TRIGGER_FIELD', dataFieldSimplyId: 'FLDS-IDAT-0001', offsetDays: 30 },
      },
    },
    children: [
      {
        dataCollectionSimplyId: 'COLL-JLIN-0001',
        linkDataFieldSimplyId: 'FLDS-JENT-0001',
        fromChildren: { dataCollectionSimplyId: 'COLL-ILIN-0001', linkDataFieldSimplyId: 'FLDS-IINV-0001' },
        fields: { 'FLDS-JDEB-0001': { source: 'SOURCE_CHILD_FIELD', dataFieldSimplyId: 'FLDS-IAMT-0001' } },
      },
    ],
    relatedRecordUpdates: [{ record: { source: 'TRIGGER_RECORD' }, linkDataFieldSimplyId: 'FLDS-IJRN-0001' }],
  },
});
  • It runs only on durable occurrences: RECORD_CREATED, RECORD_UPDATED, FIELD_VALUE_CHANGED, SCHEDULE, and RECORD_RELATIVE Automations with a Collection, without SEND_SMS, top-level only, and without retryConfig retries. Other configurations are refused with 400 VALIDATION_ERROR and a reason naming the template path.
  • Lookups (at most 4) must find exactly one record; the match is locked and checked again inside the write. None or several fails the action, and the record change retries it later.
  • A lookup's mode is CLAIM (the default when omitted) or REFERENCE. A CLAIM lookup must claim the record it finds: a relatedRecordUpdates entry for that record ({ source: 'LOOKUP_RECORD', lookupKey }) writes a field one of the lookup's conditions then excludes — IS_NULL on a field the change fills (for example its linkDataFieldSimplyId), EQUALS or IN fixed values the change replaces with another fixed value, or NOT_EQUALS or NOT_IN the fixed value it writes — in every group of conditions joined by OR. Two runs can then never use the same record; a claiming lookup that does not claim its match is refused with 400 VALIDATION_ERROR.
  • A REFERENCE lookup reads a shared record many runs use, such as the open fiscal period containing a date or an account by its code. It needs no claim and may not be the record of a relatedRecordUpdates entry (400 VALIDATION_ERROR). Its match is still locked and re-checked inside the write, so runs that use the same record run one after another.
  • A child group may have onlyWhen: { inputs, expression }, a calculation with the same sources and limits as a CALCULATION value, evaluated per source child with fromChildren (inputs may read SOURCE_CHILD_FIELD) and once for a single-record group. A line is written only when the result is exactly true; anything else skips it. Use greaterThan or lessThan to compare amounts (equals compares a decimal such as "0.00" as written). Only written lines count toward the 100 child records.
  • The action itself may have a top-level onlyWhen: { inputs, expression } (same shape and limits), judged first on every attempt, before the lookups: its inputs may read TRIGGER_FIELD, TRIGGER_RECORD, LINKED_FIELD, TRIGGER_CHILDREN_FIELD, FIXED, or ACTION_OUTPUT, never a lookup or a source child (400 VALIDATION_ERROR). Exactly true runs the action; every value it read is checked again inside the write (and before a skip is recorded), and when one changed nothing is written and the run tries again, without failure actions. Anything else skips the action: it succeeds without writing anything and without failure actions, its result is { skipped: true } with no recordSimplyId (history code TEMPLATE_RECORDS_SKIPPED), and a retry of the run returns that result and never writes later. Record-change filters are judged when the record is written, so a posting filtered on "Journal Entry is empty" should repeat that test as onlyWhen (isEmpty of the field): several changes recorded before the first run finished then post once. A later action that reads a skipped action's record (ACTION_OUTPUT) fails without retrying.
  • Limits: 8 child groups, 100 child records, 8 related record changes. A trigger record with more than 100 children in a Collection the template sums or copies is refused, never read in part, and retried later. Collection rules judge the whole graph; a refusal writes nothing.
  • The created record's Simply ID is in the action's result and in later actions' ACTION_OUTPUT (a skipped action has none). A retry returns the first result. Records it writes do not fire record triggers.
  • Changing the trigger or Collection, reordering, retyping, or deleting actions re-checks template actions and refuses a change that would break one.

Execution Logs

Review the execution history for an automation. Each entry includes status, startedAt, completedAt, recordsProcessed, recordsFailed, executionDurationMs, and errorDetails.

const executions = await s360.automations.listExecutions('AUTO-1234-ABCD', {
  limit: 25,
});

for (const log of executions.data) {
  console.log(`${log.startedAt}: ${log.status} (${log.recordsProcessed} processed, ${log.recordsFailed} failed)`);
}
curl -s "https://api.simply360.app/v1/automations/AUTO-1234-ABCD/executions?limit=25" \
  -H "Authorization: Bearer $S360_API_KEY"

The first-party Team Admin app can open one execution's action-by-action detail, including safely retained fixed-recipient email copies. That protected detail route deliberately rejects API keys, session tokens, integration OAuth clients, MCP, and TeamAgent; the public execution-list contract remains metadata-only. Do not build an integration that depends on rendered message content or exact destinations.

Record-Triggered Runs

A record write that matches an enabled RECORD_CREATED, RECORD_UPDATED, or FIELD_VALUE_CHANGED Automation records one run for that change in the same database transaction as the write, so a rolled-back write runs nothing and a committed one runs each matching Automation exactly once. The run usually starts within seconds and at most a few minutes after the write. Each run is a durable occurrence with sourceType RECORD_CHANGE; its recordSimplyId is the changed record and its scheduledAt is the record's version after the change.

curl -s "https://api.simply360.app/v1/automations/AUTO-1234-ABCD/occurrences?sourceType=RECORD_CHANGE&state=FAILED_RETRYABLE" \
  -H "Authorization: Bearer $S360_API_KEY"
  • A failed run is retried after 1, 5, and 30 minutes, 2 and 12 hours, then daily, until it succeeds. Actions that already succeeded are not repeated. Disable the Automation to stop waiting runs. A failure no retry can change is final (FAILED_FINAL): a declined charge, a payment action refused for a public write, and a record the Automation may not act on (security scope or confidential classification).
  • The run's execution reports triggerContext.type RECORD_TRIGGERED, as record triggers always have, with occurrenceSourceType RECORD_CHANGE and its occurrenceSimplyId.
  • A pending run uses the Automation's definition when it runs, so editing the Automation keeps it. Disabling suppresses it (SUPPRESSED, kept in the list).
  • A write also raises the Automations of every Collection above the written one, up to ten levels, for a record that is an active member of that Automation's own Collection. Each Automation runs at most once per change, and its watched field and conditions are judged on its own Collection.
  • A save that changes nothing does not fire RECORD_UPDATED.
  • Writes by imports, bulk edits, archive and restore, integration syncs, and Automation actions do not fire record triggers.
  • Payment actions are refused for records written by someone outside the Team (public Wizards, booking pages, the customer billing portal).
  • Automations with a SEND_SMS action keep their own delivery path for now and do not appear as RECORD_CHANGE occurrences.

Usage Notes

  • Automations execute asynchronously after the trigger event. Use the execution log to confirm outcomes.
  • An Automation with execution or durable occurrence history returns 409 AUTOMATION_HISTORY_EXISTS from delete. Disable it to preserve its audit evidence. Delete remains available only before any history exists.
  • Record writes made through the API, including a record with its children, fire RECORD_CREATED, RECORD_UPDATED, and FIELD_VALUE_CHANGED triggers just like dashboard edits, as described under Record-Triggered Runs, and bulk approval fires APPROVAL_STATUS_CHANGED for each record it approves or sends back. See API Reference: Data Records.
  • SEND_EMAIL actions with a fixed recipient list additionally require edit access to an outgoing-email send permission on the caller.
  • Action and trigger configs reference entities by simplyId, so automations are portable when synced across environments; automation changes are snapshotted into the team schema version history.
  • maxRecordsPerExecution (default 100) caps how many records one run processes.
  • Failed executions include error details in the execution log. Common causes: missing message templates, invalid field references, and recipient records without contact information.

Mixed-use SMS provider review

When an SMS Automation reports SPECIFIC_USE_CASE_EVIDENCE_REQUIRED, use get_sms_provider_use_case_review_evidence in MCP or Ask Simply with the public senderSimplyId. It returns the same provider-approved description, message samples, registration status/use case, and approvalEvidenceHash as the web reviewer. Both this read and draft preparation require a current Team User with sender settings edit permission; MCP requires admin:read.

Prepare draft_record_sms_provider_use_case_review with that hash, a summary, and attestations. Each attestation selects a supported use case and its supporting evidenceAnchors: { source: 'DESCRIPTION' } or { source: 'MESSAGE_SAMPLE', sampleIndex: 0 }. The proposal includes the server-read provider text. Only the person can approve on Simply360 using their web sign-in; approve_proposal returns that approval link. The approving person is recorded as the attesting reviewer. Changed evidence is refused and must be read and reviewed again. These tools record a review only: they send no SMS and change no provider configuration.

The existing SDK methods automations.getSmsProviderUseCaseReviewEvidence and automations.submitSmsProviderUseCaseReview use the same API-owned library. Direct web attestation remains Cognito-only. Recording a review does not enable an Automation or bypass its current permissions, consent, sending hours, provider, or billing checks.

↑