Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
### Overview

Added a **modern, fully responsive Email Layout** for ServiceNow notifications.
This layout provides a professional and dynamic look for system emails such as approvals, alerts, and workflow updates.

---

### 🔑 Features

- Clean, responsive HTML with inline CSS (Outlook-safe)
- Dynamic placeholders for subject, body, recipient, and links
- Supports unsubscribe and preference management variables
- Compatible with all standard ServiceNow notification types
- Easily customizable header colors, logo, and footer content

---

### 📁 Files Included

| File | Description |
| ------------- | ------------------------------------ |
| `Script.html` | Email Layout definition (HTML + CSS) |
| `README.md` | Setup guide and usage instructions |

---

### ⚙️ Installation

1. Navigate to **System Notification → Email Layouts → New**
2. Paste the HTML layout above into the content field
3. Save and name it **"Modern Notification Layout"**
4. Assign this layout to your email notifications (under "Layout" field)

---

### 💡 Example Use Case

Used for travel approvals, expense updates, password resets, or ticket notifications:

```html
${mail_script:travel_notification}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<p></p>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
.container {
width: 100%;
max-width: 600px;
margin: 20px auto;
background: #ffffff;
padding: 0;
border-radius: 8px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.header {
background: #004080;
color: #ffffff;
text-align: center;
padding: 20px;
}
.header img {
max-width: 150px;
}
.subject {
font-size: 20px;
font-weight: 600;
margin-top: 10px;
}
.content {
padding: 24px;
color: #333;
line-height: 1.6;
font-size: 15px;
}
.button {
display: inline-block;
padding: 10px 18px;
margin-top: 15px;
background: #004080;
color: #ffffff;
text-decoration: none;
border-radius: 5px;
}
.footer {
background: #f4f4f4;
text-align: center;
padding: 16px;
font-size: 12px;
color: #666;
border-top: 1px solid #e2e2e2;
}
a {
color: #004080;
text-decoration: none;
}
</style>

<div class="container">
<!-- Header -->
<div class="header">
<img src="${URI_REF}/travel_logo.png" alt="Logo" width="120" height="40" />
</div>

<!-- Body -->
<div class="content">
${notification.body}

<p style="margin-top: 30px; font-size: 13px; color: #777">
If you have any questions, contact
<a href="mailto:support@company.com">support@company.com</a>.
</p>
</div>

<!-- Footer -->
<div class="footer">
&copy; ${gs.dateGenerate().getYear()} Travel & Expense Portal. All Rights
Reserved.<br />
<br />
<a href="${NOTIF_UNSUB}">Unsubscribe</a> |
<a href="${NOTIF_PREFS}">Manage Preferences</a>
</div>
</div>
Loading