Custom fields in Jira are recommended to fill in all details
To make this integration work flawlessly, the custom fields incident_id and BU_incident_url are recommended. You can find more details in Create an incident to Uptime from Jira.
Go to the Jira Dashboard → Project Settings → Automation
If you'd like to apply this to all your projects, switch to the Global administration and apply the following to the Global rules
Click on Create rule
Select the Incoming webhook trigger and choose the No issues from the webhook in the Execute this automation rule with:* section. We'll get to the URL later.
Another step is to add the THEN: add an action and look for Create issue action.
Here, fill in the Project you'd like the rule to apply for and Issue type Jira should create a ticket for when webhook is triggered, and also specify what Priority the ticket should be created with.
Customize your own Jira ticket content
From now on, we'll be taking advantage of the Smart values for Jira automation triggers*, which enable us to easily fetch the Webhook's data and relay them accordingly.
Now, we can also fill in the Summary. For example: {{webhookData.id}} - {{webhookData.attributes.name}} representing the Uptime Incident ID and a name of the incident.
The Descriptioncan also be pretty much customized, as well as adding more details to your ticket, like incident_id or BU_incident_url to be a part of the pre-filled fields you can further work within Jira. You can select the Choose fields to set and then select the fields you'd like to fill in with the Webhook's data. An example could be:
Copied!
A new Incident from Uptime has been created!
Team: {{webhookData.attributes.team_name}}
Incident ID: {{webhookData.id}}
Incident URL: {{webhookData.attributes.url}}
Name: {{webhookData.attributes.name}}
HTTP Method: {{webhookData.attributes.http_method}}
What's happened?
Cause: {{webhookData.attributes.cause}}
Regions: {{webhookData.attributes.regions}}
Response URL: {{webhookData.attributes.response_url}}
Screenshot: {{webhookData.attributes.screenshot_url}}
Started at: {{webhookData.attributes.started_at}}
Status: {{webhookData.attributes.status}}
2. Setting up Outgoing Webhook from Uptime
Now it's time to also configure the Webhook by going to the Integrations → APIs → Configure webhooks → Incident webhook → Add
Give your webhook a name and then Copy&Paste the URL from the Jira automation rule's Webhook URL (in a form of https://automation.atlassian.com/pro/hooks/{{webhook_id}}).
In the Advanced settings, keep the HTTP method to POST and include the Headers Content-Type: application/json.
According to what you require in the Jira's description, adjust the Request body template. For example: