attach original email to incident

greggh
Kilo Explorer

Is it possible to attach the original email that auto-generated an incident to that incident? What we see is that the body of the email is moved to the incident description, and any attachments in the email get attached to the incident.   What I'd like to do is attach the actual email itself (as an Outlook .eml, .msg, etc.) file.   By stripping out all of the embedded screenshots into pure attachments, we lose all context between the screenshots and the text.   Also, we have some InfoPath forms, and just the XSN and XML files get attached, not the actual email file, so it's impossible to forward that form/email or reply to it while keeping it intact.   What I want is for the original email itself to be attached to the incident so I can forward/reply to the formatted email without losing any context.

9 REPLIES 9

Gregg , did reach to have the original email receive as an attachment ?? It's a option on inbound action?


adrianherdan
Kilo Expert

Hello,

I've got a better solution for you if you like. A link that will show you the email along with pictures in a modal in the incident. Hope this helps!

Create a new UI Action on the Incident Table with the following code:

 

function clickPreview() {
// the following is what we have to do to make this client
// script work from a list and form, with today's code
var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;

var msg = getMessage("Preview Email");
var gr = new GlideRecord("sys_email");
gr.addQuery("instance", sysId);
gr.addQuery("mailbox", 'received');
gr.query();
if (gr.next()) {
var dd = new GlideModal("preview_email");
dd.setTitle(msg);
dd.setWidth(800);
dd.setPreference('sysparm_id', gr.sys_id);
dd.render();
} else {
alert("Email not found: " + sysId);
}
}

 

 

find_real_file.png

Thanks for this solution!  I know it's not to OP's exact needs, but this works great for me!

Del4
Tera Contributor

@adrianherdan @DBrown Im trying to use this UI Action - but im just getting the alert - Email not found - sysid

Any ideas on how to rectify this?

Thanks

Del