Exporting Flows
Export any flow to YAML for version control, documentation, or templating.
flowctl --instance https://myco.service-now.com \ --export a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4The output goes to stdout. Redirect to a file:
flowctl --instance https://myco.service-now.com \ --export <sys_id> > my-flow.yamlWhat Gets Exported
Section titled “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 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)
Export for Update
Section titled “Export for Update”To export with identity metadata needed for the update workflow, add --with-uuid:
flowctl --instance https://myco.service-now.com \ --export <sys_id> --with-uuid > my-flow.yamlThis adds:
sys_idat the root levelidon each step (the step’s unique identifier)_metadatasection mapping step IDs to ServiceNow internal records
Using Exports as Templates
Section titled “Using Exports as Templates”Export a flow without --with-uuid, change the name, and create a new flow from it:
- Export:
flowctl --export <sys_id> > template.yaml - Edit the
namefield (and any other fields) - 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