Salto for
Jira
Articles
SHARE
Patrick Li
August 1, 2024
10
min read
In recent blog posts, we have looked at REST API, webhook, and Jira automation, tools that can help integrate and automate processes between different applications and systems. One popular integration is between Jira and ServiceNow. Many organizations have made investments in both tools. Support teams often live in ServiceNow, while the engineering teams live in Jira. Integrating the two systems is often desirable to improve inter-departmental collaboration and reduce double data entry.
In this blog, we will explore how you can build such an integration using the tools mentioned earlier without writing a single line of code. We will look at two integration points:
Since we will be using ServiceNow’s REST API, we will need to have a way to authenticate our requests to these APIs. ServiceNow provides several authentication mechanisms to use its REST API, such as Basic authentication with username and password, using an API Key, and more. In this integration, we will be using the API Key option, as it offers two distinct advantages:
1. No username and password would be exposed.
2. It is relatively easier to implement.
The API we will be using is the Table API.
You must enable the API Key in ServiceNow to use it. The first step is to set up a new authentication profile.
The next step is to create a new REST API Access Policy.
You can simplify this by combining both policies into a single policy and applying it to ALL methods (including both POST and PUT). The main key here is to add our API Key Profile created from the previous step to these policies:
Now, with all the authentication and access policies set up, we can generate the API key we can use to make authenticated REST API calls:
Once the API key is created, you can click on it and then the Lock icon to reveal the actual token. Copy the token and save it for future use.
Now that we have our API Key for ServiceNow, we can start configuring our automation rules in Jira to make API calls to ServiceNow. But before we do that, make sure you add two new simple text custom fields to Jira, as we will be using them to store references to ServiceNow incidents we create:
You can name them whatever you like but do make sure to make the appropriate adjustments in later steps when these fields are referenced.
The first automation rule we will add is to allow us to manually create a ServiceNow incident from a Jira issue:
We are using Jira’s smart value feature, so when the automation rule runs, it will send the current issue’s summary and description value.
6. Once we have called the REST API, we want to wait for a response and update our Jira issue to store the ID for the ServiceNow request. Select and add the “Edit issue” action to our rule.
With our first automation rule in place, you should see it appear in the “Actions” menu. Clicking on that will trigger our rule, and a new ServiceNow incident will be created based on the data from Jira, such as the Summary and Description fields. You should also see the “ServiceNow Number” and “ServiceNow Sys ID” fields getting populated with data from the response of our API call.
Now that we have created a ServiceNow incident from our Jira issue and have a reference ID for the incident in the ServiceNow Sys ID field, we can expand on this integration by adding automated processes, such as updating the incident whenever the issue is edited.
We are again using Jira’s smart value feature to retrieve the value in the ServiceNow Sys ID field for the current issue and add it to the REST API URL so we can update the correct incident.
With the second automation rule in place, whenever we update a Jira issue, the referenced ServiceNow incident will be automatically updated as well.
Summary
We have looked at how to build an integration using REST API, automation, and Jira’s smart value features. Our current integration lets users manually sync a Jira issue and turn it into an incident in ServiceNow. Once synced, we can keep them synced with the Issue edited trigger.
We can easily expand on this by changing the manual trigger so the initial sync can also be automated. We can also sync comments over to ServiceNow by creating a new automation and using the Issue commented trigger. As we can see, the possibilities are limitless.
Salto for
Jira
Jira
SHARE
Patrick Li
August 1, 2024
10
min read
In recent blog posts, we have looked at REST API, webhook, and Jira automation, tools that can help integrate and automate processes between different applications and systems. One popular integration is between Jira and ServiceNow. Many organizations have made investments in both tools. Support teams often live in ServiceNow, while the engineering teams live in Jira. Integrating the two systems is often desirable to improve inter-departmental collaboration and reduce double data entry.
In this blog, we will explore how you can build such an integration using the tools mentioned earlier without writing a single line of code. We will look at two integration points:
Since we will be using ServiceNow’s REST API, we will need to have a way to authenticate our requests to these APIs. ServiceNow provides several authentication mechanisms to use its REST API, such as Basic authentication with username and password, using an API Key, and more. In this integration, we will be using the API Key option, as it offers two distinct advantages:
1. No username and password would be exposed.
2. It is relatively easier to implement.
The API we will be using is the Table API.
You must enable the API Key in ServiceNow to use it. The first step is to set up a new authentication profile.
The next step is to create a new REST API Access Policy.
You can simplify this by combining both policies into a single policy and applying it to ALL methods (including both POST and PUT). The main key here is to add our API Key Profile created from the previous step to these policies:
Now, with all the authentication and access policies set up, we can generate the API key we can use to make authenticated REST API calls:
Once the API key is created, you can click on it and then the Lock icon to reveal the actual token. Copy the token and save it for future use.
Now that we have our API Key for ServiceNow, we can start configuring our automation rules in Jira to make API calls to ServiceNow. But before we do that, make sure you add two new simple text custom fields to Jira, as we will be using them to store references to ServiceNow incidents we create:
You can name them whatever you like but do make sure to make the appropriate adjustments in later steps when these fields are referenced.
The first automation rule we will add is to allow us to manually create a ServiceNow incident from a Jira issue:
We are using Jira’s smart value feature, so when the automation rule runs, it will send the current issue’s summary and description value.
6. Once we have called the REST API, we want to wait for a response and update our Jira issue to store the ID for the ServiceNow request. Select and add the “Edit issue” action to our rule.
With our first automation rule in place, you should see it appear in the “Actions” menu. Clicking on that will trigger our rule, and a new ServiceNow incident will be created based on the data from Jira, such as the Summary and Description fields. You should also see the “ServiceNow Number” and “ServiceNow Sys ID” fields getting populated with data from the response of our API call.
Now that we have created a ServiceNow incident from our Jira issue and have a reference ID for the incident in the ServiceNow Sys ID field, we can expand on this integration by adding automated processes, such as updating the incident whenever the issue is edited.
We are again using Jira’s smart value feature to retrieve the value in the ServiceNow Sys ID field for the current issue and add it to the REST API URL so we can update the correct incident.
With the second automation rule in place, whenever we update a Jira issue, the referenced ServiceNow incident will be automatically updated as well.
Summary
We have looked at how to build an integration using REST API, automation, and Jira’s smart value features. Our current integration lets users manually sync a Jira issue and turn it into an incident in ServiceNow. Once synced, we can keep them synced with the Issue edited trigger.
We can easily expand on this by changing the manual trigger so the initial sync can also be automated. We can also sync comments over to ServiceNow by creating a new automation and using the Issue commented trigger. As we can see, the possibilities are limitless.