Uploaded image for project: 'Automation for Cloud'
  1. Automation for Cloud
  2. AUTO-1130

Ability to include ticket attachments and image attachments using Send Mail function

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    • Jira Software, Jira Service Management, Jira Work Management, Jira Product Discovery

      Issue description

      Currently, it is not possible to include an issue attachment using the Send Email action in an automation rule.

      Example 1

      • Let's assume that an automation rule was configured to use the Send Email action and use the following smart value in the content of the email:
        {{issue.comments.last.body}
        

      • If a comment is added to a ticket including an attachment as shown below:
      • The generated email will include the text from the comment, but it will not render/include the attachment. Instead, a reference to the attachment will be included:
        !attachment.jpg|thumbnail!
        

      Example 2

      • Let's assume that an automation rule was configured to use the Send Email action and use the following smart value in the content of the email:
        Issue attachment: {{issue.attachment}}
        
      • If the rule is triggered and the email is sent, the email will contain the attachment metadata (including its link), but not the actual attachment file:
        AttachmentBean{self='http://localhost:8081/jira8201/rest/api/2/attachment/11400', id=11400, filename='LocalTest_IssueCreatedFromCreateButton.png', author=UserBean{name='julien', key='JIRAUSER10000', accountId='null', emailAddress='someaddress@test.com', displayName='Julien Rey', active=true, timeZone='Europe/Helsinki', locale='null'}, created=Tue Jul 11 14:08:01 CEST 2023, size=229915, mimeType='image/png', content='http://localhost:8081/jira8201/secure/attachment/11400/someimage.png'}
        

      Suggestion

      Add the ability to include issue attachment when using the Send Email action

      Workaround

      As a workaround, we may include publicly available images on the emails using the <img src=> tag:

      Hi,
      
      <img src="https://publicly-accessible-site.com/logo.png">
      
      Cheers 

      Another Workaround

      Currently a possible workaround would be follow the suggestion found on this Community post so you can send URLs of the attachments contained in the issue.

      So this email body will iterate over all attachments on an issue and produce links that allow recipients to download the attachment directly from JIRA: 

      <ul>
      {{#issue.attachment}}
      <li><a href="{{content}}">{{filename}}</a></li>
      {{/issue.attachment}}
      </ul>
      

        1. image-2024-02-21-17-42-00-952.png
          230 kB
          Gabi Paludo
        2. image-2024-02-21-17-42-31-449.png
          271 kB
          Gabi Paludo
        3. image-2024-02-21-17-42-49-871.png
          49 kB
          Gabi Paludo

              Unassigned Unassigned
              119d25e0f528 Gabi Paludo
              Votes:
              39 Vote for this issue
              Watchers:
              41 Start watching this issue

                Created:
                Updated: