Last updated Nov 21, 2024

Automation webhooks

Apps and applications can react to conditions/events in Jira Service Management via automation rules. An automation rule triggers an action when an event occurs or a condition is reached. This page describes how to configure an automation rule to fire a webhook that notifies your app or application. For example, you might use a webhook to alert your remote application when an SLA is about to be breached.

Alternatively, if you want an automation rule to directly trigger an action in a remote system, you can implement an "automation action" (i.e. a custom THEN action). For details, see Guide - Implementing automation actions.

Overview

In addition to webhooks in Jira platform, the automation engine of Jira Service Management can trigger webhooks as part of configured automation rules.

When you configure a rule, you can specify WHENs and IFs, then use the webhook to define your action.

Adding a webhook to an automation rule

  1. Navigate to Project settings > Automation > Legacy automation, then create a Custom rule or edit an existing rule.
  2. Configure the WHEN and IF settings as desired, then add a THEN action and choose Webhook. Screenshot of rule edition
  3. Configure the webhook settings, name your rule, and save it.

Webhook settings

  • URL -- In Jira Service Management Cloud, use port 80 for "http://" URLs and port 443 for "https://" URLs.

  • Include payload -- If you choose the Include payload in request body option, a JSON object containing the action details is attached to the request body.

The JSON payload of the request will contain the following fields:

  • timestamp
    • Time the webhook payload was created in milliseconds.
  • issue
    • The Jira representation of the issue. This is the same shape returned by the Jira REST API.
  • comment
    • The Jira representation of the comment (if it is available). This is the same shape returned by the Jira REST API.
  • user
    • The Jira representation of the user (if it is available). This is the same shape returned by the Jira REST API.
  • action
    • Contains details about the action that was triggered. This includes the action configuration that was saved previously.

The information in the payload is generated by the user who runs the automation rule. This user can be configured as the Project Default or the user who triggers the rule. If the user does not have permission to see some fields, then those values do not render. See Automating Your Service Desk for more info.

Webhook execution

  • Request method -- When a webhook THEN action triggers, Jira fires an HTTP POST request to the URL you configured.
  • Success criteria and timeout -- A webhook HTTP POST request is considered successful if the server returns a response with status code range 200 (inclusive) to 300 (exclusive). Jira Service Management waits 5 seconds to establish a TCP connection with the webhook server, and 20 seconds for a response after connection is established. If the webhook request fails, Jira Service Management does not retry the connection.
  • Asynchronous webhook execution -- The webhook THEN action is executed asynchronously. If many executions are triggered in a short period of time, they are queued and executed one at a time without blocking the other automation rules you have in Jira Service Management.

Rate this page: