Exporting Flows
Export any ServiceNow flow as a YAML file.
Basic Export
From the Flows page, click any flow and choose Export YAML. This produces a clean YAML file without identity metadata — suitable for documentation or creating a new flow from the template.
You can also export via the REST API:
GET /api/v1/flows/{sys_id}/yamlExport with Identity Metadata
To export for the update workflow, use the Export for Update option (or add ?with_uuid=true to the API call):
GET /api/v1/flows/{sys_id}/yaml?with_uuid=trueThis adds:
sys_idat the root levelidon each step (the step's unique identifier)_metadatasection mapping IDs to ServiceNow internal records
Output Format
Exported YAML follows the same schema used for creating flows:
yaml
schema: nebula
name: My Incident Flow
type: flow
status: published
trigger:
type: record_created
table: incident
steps:
- action: lookup_record
name: Look Up Record
inputs:
table: sys_user
conditions: "sys_id=$trigger.current.caller_id"
- if: "$step1.record_count > 0"
then:
- action: update_record
inputs:
table: incident
values:
assignment_group: Service DeskWhat Gets Exported
- Flow metadata (name, type, status, description, run_as, access, priority)
- Trigger configuration (type, table, conditions)
- Inputs, outputs, and variables
- All steps with their configured inputs
- Step nesting (if/else, for_each, try/catch, parallel)
- Scripted values (when present)
- Field value maps (create/update record field assignments)
- Stages (Service Catalog flows)
Using Exports as Templates
Export a flow without identity metadata, change the name, and create a new flow from it:
- Export the flow from the Flows page (basic export)
- Open the YAML in the Editor
- Change the
nameand any other fields - Click Create to push it as a new flow