can we attach images in notification in ServiceNow?

Ganesh53
Mega Contributor

I have one notification on which i want to attach screenshots is it doable?

1 ACCEPTED SOLUTION

Harish KM
Kilo Patron
Kilo Patron

Do you have attachments in record? --use include attachment checkbox in Notification

If you dont have attachment in record and want to send image. Use email script.

// insert the image to image table

var image = "abc.png''; //image name

template.print( '<img src="' + image + '" />' );

//call the email script to youre Notification using

${mail_script:emailscriptname}

Regards
Harish

View solution in original post

7 REPLIES 7

Harish KM
Kilo Patron
Kilo Patron

Do you have attachments in record? --use include attachment checkbox in Notification

If you dont have attachment in record and want to send image. Use email script.

// insert the image to image table

var image = "abc.png''; //image name

template.print( '<img src="' + image + '" />' );

//call the email script to youre Notification using

${mail_script:emailscriptname}

Regards
Harish

Shubham Bongulw
Giga Guru

Hi Ganesh,

In addition to Bhagyashri I would like to add the below example-

I have found below example where user wanted to add company logo as an image to notification, so this might help you achieve your requirement just instead of logo you need to share your screenshot images. Please refer example below-

You can write email notifications in HTML and refer to the company logo in an IMG tag after you upload it to ServiceNow:

  1. Choose Content Management > Images.
  2. Click New to create a new image. The Images form opens.
  3. In the Name field, enter the new image's filename (such as company_logo.png).
  4. In the Images field, click Click to Add. A Choose an Image File page opens.
  5. Click choose a file and upload the company's logo.

When you have created the Image record, you can use the file in an email notification's HTML template, like this:

<img src="company_logo.png" width="<yourimagewidth>" height="<yourimageheight>" />

The notification will look in Image records for an image whose name matches the src attribute.

Warm Regards,

Shubham Bongulwar

Please mark helpful or correct if it helps!!!