Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 39 ยท Integrations and Service Portal

IntegrationHub, Spokes and the MID Server

Learn how ServiceNow IntegrationHub spokes, connection and credential aliases, and the MID Server connect the instance to outside and on-premise systems.

Writing a REST call by hand for every integration is slow, and each one needs credentials, error handling and maintenance. IntegrationHub is ServiceNow's low-code answer. It supplies prebuilt spokes, which are bundles of flow actions for a particular product, so that "create a Jira issue" or "post a Slack message" is a drag-and-drop step in Flow Designer. When the target is behind your firewall, the MID Server carries the traffic.

IntegrationHub needs a licensed instance and real target systems, so it cannot run here. This lesson describes the menus and rules, and the runnable blocks are stand-ins that show the ideas: connection aliases and a polling queue.

Spokes

A spoke is an application that contains actions (and sometimes flows and connections) for one external system. Examples: Microsoft Teams, Slack, Jira, Azure, AWS, Active Directory, Google Workspace, Workday, Ansible and many more. You obtain spokes from the ServiceNow Store or through the Application Manager.

Once installed, a spoke's actions appear in Flow Designer's action picker, grouped by spoke name. The inputs and outputs are typed, so you drag pills in and out as with any action.

The same marketplace also holds Generic spokes you build yourself: REST, SOAP, JDBC, PowerShell, SSH and others. A REST step is the building block of a custom action: it contains the method, URL template, headers and a body with placeholders for the action's inputs.

Connections and credentials

Hard-coding an endpoint and password inside a flow is a mistake. IntegrationHub separates three things:

Object Holds Changes per environment
Credential The secret: username/password, API key, OAuth token details Yes (dev, test, prod have their own)
Connection The endpoint (URL), plus a credential reference Yes
Connection & Credential Alias A stable name the flow uses, for example Jira Production No

The flow references the alias. In each environment you configure which connection that alias resolves to. When you promote the flow from development to production, the alias stays the same and production's alias already points at the production system. That avoids edits after every deployment and keeps secrets out of update sets.

flowchart LR
    F["Flow action: Create issue"] --> AL["Alias: Jira"]
    AL -->|"in dev"| C1["Connection: jira-dev.example.com"]
    AL -->|"in prod"| C2["Connection: jira.example.com"]
    C1 --> K1["Credential (dev)"]
    C2 --> K2["Credential (prod)"]

One alias in the flow; each instance resolves it to its own connection and credential.

Building an action with a REST step

In Action Designer, add an Input such as summary, add a REST step, choose your connection alias, enter the method and relative path, add the JSON body with {{inputs.summary}}-style data pills, and map the response into Outputs. Test the action from the designer: it lets you enter inputs and shows the raw request and response. Then publish and use it in flows.

Good actions return a small set of well-named outputs (issue_key, status_code, error_message) and do not leak secrets.

The MID Server

The MID Server (Management, Instrumentation and Integration) is a small Java application that you install on a machine inside your network. It talks out to your ServiceNow instance over HTTPS (port 443), so no inbound firewall hole is needed. The instance places work for it in the ECC queue (External Communication Channel), the MID Server polls for jobs, runs them locally, and posts results back.

What it does:

  • Discovery: scans your network and finds devices, then feeds the CMDB.
  • Integration: calls on-premise APIs, databases (JDBC) and scripts that the cloud cannot reach.
  • Orchestration and Service Mapping: runs commands on servers and builds service maps.

You install it from MID Server > Downloads (Windows or Linux), configure it with a username, password and instance URL, and then validate it in the instance (the MID Servers list shows Status Up and Validated). Plan redundancy: use two or more MID Servers in a cluster so a single machine failure does not stop work, and keep them patched; they auto-upgrade with the instance.

The ECC queue in miniature

Every MID Server job is a row in the ECC queue with a Queue direction (output from instance to MID, input back), a State (ready, processing, processed, error) and a Topic (for example Command or JDBCProbe). Reading it is the standard way to debug: if a job is stuck in ready, the MID Server is down or does not match the job's capabilities.

A stand-in for aliases and the ECC queue

The first stand-in shows why aliases remove edits between environments.

JS Stand-in: one alias, two environments

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The second stand-in models a MID Server polling the queue, to show why a job stays in ready when no matching MID Server is up.

JS Stand-in: a MID Server polling an ECC queue

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Job 2 remains ready because mid-b is down. In a real instance that is where you see the symptom first.

Choosing an integration style

Situation Choose
A popular SaaS product has a spoke The spoke action
A cloud API without a spoke REST step in a custom action
Inbound calls from other systems Scripted REST API or the Table API
Data feeds in bulk (CSV, JDBC) Import sets and transform maps
System behind the firewall MID Server with the above

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a spoke?

    Spokes bundle ready-made actions, so you integrate without writing REST code.
  2. 2. Why use a connection and credential alias in a flow?

    The alias is stable; connections and secrets differ per environment and stay out of update sets.
  3. 3. How does a MID Server communicate with the instance?

    The MID Server initiates outbound HTTPS connections, so no inbound firewall opening is required.
  4. 4. An ECC queue job stays in state ready. What is a likely cause?

    A job remains ready until a MID Server with the right capabilities polls and takes it.

Summary

  • Spokes provide prebuilt actions; custom actions use REST steps when none exists.
  • Credentials, connections and aliases separate secrets and endpoints from flow logic.
  • The MID Server polls outbound over HTTPS and processes ECC queue jobs for on-premise work and Discovery.
  • Choose spoke, REST, import or MID Server by the shape of the problem.

Next: Import Sets and Transform Maps