...
Step 1 - Register in ServiceNow
Goto System OAuth → Application Register
Click New
Fill in the details needed to update ServiceNow data. (our example uses Global scope)
Enter the Redirect URL, this is the URL that is the Callback URL specified on the OAuth Authentication in iHUB.
In our example, we generated a Client Secret
Step 2 - Create Authentication in iHUB
In iHUB create a new OAuth 2 authentication
Use the Client ID and Client Secret from the ServiceNow registration in Step 1.
Add the instance URL with the following path param.
<instance-url>/oauth_auth.do
<instance-url>/oauth_token.do
...
Step 3 - Authorize the apps to talk to each other
Click Authorize when all data is entered.
Do the OAuth dance, where you will be redirected to a consent form, click Allow.
Step 4 - Create iHUB REST Action to call ServiceNow
Create a new Action in iHUB
Select POST method and enter the URL <instance-url>/api/now/v1/table/incident
Content-Type: application/json
Body
Code Block {"short_description":"{{issue.summary}}", "comments":"{{issue.description}}"}
Click Triggers and select the event, cron or leave blank if you plan to use Post Function.
In this example, we will use Issue Create Event
...
...
Step 5 - Test our integration and view result
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.
...
Step 6 - View result in ServiceNow
Goto Incidents in ServiceNow
Search for the INC number that the log displayed.
...
Click to view the Incident
...
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.
...
Click Create
Select Action and enter a name
Select Template Category: Jira Core Server
Select Template: Edit Issue
Click Create
In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)
In the body section paste the code in below and change the customfield id to match your field.
Code Block | ||
---|---|---|
| ||
{ "fields":{"customfield_10201":"{{result.sys_id}}"} } |
...