Why Integrate Jira with ServiceNow?

Teams using Jira and ServiceNow will collect and organize large amounts of data. Much of this data is useful to other teams. If two teams use these platforms separately, connecting them can benefit an organization.

Integrating the platforms allows you to share data automatically and precisely control how the data exchange occurs. Manual exchange of data between two systems will decrease.

Use Cases:

Integrate Project in ServiceNow and Jira.
View available Jira projects and boards in ServiceNow.
Perform a bulk import of records from Jira to ServiceNow.
Perform single record updates between Jira and ServiceNow.
Avoid duplicating record update entries in Jira and ServiceNow.
Plan, track, and update your tasks from a single application.

Methods used for Integration

ServiceNow Rest API: ServiceNow Outbound Rest API can be used to create issues and update issues in Jira. Scripted Rest API needs for Jira to ServiceNow communication.
ServiceNow Integration Hub: Jira Spoke can be used for managing issues, users, stories, and groups in Jira. Predefined sub-flows can be used for Jira to ServiceNow communication.

Method 1 – ServiceNow Rest API

Design Diagram:

1. ServiceNow to Jira Communication:

Need to create Rest Outbound messages for different endpoints, few examples are mentioned below.

Operation
URL
Method

Create Issue
https:// <Jira URL>/rest/api/3/issue
POST

Update Issue
https://<JiraURL>/rest/api/3/issue/{issueIdOrKey}
PUT

Get Issue
https://<JiraURL>/rest/api/3/issue/{issueIdOrKey}
GET

Delete Issue
https:// <Jira URL>/rest/api/3/issue/{issueIdOrKey}
DELETE

Navigate to: System Web Services > Outbound > Rest Message > Create New
Below is example of REST message for Creating issue in Jira.

2. Jira to ServiceNow communication:

Need to use Scripted Rest API to generate call-back URL, which can is used in Webhook creation in Jira.
Navigate to: System web service > Scripted Rest API > click New
Fill in details and submit.
In Related List > Resources > Create New, below is an example of the update issue in ServiceNow from Jira.

Method 2 – ServiceNow IntegrationHub and Jira Spoke

Design Diagram:

Need Jira Spoke in ServiceNow Instance.
Need Integration Hub Professional pack in ServiceNow Instance.
Flow Designer can be used for operations in Sprint Management, Project Management, Issue Management, etc.

Jira can be on-premise and Cloud, integration with ServiceNow will differ depending on the type.

ServiceNow and Jira Cloud Integration.
ServiceNow and Jira on Premise Integration.

1. ServiceNow to Jira Communication:

Install the Jira Spoke.
ServiceNow supports Basic Authentication to integrate with Jira.
Navigate to IntegrationHub > Credentials > Jira.
Provide User ID and Password of “Service Account” of Jira.
Navigate to IntegrationHub > Connection & Credential Aliases > Jira.
Name – any meaningful Name.
Credentials – Provide credentials created in step 3.
Connection URL – Jira Instance URL
Use Mid Server – True for Jira on Premise and False for Jira Cloud.
As Jira spoke installed, we can see many options performed in Jira from the ServiceNow Flow designer.
Below is an example of the creation of an issue in Jira form Flow Designer using spoke.

2. Jira to ServiceNow communication:

Jira to ServiceNow Integration will not change based on Jira type.
Webhooks are used for Jira to ServiceNow connection.
Navigate to Jira > Jira Webhook Registry.
Create a new record with the token, and click on “Callback URL” to get the webhook URL.

Create Webhook in Jira with the above Callback URL.
With trigger from Jira, in ServiceNow, we need to create a Routing Policy to trigger different Sub flow to perform a particular action.
Navigate to Jira > Jira Webhook Routing Policies. Create a new policy.
Label – Name of Policy
Condition – After satisfying the specified condition mentioned flow will trigger
Answer – Flow which needs to be triggered for action.

Below is an example of updating demand in ServiceNow from Jira issue fields.

Advantage of using Jira Spoke over Rest API

Predefined actions are available in Flow Designer to perform operations and communicate with Jira issues, users, etc.
The user-friendly language used to describe flows helps non-technical users to better understand.
Reusable actions in flow cut down development costs and save time.
Upgrade safe and reduces costs involved with ServiceNow platform replacing complex custom scripts.
Low code to no-code environment for integration.