Skip to content
Chapter 04Jira integration

Connect Jira so incidents flow in automatically

This is the bridge that makes everything else work. Set it up once and every critical Jira issue becomes a Comtinel incident — routed and paged — without anyone lifting a finger.

8 min read

Comtinel listens for two things from Jira: a critical issue being created (open an incident and page someone) and that issue being closed (resolve the incident). You wire each one up with a Jira Automation rule that sends a web request to your Comtinel webhook. No plugins, no Jira marketplace app — just two rules.

Who does this step
You need permission to create Automation rules in your Jira project (usually a Jira admin or project admin). Everything you paste in comes straight from Comtinel's Jira integration page.

First, grab your connection details

In Comtinel, open System → Jira integration. Two values matter — copy them now:

Webhook URL (copy your exact URL from the integration page)https://comtinel.com/webhooks/jira/YOUR_WORKSPACE_ID

And the shared secret, which goes into the Authorization header of every request. It's stored securely and validated on each call — treat it like a password and never put it in a public place.

comtinel.com/jira-integration
Connection statusConnected
Webhook endpoint URLhttps://comtinel.com/webhooks/jira/YOUR_WORKSPACE_ID
Illustrative example · Sample data
The Jira integration page gives you a copyable webhook URL and a connection status.
Rule 1 of 2

Open an incident when a Sev 1 issue is created

This rule creates a Comtinel incident the moment a critical issue is opened in Jira.

  1. 1

    In Jira, create a new Automation rule

    Go to Project settings → Automation → Create rule.

  2. 2

    Trigger: Work item created

    Choose Work item created (called “Issue created” in some Jira versions).

  3. 3

    Condition: Issue Type equals Severity 1 - Incident

    Add a condition so the rule only fires for your most critical type: Issue Type = Severity 1 - Incident.

  4. 4

    Action: Send web request

    Add a Send web request action. Set the method to POST, paste your webhook URL, and add these headers (replace the secret with yours):

    Request headers
    Content-Type: application/json
    Authorization: Bearer <your-webhook-secret>
    X-Source: jira-automation

    Set the body type to Custom data and paste this payload — change "tenant": "acme" to your own workspace ID:

    Body — work_item_created
    {
      "source": "jira",
      "eventType": "work_item_created",
      "tenant": "acme",
      "projectKey": "{{issue.project.key}}",
      "issueKey": "{{issue.key}}",
      "issueId": "{{issue.id}}",
      "issueType": "{{issue.issueType.name}}",
      "priority": "{{issue.priority.name}}",
      "summary": "{{issue.summary}}",
      "description": "{{issue.description.jsonEncode}}",
      "labels": "{{issue.labels}}",
      "url": "{{issue.url}}"
    }
  5. 5

    Turn the rule on

    Save and enable it. From now on, every new Sev 1 issue opens a Comtinel incident.

Keep .jsonEncode on the description only
Use {{issue.description.jsonEncode}} exactly as shown. Descriptions are often multi-line and will break the JSON if they aren't encoded — but don't add it to the other fields.
Rule 2 of 2

Close the incident when the Jira issue is resolved

This rule keeps Comtinel in sync: when the issue is resolved in Jira, the incident closes too.

  1. 1

    Create a second Automation rule

    Same place: Automation → Create rule.

  2. 2

    Trigger: Work item transitioned

    Choose Work item transitioned so the rule reacts to status changes.

  3. 3

    Conditions: Sev 1 and a closed status

    Add two conditions: Issue Type = Severity 1 - Incident, and status is one of Resolved or Done (add any other closed statuses you use).

  4. 4

    Action: Send web request (with the status field)

    Same URL and headers as Rule 1. The body is almost identical, but it must include the status field — without it, Comtinel ignores the event:

    Body — work_item_updated
    {
      "source": "jira",
      "eventType": "work_item_updated",
      "tenant": "acme",
      "projectKey": "{{issue.project.key}}",
      "issueKey": "{{issue.key}}",
      "issueId": "{{issue.id}}",
      "issueType": "{{issue.issueType.name}}",
      "priority": "{{issue.priority.name}}",
      "summary": "{{issue.summary}}",
      "status": "{{issue.status.name}}",
      "labels": "{{issue.labels}}",
      "url": "{{issue.url}}"
    }
  5. 5

    Turn it on

    Save and enable. A healthy request returns 202 Accepted.

Optional

Open Jira issues for your alerts and requests

Comtinel can also open an issue in your Jira for incidents and support requests from any integration — Prometheus, Grafana, Kibana, Couchbase, Elasticsearch, CloudWatch, support email, Microsoft Teams and Slack. Paging always comes first: the on-call is called exactly as before, and the Jira issue follows a moment later. Jira being slow or down never delays a page.

  1. 1

    Connect your Jira site once

    On System → Jira integration, fill in Jira connection for “Create Jira issue”: your https://<site>.atlassian.net address, the email of a dedicated Jira account and an API token. The account needs Browse projects and Create issues. Click Test connection.

  2. 2

    Add your Jira projects

    Under Jira projects, add every project issues may go to — for example AWS, BSHAWS and PIMAWS — with its issue type, an optional Jira priority per severity and values for required fields. Test project and fields checks them against Jira without creating anything.

  3. 3

    Choose the project per routing rule

    A routing rule can name a Jira project: alerts it routes open their issue there (for example one customer's alerts in BSHAWS). Rules without one use the integration's default project.

  4. 4

    Turn on automatic issues where you want them

    On an integration's page, under Jira issues, tick Create a Jira issue for every new incident (or task), pick the default project and, if you like, only some severities. Leave it off to open issues only when someone asks for one.

  5. 5

    Or open one by hand

    Every incident and support task has a Create Jira issue button with the project picker; the rule's or default project is preselected. One incident or task gets at most one issue, however often the button is pressed.

  6. 6

    Decide what a Jira close does

    Per integration: either only show that the issue was closed in Jira, or also resolve the incident and close the task.

Add labels to your Automation bodies
Both rule bodies above include "labels": "{{issue.labels}}". Comtinel tags its own issues with a comtinel-… label, so when your Automation sends such an issue back it is recognised and never opens a second incident. Rule 2 (closed status) must cover these projects for the close behaviour to work.
Keep labels on the create screen
If an issue type's create screen hides Labels, Comtinel cannot look up an issue whose creation was interrupted, so it reports the failure on the incident instead of risking a duplicate.

Test the connection

You don't have to wait for a real outage to know it works.

  1. 1

    Use the built-in test

    On Comtinel's Jira integration page, click Send test payload to check incident processing and routing. Then test from Jira itself to verify Automation, external access, and the webhook credential.

  2. 2

    Or create a real Sev 1 issue

    Open a Severity 1 - Incident issue in Jira and watch it appear in Incidents within a few seconds.

  3. 3

    Confirm the round trip

    Resolve that issue in Jira and confirm the Comtinel incident moves to resolved shortly after. That proves both rules.

Incidents are flowing in — but who gets paged, and when? That's the next two chapters: on-call schedules and routing & escalation.

Jira integration FAQ

Why only Severity 1 issues?

Comtinel pages humans, so it deliberately reacts only to your most critical issue type — 'Severity 1 - Incident'. Everything else stays in Jira. You control this with the condition on each Automation rule.

Where do I find the exact webhook URL and secret?

Open System → Jira integration inside Comtinel. It shows your exact webhook URL with a copy button. The Jira secret is shown once when generated; use it in the Authorization header of your Jira rules. Prometheus has a separate secret.

Why does the description use .jsonEncode?

Issue descriptions (especially from monitoring tools) are often multi-line, which would break the JSON payload. The .jsonEncode helper escapes them safely. Use it on the description field only.

Does a Jira issue Comtinel opened come back as a second incident?

No. Comtinel recognizes its own issues (by the comtinel-… label and its own record) when your Automation sends them back: one incident, one Jira issue. Retries and repeated webhooks are ignored.

What happens to paging when Jira is down?

Nothing changes: the on-call is paged first, always. The incident shows that its Jira issue could not be created, and Comtinel retries in the background; you can also use the Create Jira issue button later.

Which Jira project does an issue go to?

The project of the routing rule that matched the alert, otherwise the integration's default project. With the button you pick any project from your list.

What if an incident isn't routed to a team?

If no Jira routing rule matches, the incident is created but marked 'unrouted'. Add a rule with Intake source set to Jira and select the intended team and escalation policy. Prometheus rules do not match Jira issues.

Also using Prometheus?
Follow the Prometheus & Alertmanager integration guide. Both sources can use this workspace with separate credentials and routing rules, serving the same team or different teams.