sndev.io / docs

convert

Convert a flow or legacy workflow into a manifest — live flow by default; --from-xml for offline flow XML; --workflow for Workflow Editor migration.

The convert command has three modes. Default: convert a live Flow Designer flow by sys_id. --from-xml: convert a flow from an update-set XML export (offline). --workflow: convert a legacy Workflow Editor workflow by sys_id into a Flow Designer manifest.

sn convert <flow_sys_id> [--output <path>] [--prefix <p>]

Convert a live Flow Designer flow by sys_id.

Arguments

NameRequiredDescription
flow_sys_idYessys_id of the sys_hub_flow to convert.

Flags

FlagDefaultDescription
--output <path>Write the manifest to a file (default: stdout).
--prefix <p>converted_`internal_name` prefix.

Examples

sn convert c4a90a4183184310d3cfe5d0deaad3c3 --output ./converted/manifest.ts
sn convert <export.xml> --from-xml [--flow <sys_id>] [--output <path>] [--prefix <p>] [--list] [--resolve-instance]

Convert a flow from an update-set XML export (offline).

Arguments

NameRequiredDescription
export.xmlYesCanonical ServiceNow XML export containing one or more flows.

Flags

FlagDefaultDescription
--from-xmlSelects XML-flow mode.
--flow <sys_id>Target flow sys_id (required if the export has multiple).
--output <path>Write the manifest to a file (default: stdout).
--prefix <p>converted_`internal_name` prefix.
--listList every flow in the export and exit.
--resolve-instanceFall back to live API for action-type refs not carried in the XML (hits the instance).

Examples

sn convert export.xml --from-xml --list
sn convert export.xml --from-xml --flow abc123 --output ./onboarding/manifest.ts
sn convert <workflow_sys_id> --workflow [--output <path>]

Convert a legacy Workflow Editor workflow to a Flow Designer manifest.

Arguments

NameRequiredDescription
workflow_sys_idYessys_id of the wf_workflow to convert.

Flags

FlagDefaultDescription
--workflowSelects Workflow Editor mode.
--output <path>Write the manifest to a file (default: stdout).

Examples

sn convert 7c13deef87aa2a100f22cd56cebb35dd --workflow --output ./legacy/manifest.ts

Unknown action/logic types and catalog-trigger config beyond table binding surface as FIXME inline comments in the output. Inspect before executing.

After converting a flow, run sn test with flowFidelity enabled — it diffs the rebuilt label_cache against the source flow, catching pills that did not round-trip.