Skip to content

Jira Webhook Walkthrough

Use case: When a task fails for a specific batch pipeline in a journey, Observability opens a detailed ticket for you in Jira.

Step 1: Set up a Jira Automation

Start by setting up a Jira Automation. Complete details can be found in Jira automation basics.

  1. In your Jira project Settings, create a new rule.
  2. For the New trigger, select Incoming webhook.
  3. Copy and save the Webhook URL that's shown. You'll need this later.

    The URL will look something like this: https://automation.atlassian.com/pXX/hXXX/EXAMPLE

  4. As the Execute this automation rule with option, select No issues from the webhook.

  5. Create a New action for the rule, and choose Create issue from the list.
  6. In the Create issue step, select your Project and Issue type.

    We recommend the Issue type reflects the severity of the Observability alert. For this walkthrough, select Bug.

  7. Enter the following for the issue Summary: {{webhookData.summary}}

  8. Enter the following for the issue Description: {{webhookData.description}}
  9. Save your rule, give it a name, and turn it on!

Step 2: Set up your Observability rule

When you have your personalized Jira webhook URL, log into Observability, select your project, and open the Journeys page.

  1. Select the journey you want to define the rule for, then select the Rules tab.
  2. Click Add Rule.
  3. Use the drop-downs to fill in the rule predicate: When task status is Failed for
  4. Click Add Action and select Web Request.
  5. Fill in the Send Web Request fields.

    1. Select POST as the Method.
    2. URL is the URL you copied in Step 1 above.

      For example: https://automation.atlassian.com/pXX/hXXX/EXAMPLE

    3. Use the following Payload:

      {
       "data": {
        "description": "Project: {project.name}\nPipeline: {pipeline.name}\nRun: {run.key}\nTask: {task.name}\nStatus {run_task.status}\n\nLink: https://{company.ui_url}/projects/{project.id}/runs/{run.id}",
        "summary": "Failure in task {task.name}"
       }
      }
      
    4. Jira does not require headers for completing this automation, so leave this field blank.

  6. Click Save.

Now a bug ticket will open in Jira if a task in this batch pipeline fails. Plus, the ticket will include relevant details, including a link back to Observability, so you can solve the problem faster.