Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

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 

4 REPLIES 4

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

VaishnaviK3009
Kilo Sage

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

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