Automation - Issue with Smart Values for Send email action

Rafael Freymueller
Contributor
May 21, 2024

Hi everyone,

I am trying to setup an automation that automatically sends an email to the user populated in the 'Approvers' field. However I am encountering 2 issues when trying to test this. 

The first one is when selecting "Pending approvers" as the subject in the Send email action, the following error shows up: 

Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty. ISM-2224

For testing purposes, I have entered my own individual email address to check if the rest of the automation is working properly. I have received the e-mail for the test ticket that I created which fits the conditions stated in the 'Lookup issues' action.

However, when I try to enter the smart values to state things such as the summary or description of the issue within the email sent, the mail looks like the following.

 

Any advice on what I am doing wrong and how to fix these issues would be very welcome as I struck a bit of a wall.

 

Thanks in advance!

 

#1.PNG#2.PNG#3.PNG

 

 

2 answers

2 accepted

2 votes
Answer accepted
Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2024

Hi @Rafael Freymueller ,

Please create rule as below.

Trigger = Scheduled
Select "Run a JQL search and execute actions for each issue in the query." and add your JQL for the required filter

image.png

In action select send email. 

in to field, select Approvers field where the approvers are added. 

image.png

 

In subject, add below line

Approval required: {{issue.key}} is pending your approval

In content, add your required description.

Example

Ticket <b>{{issue.key}} </b> is pending for your approval.

Issue Description:
{{issue.description}}

 

Sample rule looks like this. 

image.png

 

 

Rafael Freymueller
Contributor
May 21, 2024

Hi  @Rilwan Ahmed ,

thanks for your reply. 

I set up the automation based on your suggestion and now it appears that the issue key and description are properly displayed within the email.

However, is there a way that I can directly link to the ticket in question through the email message? As of right now you would have to manually open Jira and search for the issue stated in the subject. 

Initially I had the following as part of the email content: 

<b> <a href="{{issue.url.customer}}">View Request </a> </b>

With above mentioned smart value it does not input a link. Is there a way to do it so Approvers can directly navigate to the issue that needs approving?

 

Another question for your proposed solution is to input Approvers for the email recipient. Would this only send the email to the one that is assigned as the Approver of the issue or would this email be sent out to other Approvers too?

 

Thank you very much for your help so far! I look forward to your answer on this one. Thanks in advance! 

 

Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2024

Hi @Rafael Freymueller ,

1. This tag should work.
<b> <a href="{{issue.url.customer}}">View Request </a> </b>

OR use a different way like below: 
You can approve/reject the request from {{issue.url.customer}}

2. Would this only send the email to the one that is assigned as the Approver of the issue or would this email be sent out to other Approvers too?
--
This will only send email to the users who are added in approvers field. 

1 vote
Answer accepted
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2024

Hi @Rafael Freymueller ,

The lookup issues produces the {{lookupIssues}} smart value. You could/should  branch (advanced branching) on the {{lookupIssues}} value with 'lookupIssue' as value.

Then you can use the{{lookupIssue}} smart value in your email, e..g.

{{issue.summary}} --> {{lookupIssue.summary}}

Note that if you have multiple tickets you need to approve, you will receive multiple mails. So you can also send one mail with all the tickets in it. 

Kind regards,
Rudy

Rafael Freymueller
Contributor
May 21, 2024

Hi  @Rudy Holtkamp  ,

thanks for your quick reply. 

I will also experiment with your proposed solution.

Kind regards,

Rafael

Suggest an answer

Log in or Sign up to answer