Skip to content

Exporting Flows

Export any flow to YAML for version control, documentation, or templating.

Terminal window
flowctl --instance https://myco.service-now.com \
--export a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4

The output goes to stdout. Redirect to a file:

Terminal window
flowctl --instance https://myco.service-now.com \
--export <sys_id> > my-flow.yaml
  • Flow metadata (name, type, status, description, run_as, access, priority)
  • Trigger configuration (type, table, conditions)
  • Inputs, outputs, and variables
  • All steps with configured inputs
  • Nesting structure (if/else, for_each, try/catch, parallel)
  • Scripted values
  • Field value maps (create/update record field assignments)
  • Stages (Service Catalog flows)

To export with identity metadata needed for the update workflow, add --with-uuid:

Terminal window
flowctl --instance https://myco.service-now.com \
--export <sys_id> --with-uuid > my-flow.yaml

This adds:

  • sys_id at the root level
  • id on each step (the step’s unique identifier)
  • _metadata section mapping step IDs to ServiceNow internal records

Export a flow without --with-uuid, change the name, and create a new flow from it:

  1. Export: flowctl --export <sys_id> > template.yaml
  2. Edit the name field (and any other fields)
  3. Create: flowctl --create template.yaml

The exported YAML follows the same schema used for creating flows, so any export is also a valid input for --create.


Need to create or update flows? See Pro features