Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Send email notification when new attachment is uploaded

Quang Nguyen August 2, 2023

I am trying to create an automation that sends the Assignee a notification email when a new attachment is added to their issue. This should trigger when an attachment is added to the issue directly, and when an attachment is added to a comment on the issue.

If it an attachment to the issue, the email should read: "For {{link to issue.id}}, {{John Doe}} added the attachment {{FileName.extension}}"

If it is a comment, the email should read: "For {{link to issue.id}}, {{John Doe}} commented with the attachment {{FileName.extension}}"

I've tried searching for this but all the results I got were of people wanting to send the actual attachment via email. I only want to send the name of the attachment and a link to the issue.

2 answers

1 vote
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.
August 4, 2023

Hi @Quang Nguyen 

Did you try this with the Issue Commented trigger?  When I did that, I saw the name of the attached file in the comment body.  Perhaps try writing that to the log to see the format of the name for your use, as it could be parsed out using text functions or a regular expression.

Kind regards,
Bill

0 votes
Quang Nguyen August 2, 2023

Managed to figure out the first part:

 

When value changes for Attachment:

For <a href="{{issue.url}}">{{issue.key}} - {{issue.summary}}</a>, {{initiator.displayName}} added the attachment {{attachment.filename.last}}.

Still trying to figure out the comment part, specifically how to detect when an attachment is added to a comment.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events