Flow Designer steps are the single operations inside a custom action, such as creating a record or sending a REST request. Transform functions reshape a data pill at runtime, such as turning text into a date, without a script. This guide covers each step family and each transform category, so you can pick the right tool before you build.
Workflow Studio step types at a glance
A step is one reusable operation inside an action, added in Workflow Studio, the action design environment. ServiceNow data steps are available to all actions, application-specific steps appear once their spoke is activated, and integration steps appear once Integration Hub is active.
| Step family | Representative steps | Purpose |
|---|---|---|
| ServiceNow data | Create Record, Update Record, Delete Record, Create Task | Reads or changes rows on any table |
| Bulk record | Update Multiple Records, Delete Multiple Records | Acts on several matching records in one operation |
| Utilities | Log, Script, Notification | Builds payloads, writes logs, runs JavaScript, manages archives |
| Flow control | Wait For Condition | Pauses an action until record values match |
| Integrations | REST, SOAP, SFTP, Kafka Producer, JDBC, SSH, JSON Builder, ZIP | Calls external systems, some through a MID Server |
Record steps and their bulk variants
Create Record takes a table and template values, then returns the table name and a reference to the new record. Update Record works on a record you pass in. Its table fills in from that record, and field values can be static or built from data pills. Delete Record follows the same pattern with a read-only table.
Two details trip people up. Create Record and Update Record cannot update multiple journal fields, such as additional comments or work notes on a task. And if a script selects the record, add a check for a match before returning it. Some GlideRecord query methods return a list when nothing matches, so an unguarded script can point the update at more records than you intended, potentially all records in the table.
Bulk steps remove a common pattern. Update Multiple Records looks up a set of records and updates them in one step, with values set by template or data pills. Without it, you would look up a list and process it with a Script step loop. Create Task creates a record on an extension of the Task table, and its Parent field attaches the task to a parent record.
Each record step has an “If this step fails” choice: continue to the next step, or go to error evaluation and use the step status code or message as a custom error condition.
Wait For Condition and timeouts
Wait For Condition watches a record and pauses the action until its fields match conditions, such as State is Closed. Conditions must refer to fields on that record’s table. If the monitored record is deleted, the action stops waiting and continues, so downstream steps should handle that case.
Enable Timeout limits the wait and needs a Duration. A Schedule can compute the end date from a work calendar. Without a timeout, the step keeps waiting until the condition becomes true. If the delay is a fixed amount of time rather than a field value, use the Wait for a duration flow logic instead.
Logging, notifications and payloads
The Log step writes to the sys_flow_log table at Error, Warn or Info level. Typed text in the design environment is limited to 255 characters, but data pill values can be longer, and a script can call the GlideSystem log method for longer messages.
The ZIP step zips attachments into one archive, unzips the whole archive or chosen attachments, and lists archive contents with Get Zip File Details. Check the details before you unzip. It needs an Integration Hub subscription. The Notification step triggers a notification from a selected record, such as an incident, change request, problem or user. The Send Email step emails specified users or groups.
JSON Builder creates a payload from name and value rows, each typed String, Object, Number, Boolean or Array. The type must match the pill you drop in. Dropping a complex object pill into a Value fills an object row but removes any child rows the pill already had.
Script step runtimes
The Script step runs custom JavaScript where core steps fall short. Its Required Runtime setting decides where the code runs:
| Runtime | Runs on | Use it when |
|---|---|---|
| Instance (default) | ServiceNow instance | The script needs the ServiceNow API or instance data |
| MID | MID Server | The script needs MID Server script files and APIs |
| Vanilla (Core JavaScript) | Instance or MID Server | The script needs the core JavaScript APIs |
The runtime field appears when Integration Hub is active. Pick the narrowest runtime that covers what the script touches.
How transform functions behave
Apply a transform by selecting the f(x) icon on a data pill, choosing from Available Transforms, and selecting Apply. The original pill is unchanged, so each input that uses the pill needs its own transform. Several transforms run top to bottom in the Applied Transforms list, so order matters. A common pair is String to Date followed by Add Time.
Output values are field values, not display values. Flow execution details show just the final transformed value. A transform on the wrong data type is skipped, but a result that cannot be parsed, such as an invalid date, raises an error. Custom transform functions are not supported; use an inline script for custom logic. For a JDBC step’s SQL Statement input, the sanitize SQL category appears automatically, and for an SSH step’s Command input, sanitize shell arguments does.
Simple math transforms
Single-value functions take a Number, Integer or Decimal, and array functions take an array of numbers. A wrong input type passes the value through unchanged.
| Function | Example | Result |
|---|---|---|
| Absolute Value | -3 | 3 |
| Power | 2, parameter 3 | 8 |
| Average | [10, 30, 20] | 20 |
| Median | [10, 30, 15] | 15 |
| Sum | [1, -5, 20, 6] | 22 |
| Round | 194, parameter 2 | 190 |
| To Fixed | 1.93456, parameter 2 | 1.93 |
Round looks at the digit to the right of the chosen position. Zero to four rounds down, five to nine rounds up, and a missing digit rounds down. To Fixed truncates instead, so 1.93456 becomes 1.93 without rounding up.
Utilities and string transforms
Utilities handle structure. First Item and Last Item return a complex object. Get Item from Array uses an index starting at 0. Get Item from Name/Values returns the value for a key, or a default when the key is missing. When you map a Choice field such as Priority to a remote table, the runtime value may be the stored value, so 2 can come back where you expected 2 – High. Write comparisons against the stored value.
Is Blank treats an empty string, a zero integer or a false boolean as blank. Is Blank does not support reference inputs, so use Is Null for those. Sort orders string, integer, boolean or datetime arrays, and it is case-sensitive for strings. Unique removes duplicates, and Join combines elements with a delimiter.
String transforms need a String input. Convert String to Number turns “500” into 500. Contains and Ends With test text, and First Character returns a single letter. Transform outputs are field values, not display values, so a Choice field returns its stored value (for example 2) rather than its label (2 – High).
Date and time transforms
Runtime Date/Time values are not localised. They appear in UTC, so a time shown to a user can differ from the value the flow uses. Add Time and Subtract Time move a value by days, hours, minutes or seconds, and a Date input becomes a full Date/Time at midnight first. Adding three hours to 2019-09-12 11:00:00 gives 2019-09-12 14:00:00.
String to Date converts text using an input format. An incomplete custom pattern fills gaps with defaults, so Oct 2019 under MMM yyyy becomes 2019-10-01 00:00:00. Date to String formats a date for display with a preset or custom pattern. A wrong input type or invalid custom pattern cancels the flow at runtime, so test both.
Frequently asked questions
Can I write my own transform function?
Custom transform functions are not currently supported. Put custom logic in an inline script or a Script step, then pass the result to later steps.
Why does a simple math transform return the number I started with?
The input is probably the wrong type. Single-value functions need a number and array functions need an array of numbers. When the type does not match, the input passes through.
Why does the execution details view differ from the record?
Transform outputs are field values, and execution details show just the final transformed value. Compare the stored value with the label before assuming an error.
How do I update many records in one step?
Use Update Multiple Records. It looks up matching records and sets values through a template or data pills, which avoids a Script step loop.
How do I stop a Wait For Condition step from waiting indefinitely?
Enable Timeout and set a Duration. Add a Schedule if the end date should follow a work calendar, and use a fixed-duration wait when the delay does not depend on a field.
Do the ZIP and JSON Builder steps need Integration Hub?
Yes. Both need an Integration Hub subscription, and the ZIP step appears under Integrations once its plugin is active.
For the wider picture, start with the Flow Designer guides, then compare the steps here with flow logic control blocks. For the data side of a specific action, see the action inputs and outputs guide.