Send Attachment Content via Email using Project Automation

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 23, 2024

Hi Guys,

Need your help in setting up an automation rule. 

Trigger : When issue is comment

Action : Automation send email to an email with all the details of last comments including body and attachment.

 

I am able to send comment body and attachment hyperlink.
 
Is it possible to show hyperlink or attached screenshot in email instead of showing the break screenshot like this

Screenshot 2024-12-18 at 12.17.59 PM.png


Screenshot 2024-12-24 at 12.52.32 PM.pngScreenshot 2024-12-24 at 12.52.51 PM.pngScreenshot 2024-12-24 at 12.53.13 PM.png

2 answers

1 accepted

1 vote
Answer accepted
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.
December 24, 2024

Hi @Vikrant Yadav 

Following up on your last question from the other answer to find the attachments added with the last comment, for workarounds there is a "simple, mostly accurate" way:

Let's assume the time from creating the comment and posting the attachments in the body is less than 10 seconds (or some figure you decide).  The attachments added within that time interval could be found using a date / time difference between the attachment created and now smart values.

{{#issue.attachment}}
{{#if(created.diff(now).seconds.lt(10))}}
{{content}} -- {{filename}};
{{/}}
{{/}}

Larger attachments take longer to add, as does writing a non-trivial comment.  So perhaps change the time interval to 60 seconds, or whatever threshold you want.

Kind regards,
Bill

1 vote
Prachi Bolar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 24, 2024

Hi Vikrant,

Welcome to the community :) 

 

Through native means, automation for Jira currently doesn't support uploading attachments in the 'Send email' action.

The only workaround we currently have is to embed the URL of the attachments on an issue into the email.

We have raised a feature request with our developers to provide this feature;

Please consider voting and watching the feature request so that our product team can evaluate the demand for this request.

Also few things tried here : https://community.atlassian.com/t5/Marketplace-Apps-Integrations/How-do-I-add-attachments-to-an-e-mail-with-Automation-for-JIRA/qaq-p/6556

 

Thank You,

Prachi

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 24, 2024

Hi @Prachi Bolar  I am using this smartvalue for in email body. 

{{issue.comments.last.body.html}}
Attachments:
<ul>
{{#issue.attachment.last}}
<li><a href="{{content}}">{{filename}}</a></li>
{{/issue.attachment.last}}
</ul>

 

For Attachment it's fine, I am getting the attachment link but getting link for last attachment only.
If user is adding two or more attachment in single comment, it only send the last one, not all attachment added in last comment. 

I need to attachment link for only those attachment added in a last comment. 
System should not show broken attachment name, instead of it, how i can replace  attachment.  link

Suggest an answer

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

Atlassian Community Events