Integration Hub adds integration steps to Workflow Studio once its plugin is active. The REST, JDBC, SSH and PowerShell steps reach external systems, the JSON and XML parser steps read incoming payloads, and the JSON Builder step assembles outgoing ones. Where a step runs depends on its type, and its settings choose the MID Server.
This guide follows the Brazil release. The Integration Hub guide covers the wider picture.
Where the integration steps run
Steps that work on record data run on the instance. Steps that talk to systems on your network run on a MID Server, which receives the process plan from the instance in a REST call and returns the result.
| Step | Purpose | Runs from |
|---|---|---|
| REST | Sends an outbound request to a web service | Instance or MID Server |
| XML parser | Maps XML elements to a complex object output | Instance or MID Server |
| JSON Builder | Creates a JSON payload from values and data pills | Instance |
| JDBC | Sends SQL commands to a relational database | MID Server |
| SSH | Runs commands on a *nix host | MID Server |
| PowerShell | Runs PowerShell scripts on remote machines | MID Server |
Creating these steps requires the action_designer or admin role. A MID Server user that runs a step needs the connection_admin and credential_admin roles to read the connection and credential records it uses.
Switching back and forth between the instance and a MID Server splits one flow across two execution environments, so group record operations together and group MID Server steps together. On a MID Server a record reference arrives as a sys_id value, so a Reference input does not work there. Use a separate input that carries the values the step needs.
Building an outbound request with the REST step
The REST step sends a request to a REST web service, so it can retrieve, create, update or delete data. It requires the Integration Hub subscription.
Choosing how the request is built
The Build Request field offers manual entry, an OpenAPI specification, or a platform REST message. The HTTP method can be GET, POST, PUT, PATCH or DELETE. The Request Type field offers Text, Binary, Multipart and Form URL-Encoded bodies, and it is editable for POST, PUT, PATCH and DELETE.
Importing a REST message makes a copy, so later edits to the message do not reach the step, and the step becomes the place to maintain that logic. The connection can be drawn from a Connection Alias, and the guide on Integration Hub authentication and aliases explains how those are set up.
Connection, timeouts and MID selection
An alias holds the base URL and credentials, so a change is made once rather than in each action. Connection Timeout sets how many milliseconds the step waits for a host connection. Leave it empty for the system default, and avoid zero, which can produce a stale connection.
Ticking Use MID exposes auto-select, specific MID Server and specific MID Cluster options. A cluster is a group of MID Servers that spreads integration work across them.
Headers, query parameters and responses
Responses that are not saved as attachments are limited to 5 MB by default, and a larger direct response produces an error. Either save the response as an attachment, or raise the limit through the glide.pf.rest.response_payload_max_size property, which tops out at 10,240 KB (10 MB). Enable Retry Policy turns on retries, and Override Default Policy for Alias lets the step choose a different policy from the one on the alias.
Importing OpenAPI and Postman definitions
The REST step can build its request from an OpenAPI specification. The separate OpenAPI/Postman step imports a specification or a Postman collection, derives the request details for the chosen operation, and creates a complex data object output for a JSON response.
The import accepts OpenAPI 2.0 and 3.0 and Postman 2.0.0 and 2.1.0 files, supplied by URL with credentials or pasted as JSON. Building the step requires the action_designer role together with open_api_admin, or the admin role. A walkthrough for turning these files into a spoke is in the guide to spokes built from Postman, OpenAPI or Otto.
Importing into a REST step adds the parameters and headers from the specification, so review the result and remove what the call does not need. In a REST step, request bodies accept JSON and XML-based media types. Several OpenAPI 3.0 components are not supported, including discriminator, callback and security scheme objects. The operation count defaults to 500, and the glide.rest.openapi.max_operation_limit property can set it from 1 to 1,000.
Running SQL with the JDBC step
The JDBC step sends SQL commands to a relational database from a MID Server with the JDBC capability. Database Type offers MySQL, Oracle, SQLServer and Custom, and Custom is the default.
Connection Timeout sets how many seconds the step may spend connecting, and Query Timeout sets how long a query may run without a response. Maximum Rows defaults to 1000, and Maximum Payload Size defaults to 5120 KB and can reach 10 MB.
By default the step permits SELECT, INSERT, UPDATE, DELETE, SHOW and DESCRIBE. Narrow that list with the mid.property.jdbc_operations MID Server property. Multiple statements in one step are not allowed, and stored procedures with output parameters are not supported. Escape user input with the Sanitize SQL transform functions that appear when a data pill is dropped into the SQL Statement input.
For JDBC operations, run the Data Stream action asynchronously and poll the Attachment table for results. The payload wait defaults to 600 seconds and the child plan wait to 60 seconds, and the properties that set them, com.snc.process_flow.datastream.payload.timeout.seconds and com.snc.process_flow.datastream.async_child.timeout.seconds, each cap at 7200.
Running SSH commands and PowerShell scripts
The SSH step
The SSH step runs commands on a *nix host through a MID Server and supports ServiceNow SSH only. The credential must be an SSH private key or SSH credential. A Windows credential that uses the MID Server service account option is not supported.
Port accepts 1 to 65535, and any other value falls back to 22. Long Running turns off the default 120-second connection timeout for longer commands. Escape data pills in the Command field with the Sanitize shell arguments transform functions. MID Server scripts are called inside the command with the syncFile parameter, which locates the named script in the MID Server Script File table and syncs it to the target host. Helper files must be synced as well, and the user is responsible for removing copied files afterwards.
The PowerShell step
The PowerShell step runs scripts on remote machines through a MID Server. It supports PowerShell 3.0 to 7.4 and by default uses 3.0 to 5.1. Setting mid.property.ihub.prefer_powershell6Plus to true enables the newer versions, which must be installed on the MID Server by hand. A setup walkthrough is in the PowerShell spoke guide.
Remoting Type decides where the script runs. Explicit Remoting, the usual choice, runs it on a remote server. Implicit Remoting runs on the MID Server while importing modules from a remote server. Script type defaults to MID Server Script File, so the script can change without redeploying the action.
Reading and building JSON and XML payloads
The JSON parser step
The JSON parser maps a payload to a complex object output without a script. Runtime payloads can reach 10 MB, and larger ones call for a Data Stream action. Select the data pill that holds the payload and enter one record as the example, since the example defines the structure. Example payloads are capped at 2 MB and cannot contain multidimensional arrays. Keys with hyphens, periods, spaces, double colons or the @ symbol are not supported.
Generate Target builds the output structure from the example, with child elements typed as String. The top-level element must be an Object, and the mandatory toggle applies to String elements.
The XML parser step
The XML parser works the same way, with runtime payloads up to 10 MB and design-time samples limited to 64,000 characters. XML namespaces are not carried into the complex object, and a file with more than one namespace produces an error.
The JSON Builder step
The JSON Builder assembles a payload from name-value pairs of type String, Object, Number, Boolean or Array. Its In case of empty value setting can keep an empty string, omit the property, set it to null, or throw an error. The output is the payload as a string, plus a Step Status code of 1 for an error or 0 for success.
Testing steps and handling failures
The Test REST Step, Test JDBC Step and Test PowerShell Step buttons open a test window that runs the step with the inputs you supply. Test a PowerShell credential before building the rest of the step; the result shows the username, target, validation status and errors.
The If this step fails setting decides whether the flow continues or moves to error evaluation, and the step status code and message can drive a custom action error condition. For steps that ran on a MID Server, read the flow execution details alongside the MID Server execution status. For planning help, see the Integration Hub implementation service.
Integration Hub or a custom REST integration: when should you use which?
Use Integration Hub when a prebuilt spoke or a standard step covers the target system and your team wants the flow kept inside Workflow Studio. Build a custom REST integration when the target API needs logic a spoke does not expose, or when one endpoint is the only thing you need. In practice, many teams end up running both.
What separates the two options
Once its plugin is active, Integration Hub makes integration steps available inside Workflow Studio. A custom REST integration is a set of outbound calls you configure yourself. In the Brazil release, the REST step requires the Integration Hub subscription, so a REST call built with that step still sits under that subscription. The real decision is how much you want to maintain, not which product you buy.
Signs that point toward Integration Hub
- A spoke covers the target system and the actions you need, so the work is configuration rather than mapping.
- A platform team will own the flows through upgrades and does not want to read custom scripts to maintain them.
- Error handling must behave the same way across many flows.
- Each target system should have one alias, so a credential change is made once.
Signs that point toward a custom REST integration
- The API expects a value computed for each call, such as a request signature. Confirm the step inputs can carry that value before committing, since this is where custom builds tend to stall.
- Only one or two flows call the endpoint, and no spoke covers it.
- Your engineers already own the API contract, and a spoke would be a second copy that drifts.
How to compare the two before building
- List each spoke that could apply, then mark which of your required calls it does not cover.
- Count the flows that will call the same endpoint. The more flows share it, the more a shared spoke and alias pay off.
- Estimate daily call volume per flow, including retries, since retries add calls on top of normal traffic.
- Decide where the calls run. Because the REST and XML parser steps can execute either on the instance or through a MID Server, a system you can only reach from inside your own network favors running them through a MID Server.
Ask for the entitlement and transaction consumption rules in writing before the design is signed off, and have the design state which of them it depends on.
What to ask for before sign-off
- A named list of the spokes and steps in the design, with the subscription that covers each one.
- A transaction count for the busiest flow, including retries and repeated calls to the same endpoint.
- A test run in a non-production instance, using the Test REST Step window with the credentials the flow will use.
- A named owner for each alias and credential, with a rotation date in the runbook.
Frequently asked questions
Which steps run on a MID Server?
JDBC, SSH and PowerShell run on a MID Server. The REST and XML parser steps can run on either side, and the JSON Builder runs on the instance.
Can a REST step start from an existing REST message?
Yes. Choose From REST Message in the Build Request field and import the message. The import is a copy, so later edits to the original do not reach the step.
How large a JSON payload can the parser handle?
At runtime the JSON parser supports payloads up to 10 MB. Example payloads that define the structure are capped at 2 MB.
Can a JDBC step run more than one statement?
No. Multiple SQL statements are not allowed in one step, and stored procedures with output parameters are not supported.