Need to automate sending an email with a list of items instead of an email for each item.

Paul Rathgeb October 30, 2024

I have an automation that finds all incomplete, past due action items (aka "tasks"). I would like to send out a single email that lists all past due items. Right now an email is sent for each incomplete, past due task. I was playing with variables and lookup lists, but I simply can't figure out how to do this. Has anyone conquered this challenge?

 

Here's my current automation that sends an email for every incomplete, past due task:

  1. Scheduled: Check at designated frequency.
  2. Task Branch: Incomplete and past due.
  3. If: where page parent id = ***
  4. Then send email: {{task.body}}

 

I tried using "create a variable" and also "create a lookup table," but I was unable to figure out how to aggregate all the past due items into one email.

 

Any help would be greatly appreciated!

 

2 answers

2 accepted

1 vote
Answer accepted
Barbara Szczesniak
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.
October 31, 2024
Paul Rathgeb October 31, 2024

Thank you Barbara. Between the doc you linked to, and the details on how Mustache works, I was able to figure it out. 

Paul Rathgeb November 4, 2024

Hi Barbara,

I thought I solved it, but that was a false alarm. I followed the link and tried to reconstruct the automation for incomplete tasks, and it just isn't working. Here's what I've done:

1. Trigger: Scheduled to run every 5 minutes (for testing).

2. Task Branch: Where Status is incomplete AND Due date has passed 1 days.

3. Advanced Branching: Smart Value: {{lookupTasksPerAssignee}}; Variable Name: doneTasks.

  • If Compare two values: If {{doneTasks.first().assignee.emailAddress}} does not equal Empty.
  • Then: Send email: TO: {{doneTasks.first().assignee.emailAddress}}. Subject: Test. Content: {{#doneTasks}}{{body}}<br/>{{/}}

AUDIT LOG: "Some Errors": Advanced branching: "The provided smart value was unable to be resolved to an object."

 

It almost seems like the {{lookupTasksPerAssignee}} doesn't actually exist. What am I doing wrong?

 

Thanks!

Paul

 

 

 

Barbara Szczesniak
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.
November 4, 2024

@Paul Rathgeb I don't have Premium, so I don't use the automation features. There is a recording of a training session that was done in June in this article: https://community.atlassian.com/t5/Confluence-articles/Earn-the-Automate-All-the-Things-community-kudos-badge/ba-p/2723994 

There have also been many articles and questions and responses related to automations in the community, so searching there may help you find what you're looking for. There is also a lot of documentation related to automation. The top-level page is here: https://support.atlassian.com/cloud-automation/docs/confluence-cloud-automation/ 

Like Paul Rathgeb likes this
Paul Rathgeb November 4, 2024

Thank you for your efforts!

 

Paul Rathgeb November 4, 2024

For the benefit of anyone else following this communication: 

The information in this link shows a Task related smart values as {{lookupTasksPerAssignee}}. This is incorrect. The correct smart value is {{TasksPerAssignee}}.

1 vote
Answer accepted
Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2024

Hi @Paul Rathgeb 

Step1: The first step in the automation is to use the new lookup issues action by adding a "component: new Action" and select "Lookup Issues". Inside the lookup issues construct, add the JQL query you need (e.g., Issuetype=Bug, Status = Open ...)

Step2: Send a simple email with the following in the body of the email:

List of issues:

{{#lookupIssues}}
<a>{{key}}</a>
{{/}}

 

The email provide a simple list:

TD-3099
TD-3064
TD-2970

 

I hope this helps!

Best regards

Sam

Paul Rathgeb October 30, 2024

Thanks, Sam. I am using Confluence Cloud, and I don't see an option for "Lookup Issues" in it. Am I missing it somehow?

Thanks,

Paul

Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 30, 2024

Hi @Paul Rathgeb 

I apologize for the oversight; I mistakenly read it as Jira.

Please take a look to this post

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events