Skip to content

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}/yaml

Export 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=true

This adds:

  • sys_id at the root level
  • id on each step (the step's unique identifier)
  • _metadata section 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 Desk

What 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:

  1. Export the flow from the Flows page (basic export)
  2. Open the YAML in the Editor
  3. Change the name and any other fields
  4. Click Create to push it as a new flow