Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to send a monthly update of all items that fulfil a subset of criterion

Tomalin Jenner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 8, 2025

Hi, I would like to create an automation that sends 1 large email on the 25th of each month that includes:

  • All items from a specific board
  • Who are in any of the 8 issue types I created
  • Within the next month
  • Who are assigned to specific people

 

For example:

  • 8 items in March across several issue types assigned to me & 10 assigned to Joe's Team
  • 16 items in April across several issue types & 20 assigned to Joe's Team
  • 24 items in May across several issue types & 30 assigned to Joe's Team

 

I want the email reminder sent at the end of March to tell me the 16 items upcoming for me from April, and a separate email sent to Joe's Team (of 2 people) telling them the 20 items they have to do in April.

 

Then, I want the email reminder sent at the end of April to tell me the 24 items upcoming for me from May, and a separate email sent to Joe's Team (of 2 people) telling them the 30 items they have to do in May.

--------

I want the email to be structured in the following way (in my perfect world):

Hi [Insert Team Name], please see the following tasks due in the next month:

[Issue Type 1]:

- [Task 1] is due on [due date of task 1 - e.g. 01/01/2000]

- [Task 2] is due on [due date of task 2- e.g. 15/01/2000]

 

[Issue Type 2]:

- [Task 3] is due on [due date of task 3 - e.g. 12/01/2000]

- [Task 4] is due on [due date of task 4 - e.g. 29/01/2000]

 

Here is an overall view of all tasks coming up:

 

Name of Task

Issue Type

Due Date

[Task 1]

[Issue Type 1]

01-01-2000

[Task 3]

[Issue Type 2]

12-01-2000

[Task 2]

[Issue Type 2]

15-01-2000

[Task 4]

[Issue Type 1]

29-01-2000

--------

This is what I was able to create thus far:

  • When = Every 1 month on the 25th at 8:30am
    • Run a JQL search for the following query:
      • project = "XX- Project Name - XX" AND issuetype != Task AND issuetype != Sub-task AND "Start date[Date]" >= startOfMonth("+1") AND "Start date[Date]" <= endOfMonth("+1")
  • Then = Send Email
    • To = [Team Name]
    • Content = This is a reminder of all tasks starting in the next month & when they're due: {{#issues}} - *{{key}}*: {{summary}} (Start Date: {{Start Date}}, Due Date: {{duedate}}) {{/issues}}

-------

The main parts I'm stuck on is:

1. Figuring out how to send emails to different teams depending on their tasks due, and not sending to all

2. Being able to add all of the issues from all issue types to one email & subsequently creating the email as desired.

 

I would greatly appreciate any/all help to steer me into the right direction, or advice on how this could be done better. Thank you!

2 answers

2 votes
David Nickell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2025

I will admit to only scanning over the requirements... but this sounds like a filter subscription solution as a start.  Are you familiar with those?  Simply put - you create the filter with the criteria you want, establish a "CRON" like scheduled (found under Filter>Details), and pick a group to recieve an email.  

Filter Subscription.png

0 votes
Sakshi Kale April 11, 2025

Hello, you are on the right track with your JQL and scheduled trigger.

For the two things you’re stuck on:

1. Sending Different Emails to Different Teams/Assignees

Currently, Jira Automation doesn't natively support looping over assignees or dynamically splitting emails by assignee/team. But you can achieve this by creating multiple automation rules, one per person or team.

i. One Rule Per Assignee (Manual Setup)

Clone your current rule for each assignee/team (like “Myself” and “Joe’s Team”).

In the JQL, add the specific assignee(s) filter.

Example:

project = "XX-Project Name-XX"

AND issuetype IN (Your 8 Issue Types)

AND assignee in (joe, jane)  -- or just one person

AND "Start date[Date]" >= startOfMonth("+1")

AND "Start date[Date]" <= endOfMonth("+1")

Change the recipient in the Send Email action.

Personalize the email with Hi Joe’s Team or Hi [assignee.displayName].

ii. If you want a single email per team (like “Joe’s Team” with multiple users), create a shared distribution list or email alias.

 

2. Better Formatting: Grouping by Work type and the overview table

Automation smart values aren’t great at grouping, but here’s how you can use the Handlebars templating to simulate the grouping of issues by their types by manually inserting conditions for each issue type. For e.g., 

Hi {{recipientName}}, please see the following tasks due in the next month: 

{{#issues}}

{{#if(issueType.name == "Issue Type 1")}}

[Issue Type 1]:

{{/if}}

{{#if(issueType.name == "Issue Type 2")}}

[Issue Type 2]:

{{/if}}

- [{{key}}] {{summary}} is due on {{duedate}}

{{/issues}}

 

Here is an overall view of all tasks coming up:

Name of Task | Issue Type | Due Date

-------------|------------|---------

{{#issues}}

{{summary}} | {{issueType.name}} | {{duedate}}

{{/issues}}

Since Jira automation doesn’t natively support conditionals like if(issueType.name == "X") directly inside the loop, for more complex formatting, you have to hardcode groups or use third-party apps.

TL DR:

Create: One rule for you, filtering issues assigned to you.

One rule for Joe’s Team, filtering issues assigned to joe and other person.

Manually group by issue type in the template (hardcoded sections for the 8 types).

Add a table view at the end for quick reference.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2025

Hi @Sakshi Kale 

Jira Cloud does not use the plural {{issues}} smart value.  That is used for bulk-handling issues for Jira Server and Data Center only.  Jira Cloud uses the Lookup Issues action for such needs.  And, neither of those techniques requires a separate rule per Assignee for the scenario the original-poster asked about.

To learn more, please read these documentation sources:

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events