Automation
An automation — a workflow made of Triggers (entry points)
and Nodes (steps) connected on a canvas.
Automations move through statuses: draft → live (or offline) → archived,
with past version snapshots kept after each automationsPublish.
Editing a live automation creates a separate draft copy (draftOf points at
the live _id) so in-progress edits never affect what is currently running.
hasDraft (on automationsMain rows) tells you whether a live
automation has an in-progress draft — use draftAutomationDetail
to open or create it.
AutomationFields
Unique identifier for this automation document (one per version/draft).
Stable namespace shared by the live automation, its versions, and its draft.
Use this — not _id — to address "the automation" across edits with
automationByNs / automationDetailByNs.
Display name shown in the automation list and builder.
One of draft, live, offline, archived, template, or version (a
past published snapshot). automations / automationsMain
exclude version, archived, and template by default unless status is
passed explicitly.
Set only on draft copies of a live automation — the _id of that live automation.
Absent on brand-new (never-published) drafts.
Whether a live/offline automation currently has an in-progress draft.
Populated by automationsMain only.
When this document was created.
When this document was last modified.
User id who created this document.
User id who last modified this document.
Resolved creator — see createdBy.
Resolved last editor — see updatedBy.
Namespace of the first node executed after a trigger fires.
Tag ids on this automation family. Set via automationsSetTags.
Resolved tags — see tagIds.
Description shown in the templates gallery. Set by automationsSaveAsTemplate.
Category shown in the templates gallery. Set by automationsSaveAsTemplate.
Version number, incremented on every automationsPublish.
1 on first publish; absent on drafts that have never gone live.
Timestamp of the most recent publish.
User id who most recently published this automation.
Timestamp this document was archived — set both when a past version is
superseded by a new publish, and when archiveAutomations archives
the whole automation.
Status to restore to via archiveAutomations(isRestore: true).
Only set while status is archived.