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 |
EVENT_RESCHEDULED | event.rescheduled | Fires when smart reschedule has actually moved an event — once per moved event, after the move was written. Runs the rules of the owner of the calendar the event is on, like event.created / event.updated / event.deleted. Never fires for an undo or for a plan that was rejected. | 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. -
event.rescheduled: Fires after smart reschedule has moved an event (someone confirmed a plan and the new time was saved). It fires once per event that was actually moved: if a plan moves three events and the third write fails, rules fire for the two that landed. It does not fire when a person presses Undo — putting an event back is not a new reschedule, and a rule reacting to it would fight them — and it does not fire when a plan is refused. Rules run for the owner of the calendar the event is on, exactly as forevent.created,event.updatedandevent.deleted: not for whoever confirmed the plan, and not for whoever created the event. If you displace a flexible event on a colleague's calendar, the colleague'sevent.rescheduledrules react, and yours do not; on a shared calendar the calendar owner's rules run even when someone else created the event. If the event or its calendar can no longer be found, nothing runs. Conditions are evaluated against the moved event as it is now (its new start and end), and several rules run one after another so they cannot race on the same event; a failing rule does not stop the others. The event condition fields and event smart values are the same onesevent.updatedoffers (see the Condition Reference).The announcement the rules are fired from carries these fields (ISO-8601 UTC timestamps). They describe the move for the server and are logged by event id only; they are not condition fields:
Field Meaning eventIdThe event that was moved. ownerIdThe moved event's creator ( createdById), read from the database row (never from the client). Informational: it does not choose which rules run — the calendar owner's do.actorIdThe user who applied the plan. May differ from ownerId.fromUtcThe start time the event had before the move. toUtcThe start time the event has after the move. causedByEventIdThe event whose placement displaced this one, or nullwhen the plan did not carry it. Reserved: currently alwaysnull.strategyThe reschedule strategy that produced the plan, or nullwhen the plan did not carry it. Reserved: currently alwaysnull.depthLoop guard. 1for a reschedule a person applied; higher for a reschedule caused by a reschedule. The planner returns nothing to do for any request made withdepthabove 0, so rules cannot ping-pong two flexible events forever.event.rescheduledalso pairs with theset_reschedulableaction, which decides which events are eligible to be moved in the first place. Note that writing the new time also firesevent.updatedrules for the event, as any edit does.
Plan Requirement
Automation endpoints require a PrimeCal plan that includes the automation feature. See Plans and Pricing for plan details.
Related
- Condition Reference — fields and operators available in conditions
- Action Reference — available action types
- Webhooks (User Guide) — webhook integration walkthrough