Skip to content

Jira Automation Flow: Notify Deactivated User

This page documents a Jira Automation flow that emails a deactivated user when somebody assigns a work item to them. The flow fills the notification gap that opens up after a user's product-access groups have been removed by the User Management for Cloud deactivation workflow.

This flow sits at the end of the deactivation workflow described in Deactivating and Reactivating User. It assumes the stable deactivated_users group exists and is populated by the UCM Automated Task (or your IdP).

Purpose

When a Jira admin removes a user's license seat, Atlassian's built-in assignment notifications stop reaching that user. This flow fills the gap. Every time a work item is assigned to a user who is still a member of the stable deactivated_users group, Jira Automation sends a hand-styled HTML email that looks like a native Jira assignment notification - with a View work item button, an Assignee field change pill, and a footer. The deactivated user can ask for license restoration if they still need access.

Flow at a glance

Setting

Value

Scope

Global

Trigger

Work item assigned (no configuration)

Condition

Assignee is in group deactivated_users

Action

Send customized email (HTML content)

Actor

User who triggered the event

Edit permission

All admins

How to recreate this flow

Build the flow in your own Jira site so the same notification behaviour applies to any user you deactivate via UCM. Each step matches a section of the Jira Automation builder.

  1. Sign in to Jira as a site or org admin.

  2. Open Settings > System > Global automation (path: /jira/settings/automation).

  3. Click Create flow (labelled Create rule on some Atlassian builds).

  4. Trigger: pick Work item assigned. Save. The trigger needs no configuration.

  5. Add a User condition with:

    • User: Assignee

    • Check to perform: is in group or team

    • Criteria: select the stable group you use for deactivated users (e.g. deactivated_users). This group must exist and must be populated by the UCM Automated Task that runs at deactivation time, or by your IdP.

  6. Add a Send email action (also labelled Send customized email). On the Settings tab:

    • Email name: anything internal, for example Assignee notification for deactivated users

    • Recipient(s): Assignee (user field). Tick Send messages separately to each recipient.

    • From: leave on the default jira@<instance>.atlassian.net

    • Subject: [JIRA] {{initiator.displayName}} assigned {{issue.key}} to you

  7. Switch to the Content tab and set Content format = HTML. Paste the HTML template from the next section. Leave Convert line breaks to HTML line breaks unchecked.

  8. Open Flow details and confirm:

    • Scope: Global (or pick a project / multi-project scope if you only want it for some projects).

    • Owner: a real human (failures send mail here).

    • Actor: User who triggered the event.

    • Who can edit this flow: All admins.

  9. Click Save, then Turn on flow.

  10. Smoke test: assign a Jira issue to a user in deactivated_users and check the rule's Audit log tab for a Success entry.

HTML email template

Paste this template into the Send Email action's Content field with Content format = HTML. The template is self-contained: no external image assets are required. The Jira logo renders as styled text and the avatar is the assigner's first initial in a coloured square.

  1. <!DOCTYPE html>
  2. <html>
  3. <body style="margin:0;padding:0;background-color:#f4f5f7;">
  4. <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#f4f5f7;padding:20px 0;">
  5. <tr>
  6. <td align="center">
  7. <table width="600" cellpadding="0" cellspacing="0" border="0" style="background-color:#ffffff;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;">
  8. <!-- Header -->
  9. <tr>
  10. <td style="padding:20px 30px 10px 30px;font-size:14px;color:#172b4d;">
  11. <strong>{{initiator.displayName}}</strong> <b>assigned</b> this work item to you
  12. </td>
  13. </tr>
  14. <!-- Divider -->
  15. <tr>
  16. <td style="padding:0 30px;">
  17. <hr style="border:none;border-top:1px solid #dfe1e6;margin:10px 0;">
  18. </td>
  19. </tr>
  20. <!-- Project and Issue Key -->
  21. <tr>
  22. <td style="padding:10px 30px;">
  23. <div style="font-size:14px;color:#44546F;margin-bottom:8px;">
  24. <a href="{{issue.baseUrl}}/jira/software/projects/{{triggerIssue.project.key}}/{{triggerIssue.project.id}}" style="color:#44546F;text-decoration:none;font-weight:500;">
  25. {{issue.project.name}}
  26. </a>
  27. <span style="color:#6b778c;margin:0 5px;">/</span>
  28. <a href="{{issue.url}}" style="color:#44546F;text-decoration:none;">
  29. {{issue.key}}
  30. </a>
  31. </div>
  32. <!-- Issue Title -->
  33. <div style="margin-top:8px;">
  34. <a href="{{issue.url}}" style="color:#0052CC;text-decoration:none;font-size:20px;font-weight:500;line-height:24px;display:block;">
  35. {{issue.summary}}
  36. </a>
  37. </div>
  38. </td>
  39. </tr>
  40. <!-- Actor Info -->
  41. <tr>
  42. <td style="padding:15px 30px;">
  43. <table cellpadding="0" cellspacing="0" border="0" width="100%">
  44. <tr>
  45. <!-- Avatar using nested table for better compatibility -->
  46. <td style="width:40px;padding-right:12px;vertical-align:middle;">
  47. <table cellpadding="0" cellspacing="0" border="0" width="36" height="36" style="background-color:#0052CC;border-radius:18px;mso-border-radius:18px;">
  48. <tr>
  49. <td align="center" valign="middle" style="color:#ffffff;font-family:Arial, sans-serif;font-weight:bold;font-size:16px;line-height:36px;mso-line-height-rule:exactly;">
  50. {{initiator.displayName.substring(0,1).toUpperCase()}}
  51. </td>
  52. </tr>
  53. </table>
  54. </td>
  55. <!-- Name -->
  56. <td style="vertical-align:middle;">
  57. <strong style="font-size:14px;color:#172b4d;line-height:20px;">{{initiator.displayName}}</strong>
  58. </td>
  59. <!-- Time -->
  60. <td align="right" style="vertical-align:middle;padding-left:10px;">
  61. <span style="color:#5e6c84;font-size:12px;white-space:nowrap;">{{now.format("hh:mm a z")}}</span>
  62. </td>
  63. </tr>
  64. </table>
  65. </td>
  66. </tr>
  67. <!-- Field Changes -->
  68. <tr>
  69. <td style="padding:5px 30px 15px 30px;">
  70. <table cellpadding="0" cellspacing="0" border="0" style="margin-left:48px;">
  71. <tr>
  72. <td style="padding-right:10px;white-space:nowrap;font-size:14px;color:#172b4d;vertical-align:middle;">
  73. Assignee:
  74. </td>
  75. <td style="font-size:14px;vertical-align:middle;">
  76. <span style="color:#6b778c;margin:0 8px;">&rarr;</span>
  77. </td>
  78. <td style="vertical-align:middle;">
  79. <table cellpadding="0" cellspacing="0" border="0">
  80. <tr>
  81. <td style="padding:4px 8px;background-color:#e3fcef;color:#006644;border-radius:3px;font-size:14px;line-height:18px;">
  82. {{assignee.displayName}}
  83. </td>
  84. </tr>
  85. </table>
  86. </td>
  87. </tr>
  88. </table>
  89. </td>
  90. </tr>
  91. <!-- CTA Button -->
  92. <tr>
  93. <td style="padding:20px 30px;">
  94. <table cellpadding="0" cellspacing="0" border="0">
  95. <tr>
  96. <td align="center" style="background-color:#0052CC;border-radius:3px;mso-border-radius:3px;">
  97. <a href="{{issue.baseUrl}}/browse/{{issue.key}}" style="display:inline-block;padding:12px 24px;color:#ffffff;text-decoration:none;font-size:14px;font-weight:500;line-height:20px;mso-line-height-rule:exactly;">
  98. View work item
  99. </a>
  100. </td>
  101. </tr>
  102. </table>
  103. </td>
  104. </tr>
  105. <!-- Divider -->
  106. <tr>
  107. <td style="padding:15px 30px 10px 30px;">
  108. <hr style="border:none;border-top:1px solid #dfe1e6;margin:0;">
  109. </td>
  110. </tr>
  111. <!-- Footer -->
  112. <tr>
  113. <td style="padding:15px 30px 20px 30px;">
  114. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  115. <tr>
  116. <td style="vertical-align:top;width:75%;">
  117. <p style="margin:0 0 10px 0;font-size:11px;color:#5e6c84;line-height:16px;">
  118. Open the work item to view attachments over 100 KB
  119. </p>
  120. <p style="margin:0;font-size:11px;color:#5e6c84;line-height:16px;">
  121. Get Jira notifications on your phone! Download the Jira Cloud app for
  122. <a href="https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail" style="color:#0052CC;text-decoration:none;">Android</a>
  123. or
  124. <a href="https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8" style="color:#0052CC;text-decoration:none;">iOS</a>
  125. </p>
  126. </td>
  127. <td align="right" style="vertical-align:middle;width:25%;padding-left:20px;">
  128. <!-- Text-based Jira Logo -->
  129. <span style="color:#0052CC;font-size:24px;font-weight:bold;white-space:nowrap;font-family:Arial, sans-serif;">Jira</span>
  130. </td>
  131. </tr>
  132. </table>
  133. <!-- Footer Links -->
  134. <table cellpadding="0" cellspacing="0" border="0" style="margin-top:15px;">
  135. <tr>
  136. <td style="padding-right:15px;font-size:12px;line-height:18px;">
  137. <a href="{{baseUrl}}/jira/settings/personal/notifications?emailPreferences=true#emailpreferences" style="color:#0052CC;text-decoration:none;">
  138. Manage Notifications
  139. </a>
  140. </td>
  141. <td style="padding-right:15px;font-size:12px;line-height:18px;color:#dfe1e6;">
  142. |
  143. </td>
  144. <td style="padding-right:15px;font-size:12px;line-height:18px;">
  145. <a href="https://surveys.atlassian.com/jfe/form/SV_9X3zi1X4q1gKsqF" style="color:#0052CC;text-decoration:none;">
  146. Give feedback
  147. </a>
  148. </td>
  149. <td style="padding-right:15px;font-size:12px;line-height:18px;color:#dfe1e6;">
  150. |
  151. </td>
  152. <td style="font-size:12px;line-height:18px;">
  153. <a href="https://www.atlassian.com/legal/privacy-policy" style="color:#0052CC;text-decoration:none;">
  154. Privacy Policy
  155. </a>
  156. </td>
  157. </tr>
  158. </table>
  159. </td>
  160. </tr>
  161. </table>
  162. </td>
  163. </tr>
  164. </table>
  165. </body>
  166. </html>

Configured content view

This is the Content tab of the Send Email action after applying the template above. Smart values render as text in the editor; Jira resolves them at send time.

action-send-email-content-fixed.webp
Send Email action, Content tab. The HTML template uses {{initiator.displayName}} for the assigner's name and {{issue.baseUrl}} for the project breadcrumb URL.

Email preview

This is how the rendered email looks once Jira resolves the smart values. The sample below uses placeholder values such as DEMO-123 and Bjorn Admin; in production Jira substitutes the real assigner, issue, and project at send time.

email-preview.webp
Rendered email preview with sample smart values resolved.

Smart values used

Smart value

Purpose

Example

{{initiator.displayName}}

Name of the user who triggered the rule (the actual assigner).

Bjorn Admin

{{initiator.displayName.substring(0,1).toUpperCase()}}

First letter of the assigner's name, upper-cased - used as the text avatar.

B

{{issue.key}}

Issue key, in subject and as link text.

DEMO-123

{{issue.summary}}

Issue title, large heading link.

Fix login bug on the marketing site

{{issue.project.name}}

Project display name shown in the breadcrumb.

Test Space Conni Group

{{triggerIssue.project.key}}

Project key, used in the project breadcrumb URL.

TSCG

{{triggerIssue.project.id}}

Numeric project id, used in the project breadcrumb URL.

10042

{{issue.url}}

Direct URL to the work item (used by breadcrumb and title link).

https://your-site.atlassian.net/browse/TSCG-1

{{issue.baseUrl}}

Instance base URL, used in the project breadcrumb and the View work item button. Keeps the template portable across sites.

https://your-site.atlassian.net

{{baseUrl}}

Same instance base URL, used for the Manage Notifications link.

https://your-site.atlassian.net

{{assignee.displayName}}

New assignee name shown in the green field-change pill.

Conni Confluence

{{now.format("hh:mm a z")}}

Time the email is sent.

11:51 am UTC

Caveats and limitations

Mentions in Jira are not affected. This flow covers assignment notifications only. Jira delivers mention notifications natively, including to unlicensed users who remain in a stable group, so no additional automation is needed for mentions.

Depends on a stable group. The condition matches the literal group name deactivated_users. If your UCM Automated Task uses a different group name (for example inactive-jira-users or inactive-confluence-users), edit the condition to match. See Deactivating and Reactivating User for the stable-group concept.

Recipient has no license. Because the assignee was just deactivated, they cannot click into the issue without first regaining product access. The View work item button still works in the sense that it sends them to the Jira login page, which surfaces the Request access flow if your App access settings approved-domain configuration is in place.