# Does Dynatrace Email Notification Problem Body Support JavaScript?

**URL:** <https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414>\
**Category:** Alerting\
**Tags:** problem-notification, problems-classic\
**Created:** [February 24, 2025, 11:37am UTC](https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414 "2025-02-24T11:37:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanket\_Molavade](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Sanket\_Molavade](https://community.dynatrace.com/u/Sanket_Molavade)\
**Post date:** [February 24, 2025, 11:37am UTC](https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414/1 "2025-02-24T11:37:54Z")

</div>

Hi Team,

I am working on customizing the **Dynatrace email problem notification** as per client requirements in a **Dynatrace Managed environment**. I have successfully formatted most of the email using **HTML** and **inline CSS** to meet the expected design.

However, I am facing an issue with the final customization. I need to **dynamically change the color and format of the problem details** based on the **severity level** of the problem. Since **HTML and inline CSS** alone cannot achieve this conditional styling, I attempted to use **JavaScript** for applying color changes based on severity.

Unfortunately, the **JavaScript does not seem to work** in the email body.

🔍 **Can anyone confirm if JavaScript is supported in the Dynatrace problem notification email body?** Or suggest any alternative approaches to achieve conditional styling based on severity?

Please check the below problem body for the same.

```markup
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
</head>
<body>
    <table style="font-family: arial, sans-serif; border-collapse: collapse; width: 100%; max-width: 50rem;">
        <tr>
            <td style="border: solid #B42C2F; border-width: medium; color: #000000; text-shadow: 0px 0px 2px #ffffff; background-color: #B42C2F; border-style: solid; border-color: #B42C2F; border-width: medium;" width="30%">CRITICAL Event</td>
            <td style="border-style: none;"></td>
            <td style="border-style: none;"></td>
        </tr>
        <tr>
            <td style="border-style: solid; border-color: #B42C2F; border-width: medium;" colspan="3">
                <h1 style="font-size: 20px; font-family: arial, sans-serif;">Critical Event Notification</h1>
                <table style="font-family: arial, sans-serif; border-collapse: collapse; width: 100%; max-width: 50rem;">
                    <tr>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px; width: 25%;">Node Name</td>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px;">Server-01</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px; width: 25%;">Business Service</td>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px;"> Test Processing</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px; width: 25%;">First Occurrence (Asia/Dubai)</td>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px;">2023-10-25 14:30:00</td>
                    </tr>
                    <tr>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px; width: 25%;">Organization</td>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px;">ABCD Test Processing</td>
                    </tr>
                    <tr style="color: #B42C2F;">
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px; width: 25%;">Message</td>
                        <td style="border: 1px solid #dddddd; text-align: left; padding: 2px;">High CPU usage detected</td>
                    </tr>
                </table>
                <table style="border: none;">
                    <tr style="border: none;">
                        <td style="border: none; width: 12px;"></td>
                        <td style="border: none;">
                            <a href="https://example.com/event/123" style="background-color: #B42C2F; border: none; color: #000000; padding: 15px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; font-family: arial, sans-serif; margin: 4px 2px; cursor: pointer; border-radius: 12px;">View This Event</a>
                        </td>
                        <td style="border: none; width: 12px;"></td>
                    </tr>
                </table>
                <table style="border: none;">
                    <tr style="border: none;">
                        <td style="border: none; width: 12px;"></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

```

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![MaciejNeumann](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@MaciejNeumann](https://community.dynatrace.com/u/MaciejNeumann)\
**Post date:** [November 24, 2025, 1:53pm UTC](https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414/2 "2025-11-24T13:53:00Z")

</div>

Hello&nbsp;[@Sanket\_Molavade](https://community.dynatrace.com/user/53319),

According to this Documentation article it is not possible at the moment:

[Format email](https://docs.dynatrace.com/docs/shortlink/automation-workflows-email#format-email)&nbsp;  
_Attaching an image or inserting JavaScript code into the email body is impossible. It’s just shown as plain text._

---

<div class="post-metadata">

**Author:** ![txvepr](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@txvepr](https://community.dynatrace.com/u/txvepr)\
**Post date:** [December 5, 2025, 12:01am UTC](https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414/3 "2025-12-05T00:01:25Z")

</div>

Does this restriction also apply for HTML formatting? I am trying something similar with a Workflow sending an email with a html table embedded that holds data from DQL .

Is that possible ?

---

<div class="post-metadata">

**Author:** ![O11y\_Noob](https://avatars.discourse-cdn.com/v4/letter/o/9fc348/32.png) [@O11y\_Noob](https://community.dynatrace.com/u/O11y_Noob)\
**Post date:** [December 15, 2025, 1:08pm UTC](https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414/4 "2025-12-15T13:08:19Z")

</div>

through workflows , yes , you can run the DQL in a block and give the result to the Java Script blocks for formatting in to a markdown table and then add Jinja Expressions to refer to the JS output in the send notification Email block

---

<div class="post-metadata">

**Author:** ![txvepr](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@txvepr](https://community.dynatrace.com/u/txvepr)\
**Post date:** [January 7, 2026, 3:57pm UTC](https://community.dynatrace.com/t/does-dynatrace-email-notification-problem-body-support-javascript/50414/5 "2026-01-07T15:57:52Z")

</div>

This seems to be only to a point-formatting- is only being able to Bold or italicize the text. However, We need to be able to format an output in a Professional, table layout much like the original post wants. The email should be able to show an HTML based table of data.&nbsp; &nbsp;We can do the javascript step to design the html output, but the email step does not render it. Does that make sense?

Executives would like a formal looking output rather than basic rows of data. This would look much better for Dynatrace production.
