Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step 1 - Register in ServiceNow

  1. Goto System OAuth → Application Register

  2. Click New

  3. Fill in the details needed to update ServiceNow data. (our example uses Global scope)

  4. Enter the Redirect URL, this is the URL that is the Callback URL specified on the OAuth Authentication in iHUB.

...

  1. Image Added
  2. In our example, we generated a Client Secret

Step 2 - Create Authentication in iHUB

  1. In iHUB create a new OAuth 2 authentication 

  2. Use the Client ID and Client Secret from the ServiceNow registration in Step 1.

  3. Add the instance URL with the following path param.

    1.  <instance-url>/oauth_auth.do

    2.  <instance-url>/oauth_token.do

...


...

Step 3 - Authorize the apps to talk to each other

  1. Click Authorize when all data is entered. 

  2. Do the OAuth dance, where you will be redirected to a consent form, click Allow.

Step 4 - Create iHUB REST Action to call ServiceNow

  1. Create a new Action in iHUB

  2. Select POST method and enter the URL <instance-url>/api/now/v1/table/incident

  3. Content-Type: application/json

  4. Body

    Code Block
    {"short_description":"{{issue.summary}}", "comments":"{{issue.description}}"}

...

  1. Image Added

  2. Click Triggers and select the event, cron or leave blank if you plan to use Post Function.

  3. In this example, we will use Issue Create Event

...



...


Step 5 - Test our integration and view result

  1. Test the integration by creating an issue in the project that the iHUB action is triggered by

...

On the issue, you can view the Integration result or view it from the Action Log.Image Removed

...


View result in iHUB Execution logImage Removed

...

Click View to see more details, such as the INC number.

Image Removed

...


Step 6 - View result in ServiceNow

  1. Goto Incidents in ServiceNow

  2. Search for the INC number that the log displayed.

...

Click to view the IncidentImage Removed

...

In our example we used the default encoding which is UTF-8, other encodings are supported as well.

...

When doing so the response from the parent will be passed down to the child and can be used for further actions, like this setting the INC number in a custom fields.Image Removed

...

  1. Click Create

  2. Select Action and enter a name

  3. Select Template Category: Jira Core Server

  4. Select Template: Edit Issue 

  5. Click Create

  6. In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)

  7. In the body section paste the code in below and change the customfield id to match your field.


Code Block
languagejs
{
    "fields":{"customfield_10201":"{{result.sys_id}}"}
}


The child action will automatically be triggered by its parent.