Forums

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

How to get Send Email Action value into Audit log

Urmo
Contributor
January 6, 2025

Hi

What I should write on Audit Log field when I need to get values from Send email action?

I have Automation in Jira Cloud and now need to see what e-mail did get notification. To field value will be different if JQL get another result. But all e-mail are writen into To field and not come from Jira tickets.

Kuvatõmmis 2025-01-06 134420.png

I try to use {{email.recipients}} but it does not work.

Kuvatõmmis 2025-01-06 134634.png

Right now it write into Audit log so:

Kuvatõmmis 2025-01-06 134743.png

2 answers

0 votes
Jack Brickey
Community Champion
January 6, 2025

Hi @Urmo , you can't log the list of recipients in that way. May I ask how the list of recipients are being determined for the send email action? Can you share more of your automation?

Urmo
Contributor
January 6, 2025

Hi

There is automation what collect data from ticket. There is 4 companys and every company needs own notification

If company A are selected in ticket, send email to x@domain, y@domain.

Else if company B are selected in ticket, send email to q@domain

Else if company C are seleted in ticket, send email to e@domain, b@domain

Else if company A and C are selected in ticket, send email to x@domain, y@domain, e@domain, b@domain.


And now need to understand that did automation send e-mail out for them or not.

 

Jack Brickey
Community Champion
January 6, 2025

Thanks. I would consider changing your automation to include an if/else component testing for the company selected. Each if/else clause would send email to the proper recipients. Doing this would illustrate which if/else resulted in the email which would infer the recipients. 

0 votes
Jovin
Community Champion
January 6, 2025

Hey @Urmo 

Unfortunately the email is not stored anywhere on the issue data, so you will not be able to access it like this. If this is a requirement my advice would be one of the two ways:

Option 1 - Duplicate your information

After each "Send Email" action, create a "Log action" action and have all the same information manually input. You need to remember to update both actions if there are any changes.

Option 2 - Use variables

Use the "Create variable" action for each part of the email you need to keep (recipients, subject, body). Then use those variables in the "Send email" action itself (e.g. {{emailBody}}) and also in the "Log action" action.

Urmo
Contributor
January 6, 2025

I know that variable is one way to audit log and send email out with automation but i was hoping that if i write into automation if e-mail, then i can get this email data info audit log also but seems to be that I still need make automation what select company A, B and C and then write needed email into customfield and then another or same automation will send e-mail out and audit log write sended email into log.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events