ServiceNow Notifications - Showcase asset data in tabular view using email scripts

JSharathChandra
Tera Contributor

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 

2 REPLIES 2

An Le
Giga Sage

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,

VaishnaviK3009
Kilo Sage

Hi @JSharathChandra ,

You can use an Email Script to build the tabular view and call it inside the notification.

Steps:

  1. Create an Email Script under System Notification → Email → Email Scripts.

  2. In the script, query the alm_asset table where assigned_to = current.sys_id.

  3. If asset count ≥ 1, build an HTML table using template.print() with columns like Model Category, Model, Serial Number, and State.

  4. 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.

Screenshot 2026-03-16 105141.pngScreenshot 2026-03-16 105200.pngScreenshot 2026-03-16 105218.pngScreenshot 2026-03-16 105226.png

 

Mark this as Helpful if it clarifies the issue.
Accept the solution if this answers your question.

Regards,
Vaishnavi
Technical Consultant