Skip to main content
Was this helpful?

Trigger Reference

All valid triggerType values available when building automation rules in PrimeCal.

Trigger Types

Enum ValueWire StringDescriptiontriggerConfig Required
EVENT_CREATEDevent.createdFires when a new event is created in any of the user's calendars.None
EVENT_UPDATEDevent.updatedFires when an existing event is modified.None
EVENT_DELETEDevent.deletedFires when an event is deleted.None
EVENT_STARTS_INevent.starts_inFires X minutes before an event starts.{ minutesBefore: number }
EVENT_ENDS_INevent.ends_inFires X minutes before an event ends.{ minutesBefore: number }
RELATIVE_TIME_TO_EVENTrelative_time_to_eventFires at a time relative to event start or end (positive or negative offset).{ offsetMinutes: number, anchor: 'start' | 'end' }
CALENDAR_IMPORTEDcalendar.importedFires when an external calendar sync import completes.None
SCHEDULED_TIMEscheduled.timeFires on a cron schedule, independent of any specific event.{ cronExpression: string }
WEBHOOK_INCOMINGwebhook.incomingFires when a POST request is received at the rule's unique webhook URL.None
TASK_STATUS_CHANGEDtask.status_changedFires when a task's status field changes (e.g. tododone). Not yet selectable from the rule builder UI — create rules using it via the Automation API.None
TASK_SCHEDULED_STARTtask.scheduled_startFires when a task reaches its scheduled start time, including tasks instantiated from a routine template. Also API-only for now.None
NOTIFICATION_DISPATCHEDnotification.dispatchedFires 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. minutesBefore values below 1 are unreliable.

  • scheduled.time: cronExpression must 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 unique webhookToken (64-char hex). Token is accessible in the rule detail view and can be regenerated via POST /api/automation/rules/:id/webhook/regenerate.

  • relative_time_to_event: Introduced for finer-grained time offsets not covered by event.starts_in/event.ends_in. Uses offsetMinutes (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_start is 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 the send_notification action — 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.). Use notification.type and notification.channel condition 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-minute event.reminder in-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 DomainEventBus rather than a direct service call, it works for any notification eventType in 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.