How to create an 'Approval completed' notification through Automation
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This article provides a step-by-step guide on how to create an automation rule that instantly notifies users whenever an issue's approval step is accepted or declined.
Environment
Jira Service Management cloud.
Solution
The solution is based on an automation rule triggered when an approval step is completed.
This means the rule will be executed when an approval step on an issue is accepted or declined.
For workflows with more than one approval step, rules with this trigger will be executed repeatedly after each step.
Building the Automation rule
In your Project, go to Project Settings > Automation and click Create rule.
Set the rule as:
Approval Completed trigger
Send Email action
To: All Customers involved
This will include Request Participants, Approvers, and members of the Organization. You can customize it as per your business needs.
Subject: Customize as required. The following text is used as an example:
1
Request {{issue.issuekey}} has been {{approval.decision}}
Content: Customize as required. The following text is used as an example:
1 2 3
Your request has been {{approval.decision}} by {{issue.Approvers.displayName}} <a href="{{issue.url.customer}}">View Request</a>
Save and Publish the rule
Here is what the rule will look like:
You can also import the following sample rule
NotifyOnApproval-KB-automation.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"cloud": true,
"rules": [
{
"id": 17465048,
"clientKey": "879629d9-c172-3e16-a203-d050c07481be",
"name": "KB - Notify on Approval",
"state": "DISABLED",
"description": "",
"authorAccountId": "",
"actor": {
"type": "ACCOUNT_ID",
"value": ""
},
"created": 1706170448464,
"updated": 1706717790900,
"trigger": {
"id": "392459425",
"component": "TRIGGER",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 1,
"type": "jira.approval.completed.trigger",
"value": {},
"children": [],
"conditions": [],
"connectionId": null
},
"components": [
{
"id": "392459426",
"component": "ACTION",
"parentId": null,
"conditionParentId": null,
"schemaVersion": 3,
"type": "jira.issue.outgoing.email",
"value": {
"fromName": "",
"replyTo": "",
"to": [
{
"type": "REFERENCE",
"value": "CUSTOMER_INVOLVED",
"additional": "CUSTOMER_INVOLVED"
}
],
"cc": [],
"bcc": [],
"subject": "Request {{issue.issuekey}} has been {{approval.decision}}",
"body": "Your request has been {{approval.decision}} by {{issue.Approvers.displayName}}\n\n<a href=\"{{issue.url.customer}}\">View Request</a>",
"mimeType": "text/html",
"convertLineBreaks": true
},
"children": [],
"conditions": [],
"connectionId": null
}
],
"canOtherRuleTrigger": false,
"notifyOnError": "FIRSTERROR",
"projects": [],
"labels": [],
"tags": [
{
"id": 55675053,
"tagType": "IS_RULE_UPDATED",
"tagValue": "true"
}
],
"ruleScope": {
"resources": [
"ari:cloud:jira:f35b2a78-2342-4e89-99a4-bb8cb1f8aecf:project/10003"
]
},
"ruleHome": {
"ruleLifecycleHome": {
"locationARI": "ari:cloud:jira:f35b2a78-2342-4e89-99a4-bb8cb1f8aecf:project/10003"
},
"ruleBillingHome": {
"locationARI": "ari:cloud:jira-servicedesk::site/f35b2a78-2342-4e89-99a4-bb8cb1f8aecf"
}
},
"writeAccessType": "UNRESTRICTED",
"collaborators": [],
"billingType": "NORMAL"
}
]
}
Reference article on how to import the above rule to your site - Import and export Jira automation rules
ℹ️ The rule is disabled so that it doesn't run automatically before the necessary changes to the regex that suit your needs and the required testing is done.
Next, It's important to select the right Project Scope after importing the new rule. Also, leave the Import rule owners unchecked.
Contact Atlassian support if you have any questions.
Was this helpful?