Triggers
Triggers define what starts a flow. Required for type: flow, not allowed for type: subflow.
Trigger Fields
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Trigger type alias (see table below). |
table | string | Record types | Table name for record-based triggers. |
conditions | string | No | SN encoded query filter (e.g., priority=1^active=true). |
comment | string | No | Developer comment. |
Trigger Types
Record Triggers
Fire when a record is created, updated, or both.
| Type | Description | Requires table |
|---|---|---|
record_created | Record is created | Yes |
record_updated | Record is updated | Yes |
record_created_or_updated | Record is created or updated | Yes |
yaml
trigger:
type: record_created
table: incident
conditions: "priority=1"Scheduled Triggers
Fire on a schedule.
| Type | Description |
|---|---|
daily | Runs once per day |
weekly | Runs once per week |
monthly | Runs once per month |
repeat | Runs at a recurring interval |
run_once | Runs once at a specific time |
yaml
trigger:
type: dailyApplication Triggers
Fire in response to application events.
| Type | Description |
|---|---|
service_catalog | Service Catalog request submitted |
inbound_email | Inbound email received |
knowledge_management | Knowledge article event |
remote_table_query | Remote table query |
sla_task | SLA task event |
yaml
trigger:
type: service_catalogConditions
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).