Direct answers to the 10 most-searched Flow Designer questions — script steps, REST calls, subflows, decision tables, and more. Also covers the Process Automation Designer / Workflow Studio rebrand (Washington DC+) which uses the same flow engine under the hood.
How to add a script step in Flow Designer?
Use the 'Script' action under the Utilities category. Define inputs explicitly so prior step outputs are passed in — Flow Designer scripts do NOT have access to flow variables by default.
Add Action → Utilities → 'Script'.
On the Inputs tab, drag each upstream pill into a typed input (string, reference, etc.).
In the script body, read via `inputs.your_var` and return an object matching the Outputs schema.
Use `outputs.result = ...` — never `gs.print` for return values.
(function execute(inputs, outputs) {
var gr = new GlideRecord('incident');
if (gr.get(inputs.incident_sys_id)) {
outputs.short_desc = gr.short_description.toString();
outputs.priority = gr.priority.toString();
}
})(inputs, outputs);
How to call a REST Message in Flow Designer?
Prefer the built-in 'REST' step over scripting a RESTMessageV2 call — it gives you retry, error branches, and a typed response without code.
Add Action → Integrations → 'REST'.
Pick the Connection & Credentials Alias (set up once in sys_connection).
Map path params, query params, headers, and body in the input form.
Drag `Response Body` into a downstream Script step and `JSON.parse(inputs.body)` it.
// Inside a downstream Script step
var data = JSON.parse(inputs.body || '{}');
outputs.id = data.id;
outputs.status = data.status;
How to call a Script Include from Flow Designer?
Script Includes are not directly selectable. Wrap the call in a Script step OR build a custom Action that exposes the Script Include as inputs/outputs for reuse.
Make sure the Script Include is Client Callable = false and is in the same scope (or marked Accessible from: All scopes).
Add a Script step, declare your inputs, and instantiate: `new global.MyHelper().doWork(inputs.x)`.
For reuse across flows, promote the wrapper to a custom Action (Action Designer → Script step → publish).
(function execute(inputs, outputs) {
var helper = new global.IncidentHelper();
outputs.result = helper.classify(inputs.incident_sys_id);
})(inputs, outputs);
How to call a Subflow from a Flow?
Use the 'Call a Subflow' action. Subflow inputs/outputs must be defined on the subflow itself — they appear as a typed step in the parent flow.
On the subflow, define Inputs and Outputs (Properties → Inputs / Outputs tabs).
In the parent flow: Add Action → Flow Logic → 'Call a Subflow'.
Pick the subflow; the Inputs panel auto-populates. Map pills.
Use Outputs in downstream steps like any action result.
How to create and set flow variables?
Flow Variables are scoped to the whole flow. Create them in Properties → Flow Variables, then 'Set Flow Variables' anywhere in the flow.
Open the flow → Properties (gear) → Flow Variables → +.
Name, type (String, Reference, etc.), and default value.
Use Flow Logic → 'Set Flow Variables' to assign values mid-flow.
Read them in any step's input pill picker under 'Flow Variables'.
How to use a Decision Table in Flow Designer?
Decision Tables (sys_decision) replace nested if/else. The 'Make a Decision' action returns the matching answer based on inputs you pass in.
Build the Decision Table in Decision Builder (rows = conditions, columns = inputs).
In the flow: Add Action → Flow Logic → 'Make a Decision'.
Pick the decision table, map inputs.
Branch downstream steps on the returned `Answer` pill.
How to create a Flow Designer flow for a catalog item?
Set the trigger to 'Service Catalog' and pick the Catalog Item. The flow runs in place of legacy workflows and exposes variables via the requested_item record.
Pass the record reference via inputs (don't rely on `current` — Flow Designer scripts don't have one).
(function execute(inputs, outputs) {
var gr = new GlideRecord('incident');
if (gr.get(inputs.incident_sys_id)) {
gs.eventQueue('incident.escalated', gr, gs.getUserID(), inputs.reason);
outputs.fired = true;
}
})(inputs, outputs);
How to check Flow Designer versions and revert?
Every published flow snapshot is stored in sys_hub_flow_snapshot. Open the flow → ⋮ menu → 'Show Versions' to view, compare, or restore a prior version.
Open the flow → ⋮ (top right) → 'Show Versions'.
Click any prior version to preview it.
Click 'Revert to this version' — Flow Designer creates a new draft from that snapshot.
Test in a sub-prod instance, then Publish.
How to create a custom Action in Flow Designer?
Actions are reusable building blocks. Build them in Action Designer with typed inputs/outputs so any flow can drag them in.