Is it possible to have the image display in the work notes and the attachments automatically?

mania
Tera Contributor

Hi,

 

We have encountered an issue when forwarding emails to an existing case with attachments or images. While the image appears in the System Log - Emails, it does not show up in the Case Work Notes, and the attachments from the email are not being added to the case ticket. Is it possible to have the image display in the work notes and the attachments automatically added to the case ticket?

Can anyone please help on this, it will be useful.

 

Thanks!

6 REPLIES 6

GlideFather
Tera Patron

Hi @mania 

 

work notes and additional comments are text fields, there is no way to contain pictures
(perhaps if you change its type to HTML but I wouldn't recommend that)

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Ankur Bawiskar
Tera Patron
Tera Patron

@mania 

work notes and additional comments are journal types and won't support images or html tags.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Bhimashankar H
Mega Sage

Hi @mania ,

 

When forwarding or replying to an email with attachments or embedded images to a ServiceNow case.  It has some limitation like 

  • Images and attachments may show in the email log (System Log - Emails) but do not always automatically appear in the case’s work notes or as formal attachments on the ticket.

  • Embedded images (e.g., inline screenshots in the email body) can appear as [cid:image001.png] or similar references in the work notes, but the actual image preview may not display, or the attachments may not be linked to the case.
  • Attachments may be stored in the attachment tables, but unless explicitly moved, they are not linked to the case record.  Attachments are typically linked to the sys_email record, not the case unless an inbound action or business rule moves them
  • By default, ServiceNow processes inbound emails based on watermark or subject and logs the content into journal fields (such as Work Notes or Comments). Activity streams/work notes, by default, are plain text—embedded images are referenced, not rendered.

 

Making attachments automatically link to case you can have inbound email action script

var attachment = new GlideSysAttachment();
var emailAttachments = new GlideRecord('sys_attachment');
emailAttachments.addQuery('table_sys_id', email.sys_id); // attachments on the email
emailAttachments.query();
while (emailAttachments.next()) {
  attachment.copy(
    emailAttachments.getTableName(),
    emailAttachments.getUniqueValue(),
    current.getTableName(),
    current.sys_id
  );
}

This way files attached to inbound emails are copied to the actual case.

 

To display images in work notes, you need to enable rich text(HTML) jounrnal fields.(Not a recommended way). Getting images to show directly in work notes as inline content requires enabling HTML journal fields and may require specialized scripting to process embedded images from emails; otherwise, they'll show as file attachments or as references in the activity stream.

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful'. & 'Correct' Thanks!

 

 

 

@Bhimashankar H ,

Thanks for responded!

We have html field on case form if we update any text or images it is showing to the worknotes on case form.

Can we utlize the same field to see the attachments or images on worknotes in case form  from forward email.

Can you please help on this, It will be useful.

mania_0-1753187743124.pngmania_1-1753187806951.png

 

Thanks!