Read, create, validate, and export ServiceNow flows from the command line or REST API. Define flows in YAML. Deploy to any instance. Single binary, zero dependencies.
$ letitflow-sn --instance https://myco.service-now.com \ --sys-id a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 \ --format tree Flow: Incident Assignment (flow, published) Steps: 4 top-level, Inputs: 0, Outputs: 0, Variables: 1 FLOW Incident Assignment 1. 🔍 Look Up Record — Find Support Group 2. ◇ [If] Priority is Critical 2.1 ✉ Send Email — Urgent P1 Email ◆ [Else] 2.2 ● Log — Default handler 3. ✎ Update Record — Assign Incident
Everything you need to manage ServiceNow flows programmatically.
Parse any flow by sys_id into human-readable text, tree diagrams, or structured YAML.
Define flows in simple YAML. Create them in ServiceNow with triggers, steps, and values.
Export existing flows to YAML for version control, review, or migration between instances.
Record, Scheduled, Service Catalog, Inbound Email, Knowledge Management, and more.
If/Else, ForEach, DoUntil, Parallel, Try/Catch, Decision Tables — all supported.
Full pill reference resolution. Wire trigger outputs, step outputs, and variables across steps.
Validate YAML flows without a ServiceNow connection. Catch errors before deployment.
Full HTTP API for CI/CD integration. Validate, create, read, and export flows programmatically.
Client Credentials Grant or Basic Auth. Token caching with automatic refresh.
5-phase parallel API calls with goroutines. Deduplication by UI ID. Fast even for large flows.
One Go binary with embedded web UI. No runtime dependencies. Deploy anywhere.
ASCII tree output with box-drawing characters, step icons, and indented nesting.
Define complex flows in readable YAML. Here are a few examples.
Trigger on incident, find a group, assign it.
name: Simple Incident Assignment trigger: type: record_created table: incident steps: - action: lookup_record id: find_group inputs: table: sys_user_group conditions: "name=Service Desk" - action: update_record inputs: record: $trigger.current values: assignment_group: $find_group.record
Branch on priority, send targeted emails.
name: Priority-Based Notification trigger: type: record_created table: incident conditions: "priority<=2" steps: - if: "Priority is Critical" inputs: lhs: $trigger.current.priority operator: "=" rhs: "1" then: - action: send_email inputs: to: "oncall@example.com" subject: "CRITICAL: ..." else: - action: log inputs: message: "Low priority"
ForEach loops inside parallel branches.
name: Change Notification and Tasks trigger: type: record_created table: change_request steps: - action: lookup_record id: find_cis inputs: table: cmdb_rel_ci - parallel: "Notify and create" branches: - - for_each: "Each CI" do: - action: send_email - - for_each: "Each CI" do: - action: create_record
Three steps to get started.
# Download the binary $ curl -L -o letitflow-sn \ github.com/.../releases $ chmod +x letitflow-sn
$ letitflow-sn \ --instance https://myco.sn.com \ --sys-id abc123...def456 \ --user admin --pass secret
$ letitflow-sn --serve :8080 # Landing page → / # YAML Editor → /editor # REST API → /api/v1/ # Swagger UI → /api/docs