Automation Triggers

What It Is

This chapter is the trigger reference for the Automation Builder.

The Automation Builder, opened from an Automation detail, is the central and only place where an automation defines:

  • its trigger resource
  • its optional trigger selectors
  • its trigger event
  • its action content
  • its workflow variables

In other words, this is where you define both what starts the automation and what the automation does.

Why It Matters

Jetstack does not use one flat list of trigger names. A trigger is always a combination of:

  1. a trigger resource class
  2. zero or more selectors
  3. an event published by that resource

That structure matters because the same event name can mean different things on different resources, and because selectors let one resource family specialize itself for a concrete context such as:

  • a custom object type
  • a presenter action
  • a concrete module
  • a webhook path

Trigger Model

The trigger builder is driven by three contracts exposed by trigger resources:

  • getResourceIdentification() Provides the builder group and the resource choice shown in the trigger builder.
  • getKnownSelectors() Provides pre-known selector values for that resource where the platform can enumerate them.
  • getPublicEvents() Provides the events that may be selected for that resource, including the trigger parameters exposed to the automation.

At runtime, trigger parameters are available inside the automation through the trigger("code") function.

How Resource Class, Selectors, And Event Work Together

An automation trigger is stored with three main keys:

  • automationTriggerResource
  • automationTriggerSelectors
  • automationTriggerEvent

The resource class is always the primary identifier.

This is important:

  • for User, you listen directly on the User resource or the Users manager
  • you do not listen through SoopioObject[user]
  • for a custom type such as client, you do use SoopioObject[client] or SoopioObjects[client]

The selector only specializes the resource. It does not replace it.

Selector Matching Rules

Selectors are additive and subset-based.

If an automation is configured with selectors, the emitted event must contain all of them. The emitted event may contain more selectors than the automation requires.

This means:

  • a trigger without selectors listens to the general resource
  • a trigger with selectors listens to a narrower slice of that resource
  • the resource class must still match exactly

Two Triggering Modes

Not all trigger definitions are executed the same way.

Auto-driven triggers

These are discovered from active automations and registered into the global hook map. They run automatically when the platform emits the matching system event.

This is the main model for:

  • manager CRUD and query lifecycle events
  • active-resource field-update events
  • presenter lifecycle events
  • webhook requests
  • activity events

Caller-driven triggers

These are not resolved by the global hook map. Instead, another platform element points directly to the automation and passes the trigger parameters explicitly.

This is the main model for:

  • button-invoked automations
  • canvas-triggered automations
  • automation-to-automation calls
  • form event automations
  • scheduled-task execution
  • view-action automations

In these cases, the trigger definition is still important because it defines the contract of the incoming trigger parameters and keeps the automation understandable in the builder.

Selector Notes

Selectors are only pre-filled when the selected resource can enumerate them.

That means:

  • custom object resources can enumerate custom type system names
  • presenter resources can enumerate action names
  • ModulePresenter can enumerate module selectors in addition to action selectors

Some selectors are contextual or free-form and are therefore not fully enumerable in advance. The most important examples are:

  • webhook selectors
  • data-display runtime selectors

Trigger Resource Families

The following table groups resources by the event set they expose.

Builder categoryTrigger resource identificationsSelectorsEvent groupExecution modeNotes
ResourcesApp\Model\Automation, App\Model\Canvas, App\Model\EmailTemplate, App\Model\Folder, App\Model\Group, App\Model\LegalGround, App\Model\MediaFile, App\Model\Module, App\Model\Purpose, App\Model\Query, App\Model\Role, App\Model\Root, App\Model\Type, App\Model\User, App\Model\ViewnoneActiveResource eventsmixedonUpdateFields, onBeforeActionsBuild, onAfterActionsBuild, and onMentioned are emitted automatically. onButtonClick and onPerformAction are caller-driven patterns.
ResourcesApp\Model\SoopioObjectoptional custom type selector such as client, project, invoiceActiveResource eventsmixedThis is the resource family for custom implemented object types. It follows the same active-resource event split as the system resources.
ManagersApp\Model\Automations, App\Model\Canvases, App\Model\EmailTemplates, App\Model\Folders, App\Model\Groups, App\Model\LegalGrounds, App\Model\MediaFiles, App\Model\Modules, App\Model\Properties, App\Model\Purposes, App\Model\Queries, App\Model\Roles, App\Model\Roots, App\Model\Types, App\Model\ViewsnoneManager eventsauto-drivenThese resources cover create, list, get, update, delete, and duplication-form lifecycle on system object managers.
ManagersApp\Model\UsersnoneManager events and User-manager extra eventsauto-drivenUser management adds registration and password-reset related events.
ManagersApp\Model\SoopioObjectsoptional custom type selector such as client, project, invoiceManager eventsauto-drivenThis is the manager family for custom object types.
App pagesApp\Presenters\PresenterCommonsoptional action selector such as actionDefault, actionCreate, actionEditPresenter eventsauto-drivenThis is the generic presenter-wide resource for “any presenter” hooks.
App pagesConcrete presenters: ActiveResourcePresenter, AiAgentsPresenter, ApiAiPresenter, ApiV1Presenter, ApplicationPresenter, AsyncAutomationPresenter, AutomationsPresenter, BatchPresenter, CanvasesPresenter, CloudConsolePresenter, CodeInspectorPresenter, CustomizationPresenter, DataPresenter, EmailTemplatesPresenter, Error4xxPresenter, ErrorPresenter, FilterListsPresenter, FoldersPresenter, GroupsPresenter, HomepagePresenter, IdentityPresenter, ImplementationSyncPresenter, InstallPresenter, LegalGroundsPresenter, LinkPresenter, LinksPresenter, LocalStoragePresenter, MappingPresenter, MediaFilesPresenter, ModulesPresenter, ObjectPresenter, PermissionsPresenter, PropertiesPresenter, PublicPresenter, PurposesPresenter, QueriesPresenter, RolesPresenter, RootsPresenter, SchedulerPresenter, SearchPresenter, SecretsPresenter, StatusPresenter, TagsPresenter, TranslationsPresenter, TypesPresenter, UploadPresenter, UserPresenter, UsersPresenter, VersionsPresenter, ViewsPresenteroptional action selector from that presenter’s action* methodsPresenter eventsauto-drivenUse a concrete presenter when the hook should be limited to one page controller instead of all presenters.
App pagesApp\Presenters\ModulePresenteroptional action selector plus optional module selector such as module_15Presenter eventsauto-drivenThis is the main presenter resource that supports both action specialization and module specialization.
App pagesApp\Presenters\WebhookPresenteroptional webhook selector equal to the request path segment after /webhook/Webhook eventsauto-drivenThe selector is the webhook ID, not an action name. This is the main exception inside presenter-like resources.
FormsApp\Canvas\BaseFormnoneForm eventscaller-drivenBoth canvas Form and CustomForm items use this trigger contract.
SchedulerApp\Model\SchedulernoneScheduler eventscaller-drivenTriggered by scheduled task execution.
ExtrasApp\Automations\CommonEventsnoneCommon caller eventscaller-drivenUsed when another element explicitly calls the automation as a button, canvas, or automation invocation.
ExtrasApp\Model\ActivitiesnoneActivity eventsauto-drivenCurrently focused on type schema lifecycle.
ExtrasApp\Model\ViewControl, App\Model\QueryResultControlno pre-known selectors, but runtime emits selectors such as view=<id> and type=<typeId>Data-display eventsmixedonDataLoaded is auto-driven when the control loads data. onViewActionAutomationRun is caller-driven from view-action execution.

Event Groups

Manager Events

These events are provided by the base manager contract and therefore apply to all manager resources unless a more specific manager adds extra events.

EventTrigger parameters available through trigger("...")
onInitializeapp, callerObject
onDuplicateFormInitapp, originalObject, data
onBeforeCreateapp, data, isDuplication
onAfterCreateapp, data, object, isDuplication
onBeforeListapp, query
onAfterListapp, query, items, groups
onBeforeGetapp, id, internalEventData
onAfterGetapp, id, data, internalEventData
onBeforeGetManyapp, ids, internalEventData
onAfterGetManyapp, items, internalEventData
onBeforeUpdateapp, object, data, changes
onAfterUpdateapp, object, data, dataFinal, changes
onBeforeDeleteapp, id
onBeforeDeleteACLPassedapp, id
onAfterDeleteapp, id

User-Manager Extra Events

These events exist only on the Users manager.

EventTrigger parameters available through trigger("...")
onRegistrationInitiatedapp, object
onRegistrationCompleteapp, object
onPasswordResetInitapp, object

Active Resource Events

These events are exposed by concrete resources such as User, Module, View, Type, and also by SoopioObject.

EventTrigger parameters available through trigger("...")
onBeforeActionsBuildapp, callerObject, showAll
onAfterActionsBuildapp, callerObject, showAll
onUpdateFieldsapp, callerObject, data, initiator
onButtonClickapp, callerObject
onPerformActionapp, callerObject, args
onMentionedapp, target, referrer, referringProperty, referringCommentId

Presenter Events

These events are exposed by presenter resources.

EventTrigger parameters available through trigger("...")
onBeforeStartupapp, presenter, action
onAfterStartupapp, presenter, action
onBeforeRenderapp, presenter, action

Webhook Events

These events are exposed specifically by WebhookPresenter.

EventTrigger parameters available through trigger("...")
onWebhookReceivedapp, method, headers, content, payload
onWebhookCompletedapp, method, headers, content, payload

Form Events

These events are exposed by the shared form trigger resource App\Canvas\BaseForm.

EventTrigger parameters available through trigger("...")
onAnchorapp, form, context
onReloadapp, form, values, reloadInitiator, context
onValidateapp, form, values, context
onSubmitapp, form, context
onSuccessapp, form, values, httpData, context
afterSuccessapp, form, object, context
onErrorapp, form, context

Scheduler Events

These events are exposed by App\Model\Scheduler.

EventTrigger parameters available through trigger("...")
onScheduledTaskRunapp, args

Common Caller Events

These events are exposed by App\Automations\CommonEvents.

EventTrigger parameters available through trigger("...")
onCalledByButtonapp, callerObject, parameters
onCalledFromAutomationapp, callerObject, parameters
onCalledFromCanvasapp, callerObject, parameters

Activity Events

These events are exposed by App\Model\Activities.

EventTrigger parameters available through trigger("...")
onTypeCreatedapp, callerObject, data
onTypeUpdatedapp, callerObject, data, dataFinal

Data-Display Events

These events are exposed by App\Model\ViewControl and App\Model\QueryResultControl.

EventTrigger parameters available through trigger("...")
onDataLoadedapp, callerObject
onViewActionAutomationRunapp, dataQuery

How The Most Important Selector Families Work

Custom object selectors

SoopioObject and SoopioObjects use selectors for the custom type system name.

Example:

  • resource: App\Model\SoopioObject
  • selector: client
  • event: onUpdateFields

This means “listen to the custom object resource, but only for the client type.”

Presenter action selectors

Presenter resources use selectors based on action method names such as actionDefault, actionCreate, or actionEdit.

This lets you scope presenter lifecycle hooks to one action instead of the whole presenter.

Module selectors

ModulePresenter adds module selectors such as module_15.

This means you can narrow hooks both by:

  • the module being rendered
  • the presenter action

Webhook selectors

WebhookPresenter emits the webhook identifier from the request URL, meaning the selector is the path segment that follows /webhook/.

Example:

  • request path: /webhook/invoice-status
  • selector: invoice-status

This is how one automation can listen only to one webhook entry point while another listens to a different one.

Data-display selectors

ViewControl and QueryResultControl emit runtime selectors such as:

  • view=<view id>
  • type=<type id>

These selectors are emitted by the runtime even though the builder does not pre-fill them as known selectors.

Auto-Driven Versus Caller-Driven In Practice

Auto-driven in the current codebase

  • manager events
  • active-resource field-update events
  • presenter lifecycle events
  • webhook events
  • activity events
  • data-display onDataLoaded

These are discovered from active automations and registered into the request-level automation hook map.

Caller-driven in the current codebase

  • button-triggered automations
  • form-triggered automations
  • automation-to-automation calls
  • canvas-triggered automations
  • scheduler-triggered automations
  • view-action automations

These need to be configured from the caller side as well. The trigger definition on the automation side describes the intended contract, but the caller must still point to that automation.

Practical Design Guidance

  • Use direct resources where the platform has a dedicated resource class, such as User or Users.
  • Use SoopioObject and SoopioObjects only for custom tenant object types.
  • Add selectors when you want a narrower trigger than the whole resource family.
  • Treat webhook selectors and data-display selectors as contextual values rather than globally enumerable values.
  • When designing caller-driven automations, keep the trigger definition aligned with the caller that will invoke it, so the available trigger() parameters match reality.