Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Configure REST Step in Integration Hub - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Configure REST Step in Integration Hub
KB0823218

Configure REST Step in Integration Hub


11053 Views Last updated : Jan 3, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Summary

This article explains how to configure REST Step in Integration Hub.

In this example outbound REST call is made from one ServiceNow instance to another ServiceNow instance.

Release

  1. Install Integration Hub Plugin
  2. Connection & Credential Aliases -> New -> Type is 'Credential'
  3.  Open the created 'Connection & Credential Aliases ' from step above -> Credentials -> New  -> Basic Auth Credentials (or any other credentials type that your end point is configured with)
  4. Flow Designer -> Designer -> Actions -> New -> Action -> Give a Name and save
  5. Click on '+' sign under Inputs ->Select Step to Add -> Integrations -> REST
  6.   Connection -> Define Inline Connection
  7. Connection Alias -> select the one cerated from step 2
  8. Base URL -> https://<instance_name>.service-now.com
  9. Resource Path -> /api/now/table/incident
  10. HTTP Method -> POST
  11. Headers -> Accept : application/json
  12.  Request Content -> Request Type -> Text ->  {"short_description":"From REST step","description":"From REST step"}
  13. If you want to add a "Script step" to parse the response below are the steps
  14. Click on "+" -> Script
  15. Input variables -> Create Variable
  16.  Configure as per the attached screenshot
  17. Script
  18. (function execute(inputs, outputs) {

    var responseBody = JSON.parse(inputs.response);

    if(inputs.status!=201){

    var errorMsg = responseBody.error.message;

    var errorDetail = responseBody.error.detail;

    throw "Error retrieving incident. Message: "+errorMsg + " Details:"+errorDetail;

    }

    else {

    var result_field = responseBody;

    outputs.short_description = result_field.result.short_description;

    outputs.number = result_field.result.number;

    }

    // ... code ...

    })(inputs, outputs);
  19.  The above script with parse the response and store the response values ( in this case short_description and number ) in output variables.
  20. If you want to store parsed response in Output Variables you can create 'Output Variables' as shown below
  21. "Save" the action and "Test" to check if you get successful response.

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.