How to retain formatting of text content when sending it in an email via Automation for Jira


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

When sending an email using the Send Email component in an Automation rule, you may notice that text formatting and styling are not retained in the actual email if you use smart values to insert issue content in the body of the email. You will also see the Jira wiki markups as they are in the email received making the email difficult to read.

Environment

Jira Cloud


Cause

This is because using smart values in the body of the email inserts the data in Jira wiki format, and when this is sent to an email inbox, the format is not recognized. 



Solution

You would need to convert the Jira format to HTML format for the context to be formatted correctly in the email as well. This can be achieved by appending the smart value with .html. Using this converts the Jira formatted text to HTML, and content is rendered with proper formatting and styling in the email.
Example: 

{{issue.description.html}}

If your Jira issue description contains a table and you use the above-mentioned smart value, you will not see the table border in the email you receive but other formatting/styling will be retained. This is a known limitation currently tracked in AUTO-409 - Getting issue details... STATUS




Last modified on May 27, 2024

Was this helpful?

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