Trigger Reference
All valid triggerType values available when building automation rules in PrimeCal.
Trigger Types
| Enum Value | Wire String | Description | triggerConfig Required |
|---|---|---|---|
EVENT_CREATED | event.created | Fires when a new event is created in any of the user's calendars. | None |
EVENT_UPDATED | event.updated | Fires when an existing event is modified. | None |
EVENT_DELETED | event.deleted | Fires when an event is deleted. | None |
EVENT_STARTS_IN | event.starts_in | Fires X minutes before an event starts. | { minutesBefore: number } |
EVENT_ENDS_IN | event.ends_in | Fires X minutes before an event ends. | { minutesBefore: number } |
RELATIVE_TIME_TO_EVENT | relative_time_to_event | Fires at a time relative to event start or end (positive or negative offset). | { offsetMinutes: number, anchor: 'start' | 'end' } |
CALENDAR_IMPORTED | calendar.imported | Fires when an external calendar sync import completes. | None |
SCHEDULED_TIME | scheduled.time | Fires on a cron schedule, independent of any specific event. | { cronExpression: string } |
WEBHOOK_INCOMING | webhook.incoming | Fires when a POST request is received at the rule's unique webhook URL. | None |
TASK_STATUS_CHANGED | task.status_changed | Fires when a task's status field changes (e.g. todo → done). Not yet selectable from the rule builder UI — create rules using it via the Automation API. | None |
TASK_SCHEDULED_START | task.scheduled_start | Fires when a task reaches its scheduled start time, including tasks instantiated from a routine template. Also API-only for now. | None |
NOTIFICATION_DISPATCHED | notification.dispatched | Fires whenever a notification is dispatched to the rule owner, across any channel — e.g. an event.reminder push notification, a reservation.due alert, or another rule's send_notification action. | None |
Notes
-
event.starts_in/event.ends_in: The scheduler polls at a 1-minute resolution.minutesBeforevalues below 1 are unreliable. -
scheduled.time:cronExpressionmust be a valid 5-field cron expression (minute hour day month weekday). The scheduler evaluates eligible cron expressions every minute. -
webhook.incoming: Each rule with this trigger type is assigned a uniquewebhookToken(64-char hex). Token is accessible in the rule detail view and can be regenerated viaPOST /api/automation/rules/:id/webhook/regenerate. -
relative_time_to_event: Introduced for finer-grained time offsets not covered byevent.starts_in/event.ends_in. UsesoffsetMinutes(negative = before, positive = after). -
task.status_changed/task.scheduled_start: Backend-recognized trigger types not yet exposed in the rule builder's trigger picker.task.scheduled_startis what drives the "routine task fires a smart-home REST call at its scheduled time" pattern — see Smart-Home Automation. -
notification.dispatched: The reverse direction of thesend_notificationaction — instead of a rule sending a notification, a rule can react to one being sent (by any source: the reminder scheduler, another automation rule, a reservation alert, etc.). Usenotification.typeandnotification.channelcondition fields (see Condition Reference) to narrow which notifications a rule reacts to. This lets a notification orchestrate an external system rather than only alerting the user — for example, a 5-minuteevent.reminderin-app notification can trigger a webhook action that activates a smart-home "meeting mode" scene:{"triggerType": "notification.dispatched","conditionLogic": "AND","conditions": [{ "field": "notification.type", "operator": "equals", "value": "event.reminder" },{ "field": "notification.channel", "operator": "contains", "value": "inapp" },{ "field": "notification.data.minutesBefore", "operator": "equals", "value": "5" }],"actions": [{ "type": "webhook", "config": { "url": "https://smarthome.local/api/scene/meeting-mode" } }]}Because this trigger fires from the shared
DomainEventBusrather than a direct service call, it works for any notificationeventTypein the catalog (see Notifications API) — not just event reminders.
Plan Requirement
Automation endpoints require a PrimeCal plan that includes the automation feature. See the Subscription page for plan details.
Related
- Condition Reference — fields and operators available in conditions
- Action Reference — available action types
- Webhooks (User Guide) — webhook integration walkthrough