How to add a HTML paragraph when sending an email notification in Automation for Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

robotsnoindex

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

Jira administrators would like to trigger an email in html format with a paragraph when a customer creates or adds a comment through the Customer Portal.

Environment

  • Jira Server / Data Center 8.0.0 and any higher version
  • Automation for Jira 7.0.0 and any higher version

Use case

In this page, we will show you an example on how to trigger an email to the Service Desk Customer (author) with the content from the comment with HTML tags including a paragraph.

  • Automation rule
  • Email received
  • HTML code used in 'Send email' content

    Email HTML
    <h4 style="background-color:rgb(89, 89, 89);"><span style="color:white">Servicedesk Response</span>
    </h4><div style="background-color:rgb(229, 229, 229);">{{comment.body.html}}</div> 

Notes:

  • For the paragraph, do not use the <p> element to add a paragraph. You need to use <div> block.
    • The way Automation sends an email, if <p> is included, the Send Email action needs to convert wiki markup to HTML and it will append an additional <p> to the request and the styling in the section of the “comment.body.html” will be lost.
  • Use {{comment.body.html}} smart value to capture the comment body in HTML format.
  • Make sure the send e-mail action configuration is set to "Send as: HTML"


Last modified on May 24, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.