Skip to content

Triggers

Triggers define what starts a flow. Required for type: flow, not allowed for type: subflow.

Trigger Fields

FieldTypeRequiredDescription
typestringYesTrigger type alias (see table below).
tablestringRecord typesTable name for record-based triggers.
conditionsstringNoSN encoded query filter (e.g., priority=1^active=true).
commentstringNoDeveloper comment.

Trigger Types

Record Triggers

Fire when a record is created, updated, or both.

TypeDescriptionRequires table
record_createdRecord is createdYes
record_updatedRecord is updatedYes
record_created_or_updatedRecord is created or updatedYes
yaml
trigger:
  type: record_created
  table: incident
  conditions: "priority=1"

Scheduled Triggers

Fire on a schedule.

TypeDescription
dailyRuns once per day
weeklyRuns once per week
monthlyRuns once per month
repeatRuns at a recurring interval
run_onceRuns once at a specific time
yaml
trigger:
  type: daily

Application Triggers

Fire in response to application events.

TypeDescription
service_catalogService Catalog request submitted
inbound_emailInbound email received
knowledge_managementKnowledge article event
remote_table_queryRemote table query
sla_taskSLA task event
yaml
trigger:
  type: service_catalog

Conditions

The conditions field uses ServiceNow encoded query syntax:

yaml
trigger:
  type: record_updated
  table: incident
  conditions: "priority=1^state!=7^active=true"

Common operators: =, !=, >, <, >=, <=, LIKE, NOT LIKE, STARTSWITH, ENDSWITH, IN, NOT IN, ISEMPTY, ISNOTEMPTY, BETWEEN, CHANGESFROM, CHANGESTO.

Multiple conditions are joined with ^ (AND) or ^OR (OR).