Update Message or Description of the Alert automatically in Opsgenie when the same is updated on the Jira ticket
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This article will provide you with a solution to automatically update the summary or description of an alert in Opsgenie when these fields are updated in the Jira work item.
The solution applies to Opsgenie integrated with Jira using:
Solution
Expected behavior
The information between the summary and description fields is not synchronized by default. This is expected behavior, as it is not part of the integration between Opsgenie and Jira cloud/Jira Service Management cloud.
Use automation to sync information
Use automation to You can follow the approach mentioned below to configure the Automation rule in Jira to update the Alert message or description in Opsgenie.
Create an API Key in Opsgenie for Authorization purposes.
Navigate to Settings → API key management.
Click on Add new API key
Add a Name > Select the following option for Access rights:
- Read - Create and update.
Click on Add API key and copy it.
Create an Automation Rule in Jira.
Open the project that you have chosen while adding the Jira Service Management/Jira Software integration in Opsgenie.
Navigate to Project Settings → Automation → Create Rule.
Trigger: Select the Field Value Changed action.
Fields to monitor for: Summary and Description
Change type:Any changes to the field value
For: Edit issue, Transition issue, and Assign issue
Add a Condition: IF/ELSE block - select smart value condition.
First value:
{{fieldChange.fieldID}}
Condition: Equals
Second value: Summary
Inside the IF branch, add an Action: Send web Request action.
Paste the below values accordingly:
Web Request URL:
https://api.opsgenie.com/v2/alerts/{{issue.key}}/message?identifierType=alias
Headers: Authorization: GenieKey <API Key from Step 1.d above> Content-Type: application/json HTTP method: PUT Web request body: Custom data Custom data:{ "message":"{{issue.summary}}" }
Click Next.
Add Else and repeat steps 2 (add a condition in the new ELSE branch) and 3 (in the new branch, add a Send web request action) for the Description field.
The complete rule should look as follows:

You can import this automation rule into your cloud site using the JSON snippet below. Copy the code and save it in a .json file using a text editor. Once imported, update it to use your API key from step 1.d above and save it.
update Alert message and description in Opsgenie.json
{"cloud":true,"rules":[{"id":18044498,"clientKey":"ad17720c-bb93-3576-ad85-64ffac1c57a8","name":"update Alert message and description in Opsgenie","state":"ENABLED","description":"","authorAccountId":"5fab9d519494af006e079d19","actor":{"type":"ACCOUNT_ID","value":"557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"},"created":1709030159470,"updated":1709034461635,"trigger":{"id":"407858433","component":"TRIGGER","parentId":null,"conditionParentId":null,"schemaVersion":2,"type":"jira.issue.field.changed","value":{"changeType":"ANY_CHANGE","fields":[{"value":"summary","type":"field"},{"value":"description","type":"field"}],"actions":["edit","transition","assign"]},"children":[],"conditions":[],"connectionId":null},"components":[{"id":"407858434","component":"CONDITION","parentId":null,"conditionParentId":null,"schemaVersion":1,"type":"jira.condition.container.block","value":null,"children":[{"id":"407858435","component":"CONDITION_BLOCK","parentId":"407858434","conditionParentId":null,"schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"407858437","component":"ACTION","parentId":"407858435","conditionParentId":null,"schemaVersion":1,"type":"jira.issue.outgoing.webhook","value":{"url":"https://api.opsgenie.com/v2/alerts/{{issue.key}}/message?identifierType=alias","headers":[{"id":"_header_1709028437056","name":"Authorization","value":"GenieKey 197c3425-f486-4917-a5ab-4b84be336447","headerSecure":false},{"id":"_header_1709028475651","name":"Content-Type","value":"application/json","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n\"message\":\"{{issue.summary}}\"\n}","method":"PUT","responseEnabled":false,"continueOnErrorEnabled":false},"children":[],"conditions":[],"connectionId":null}],"conditions":[{"id":"407858436","component":"CONDITION","parentId":null,"conditionParentId":"407858435","schemaVersion":1,"type":"jira.comparator.condition","value":{"first":"{{fieldChange.fieldID}}","second":"summary","operator":"EQUALS"},"children":[],"conditions":[],"connectionId":null}],"connectionId":null},{"id":"407858438","component":"CONDITION_BLOCK","parentId":"407858434","conditionParentId":null,"schemaVersion":1,"type":"jira.condition.if.block","value":{"conditionMatchType":"ALL"},"children":[{"id":"407858440","component":"ACTION","parentId":"407858438","conditionParentId":null,"schemaVersion":1,"type":"jira.issue.outgoing.webhook","value":{"url":"https://api.opsgenie.com/v2/alerts/{{issue.key}}/description?identifierType=alias","headers":[{"id":"_header_1709028437056","name":"Authorization","value":"GenieKey 197c3425-f486-4917-a5ab-4b84be336447","headerSecure":false},{"id":"_header_1709028475651","name":"Content-Type","value":"application/json","headerSecure":false}],"sendIssue":false,"contentType":"custom","customBody":"{\n \"description\":\"{{issue.description}}\"\n}","method":"PUT","responseEnabled":false,"continueOnErrorEnabled":false},"children":[],"conditions":[],"connectionId":null}],"conditions":[{"id":"407858439","component":"CONDITION","parentId":null,"conditionParentId":"407858438","schemaVersion":1,"type":"jira.comparator.condition","value":{"first":"{{fieldChange.fieldID}}","second":"description","operator":"EQUALS"},"children":[],"conditions":[],"connectionId":null}],"connectionId":null}],"conditions":[],"connectionId":null}],"canOtherRuleTrigger":false,"notifyOnError":"FIRSTERROR","projects":[],"labels":[],"tags":[{"id":57737536,"tagType":"IS_RULE_UPDATED","tagValue":"true"}],"ruleScope":{"resources":["ari:cloud:jira:f61a7458-e4b6-4cd5-8864-59121ebe0213:project/10031"]},"ruleHome":{"ruleLifecycleHome":{"locationARI":"ari:cloud:jira:f61a7458-e4b6-4cd5-8864-59121ebe0213:project/10031"},"ruleBillingHome":{"locationARI":"ari:cloud:jira-servicedesk::site/f61a7458-e4b6-4cd5-8864-59121ebe0213"}},"writeAccessType":"UNRESTRICTED","collaborators":[],"billingType":"NORMAL"}]}
Related content
Was this helpful?