ServiceNow Notifications - Showcase asset data in tabular view using email scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2026 02:40 AM
Hello there!
Need your input on a requirement mentioned below. Please go through it and let me know if you have an idea to achieve it. Thank you in advance!!
We're trying to retrieve asset data of a user and send a notification to that user with asset details in tabular view as mentioned below. FYI, It should work only if asset count>=1.
Can you please assist on how to build tabular view using email scripts within notifications?
Model Category | Model | Serial Number | State |
|
|
|
|
@Chuck Tomasi, @Ankur Bawiskar, @Krista Forget @Hitoshi Ozawa @Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2026 10:14 PM
Hi @JSharathChandra ,
Yes, in ServiceNow, the usual way to build a tabular section inside a notification is to create a Notification Email Script, generate HTML, and then call that script from the notification body with ${mail_script:your_script_name}
Kind regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2026 10:25 PM
Hi @JSharathChandra ,
You can use an Email Script to build the tabular view and call it inside the notification.
Steps:
Create an Email Script under System Notification → Email → Email Scripts.
In the script, query the alm_asset table where
assigned_to = current.sys_id.If asset count ≥ 1, build an HTML table using
template.print()with columns like Model Category, Model, Serial Number, and State.In the Notification → Message HTML, call the script using:
${mail_script:EmailScriptName}
This will render the asset details in a table format inside the email notification.
Mark this as Helpful if it clarifies the issue.
Accept the solution if this answers your question.
Regards,
Vaishnavi
Technical Consultant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @JSharathChandra ,
I hope you're doing well!
If you find my solution helpful, please consider marking it as helpful and accepting it. This will also assist others facing similar issues.
Regards,
Vaishnavi
Technical Consultant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @An Le and @VaishnaviK3009,
Apologies for the delayed reply as I have been occupied on mutliple things and unable to reply soon. But thanks for your inputs on this requirement.
@An Le, I've already tried using a custom notification mail script within notification but the table building is not working as expected.
@VaishnaviK3009, I've already followed the steps that you have listed and tried replacing my old mail script with the new one that you have provided on one of the screenshots but it still shows a blank space on the notification. Review the attached screenshot on the same and let me know if anything is missed.
Thanks for your time and assistance.
Best regards,
J Sharath Chandra Sai
