-
Notifications
You must be signed in to change notification settings - Fork 906
Modern Template for ServiceNow Notifications #2434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rohi-v
merged 3 commits into
ServiceNowDevProgram:main
from
abhix2112:notification_layout
Oct 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
Specialized Areas/Notifications/Modern Email Layout Designs/Readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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} | ||
| ``` | ||
86 changes: 86 additions & 0 deletions
86
Specialized Areas/Notifications/Modern Email Layout Designs/script.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"> | ||
| © ${gs.dateGenerate().getYear()} Travel & Expense Portal. All Rights | ||
abhix2112 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Reserved.<br /> | ||
| <br /> | ||
| <a href="${NOTIF_UNSUB}">Unsubscribe</a> | | ||
| <a href="${NOTIF_PREFS}">Manage Preferences</a> | ||
| </div> | ||
| </div> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.