Set up a bi-directional webhook for the Jira spoke
Configure a webhook to subscribe to Jira with a ServiceNow callback URL.
Before you begin
- Request an Integration Hub subscription
- Activate the Jira spoke
- Role required: admin
Create a token
Create a token to embed in the Jira webhook URL.
Before you begin
Role required: admin
Procedure
In the navigation filter, enter
token_verification.list.The system displays records in the Token Verifications table.
Click New.
On the form, fill the fields.
Field Description Name Unique name to identify the token. For example, Jira token.Description Description of the token. Token Authentication token. This token is used to authenticate incoming webhook requests.
Result
The token created is used to authenticate incoming webhook requests.
Register a Jira webhook in ServiceNow
Register a Jira webhook in ServiceNow to notify the ServiceNow app when certain events occur in Jira.
Before you begin
Role required: admin
Procedure
Navigate to All > Jira Webhooks > Jira Webhook Registries.
Click New.
On the form, fill in the fields.
Field Description Name Unique name to identify the record. For example, Jira webhook.Description Description of the record. Token Authentication token. This token is used to authenticate incoming webhook requests. Path Jira webhook path. By default, this path is set to api/sn_jira_spoke/jira_webhook_callbacks/wh_entry.Right-click the form header and click Save.
Choose how you want to authenticate callback requests and select one of the either options.
Callback URL Type Description Token-based Callback URL Uses a static token in the URL for simple authentication. HMAC-based Callback URL Uses Hash-based Message Authentication Code (HMAC) for enhanced security and tamper-proof authentication. The system displays either the token‑based callback URL or the HMAC‑based callback URL based on your selection.
Copy and record the webhook callback URL.
Result
The Jira webhook is registered in your ServiceNow instance.
Add a callback URL in Jira
Provide a webhook callback URL in yourJira Atlassian account to create a webhook.
Before you begin
Role required: admin
Procedure
Log in to your Jira Atlassian account.
Create a webhook in your Atlassian account.
Enter the webhook callback URL in the URL field.
See the Atlassian Developer portal documentation for instructions on creating a webhook.
Note: If you select an HMAC-based callback URL while registering a webhook, enter the secret token created from your ServiceNow instance in the webhook’s Secret field.
Jira spoke webhook creation in Jira portal.
- Select the related events that should trigger the webhook.
Result
The callback URL is added in your Jira Atlassian account. You can create routing policies and subflows as per your requirement. See Customize a bi-directional webhook for information regarding the creation of new routing policies and subflows.
Customize a bi-directional webhook
Create a webhook routing policy and subflow as per your requirement.
Before you begin
Role required: admin
About this task
The default routing policy in the Jira WebHook Routing Policies module triggers the Process Jira Webhooks subflow and notifies the ServiceNow app when certain events occur in Jira. See Jira Spoke for information about the fields that the default routing policy and subflows support. To use any other fields in your custom subflow and customize conditions in the routing policy, perform these steps.
Procedure
Navigate to All > Flow Designer > Designer.
Click Subflows.
Create a copy of the default subflow, Process Jira Webhooks.
Customize the subflow as per your requirement and publish it. See Building subflows for more information about creating and using subflows and Jira Spoke for information about the fields that the default routing policy and subflows support.
Navigate to Jira Webhooks > Jira WebHook Routing Policies.
Click New.
On the form, fill in the fields.
| Field | Description |
|---|---|
| Label | Unique label to identify the routing policy. |
| Default answer | Option to specify if this is the default answer. The default answer is applicable when the conditions are not met.1. Click the lookup icon ( Image omitted: lookup-icon.png 2. Select the required subflow from the Document list. Lookup icon). Note: Ensure that the Table name is |
| Condition | Conditions to be met when the required events occur in Jira. See Jira webhooks for information about the supported fields. |
| Answer | Subflow that must be triggered when the specified conditions are met. |
Click Submit.
Note: These routing policies are saved in the Decision tables. Users are cautioned against directly updating or modifying data in these tables.
Result
The routing policy and subflow are created.