YAML Schema
Complete reference for the letitflow-sn YAML flow definition format.
Root Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
schema | string | No | nebula | Schema version codename. See Schema Versions. |
sys_id | string | No | — | Flow sys_id (32-char hex). Set by --export --with-uuid. Required for --update. |
name | string | Yes | — | Flow display name. |
type | string | No | flow | flow or subflow. |
status | string | No | draft | draft or published. |
description | string | No | — | HTML description (same as in Flow Designer). |
run_as | string | No | system | system or user. |
access | string | No | public | public or package_private. |
priority | string | No | — | HIGH or MEDIUM. |
active | boolean | No | true | Whether the flow is active. |
scope | string | No | — | Application scope sys_id. |
trigger | object | Flows | — | Trigger definition. Required for type: flow. |
inputs | list | No | — | Subflow input parameters. See Variables. |
outputs | list | No | — | Subflow output parameters. |
variables | list | No | — | Scratch variables. |
stages | list | No | — | Service Catalog stages. See Stages. |
steps | list | Yes | — | Flow steps. See Step Types. |
_metadata | object | No | — | Internal identity data (generated by --export --with-uuid). Do not edit. |
Minimal Example
yaml
schema: nebula
name: Hello World Flow
type: flow
trigger:
type: record_created
table: incident
steps:
- action: log
inputs:
message: "A new incident was created: $trigger.current.number"Full Example
yaml
schema: nebula
name: Incident Auto-Assignment
type: flow
status: draft
description: Assigns new P1 incidents to the on-call group.
run_as: system
access: public
priority: HIGH
trigger:
type: record_created
table: incident
variables:
- name: assigned_group
type: string
steps:
- action: lookup_record
id: find_group
name: Find On-Call Group
inputs:
table: sys_user_group
conditions: "name=On-Call Support"
- if: "$trigger.current.priority = 1"
then:
- action: update_record
name: Assign to On-Call
inputs:
table: incident
values:
assignment_group: $find_group.record.sys_id
- action: send_email
inputs:
to: $find_group.record.email
subject: "P1: $trigger.current.short_description"
body: "A new P1 incident requires attention."
else:
- action: log
inputs:
message: "Non-P1 incident, no auto-assignment."Variables
Inputs, outputs, and variables share the same format:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Element name. Must match ^[a-z][a-z0-9_]*$. |
label | string | No | Display label. |
type | string | No | Data type (see below). |
mandatory | boolean | No | Whether the field is required. |
default | string | No | Default value. |
reference | string | No | Reference table name (for type: reference). |
max_length | integer | No | Maximum string length. |
array | boolean | No | Whether this is an array variable. |
help | string | No | Help text. |
hint | string | No | Placeholder hint. |
Variable Types
string, integer, boolean, decimal, float, reference, table_name, glide_date_time, glide_date, html, journal, journal_input, url, email, phone_number, script, conditions, document_id, choice, currency, price, sys_class_name, translated_text, ip_addr
Subflow Example
yaml
schema: nebula
name: Send Notification
type: subflow
inputs:
- name: recipient
type: reference
reference: sys_user
mandatory: true
- name: message
type: string
mandatory: true
outputs:
- name: success
type: boolean
steps:
- action: send_email
inputs:
to: $input.recipient.email
subject: Notification
body: $input.message
- assign_outputs: "Set result"
inputs:
success: "true"