Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Short guide for integrating Jira Cloud With ServiceNow using iHub Cloud

Create App in ServiceNow

Decide on authentication type, select OAuth2 or JWT.

 OAuth 2 steps
  1. Click All

  2. Type OAuth

  3. Select Application Registry

  4. Click New button

  5. Select “Create an OAuth API endpoint for external clients”

  6. Enter a good name and click Submit


JWT

Setup Credentials in iHub Cloud

OAuth2

  1. Navigate to Credentials

  2. Click Add Credentials

  3. Select OAuth2

  4. Click Save

  5. Select Grant type: Resource Owner Password Credentials Grant

  6. Enter the following fields;

    1.  Authorization Url: <instance-url>/oauth_auth.do

    2.  Username: the integration user

    3. Password: the integration password

    4. Client Id: from Create App in ServiceNow step

    5. Client Secret: from Create App in ServiceNow step

    6. Scope: leave blank

  7. Click Save

Copy the callback URL on the credentials page and go back to the ServiceNow app and paste in the callback and save that.

  1. Click “Click here to Authorize” button

Send Issue data to ServiceNow from Jira Cloud

Create a Incident

  1. Create a new Integration

  2. Set a trigger like Issue Created and provide a simple JQL

  3. Create an Action

  4. Select POST as method

  5. Enter url to your instance example https://dev262540.service-now.com/api/now/v1/table/incident

  6. Select the Authentication created in the above step

  7. Enter the Body

    {
      "short_description": "{{issue.summary}}",
      "description": "{{{toJSON issue.fields.description}}",
      "urgency": 2
    }

Upload attachments to Incident

  1. Create an Action

  2. Select the create incident as parent

  3. Select POST as method

  4. Enter url to your instance example https://dev262540.service-now.com/api/now/attachment/upload

  5. Select the Authentication created in the above step

  6. Click Condition, this to prevent this action to be triggered if there is no attachment added

  7. Define the Condition. Fill in the following details:

    • JSON Path: Enter $.attachments.all.length

    • Operand: Select "Greater than"

    • Value: 0

  8. Enter the Body

    {
        "table_sys_id":"{{result.sys_id}}",
        "table_name":"Incident",
        "file":"{{attachments.all}}"
    }
  • No labels