Email Template vs Email Notification vs Business Rule

TALENAJ
Tera Contributor

I'm trying to setup an email notification that will notify the Incident Technicians group that a new Incident has been submitted by an email sent to our support email address. 

 

What I would like the email body sent to technicians to contain:

Requested for: (person who sent the email)

Description: (text as it appears in the body of the email that the user sent to our support email address)

 

I understand "${short_description}" is a different variable, and I do not want the short description, I would like the body of the email to appear in the email notification.   I don't have the  $ variable name for the body of the email as it should appear in the notification sent to technicians. 

Also, the requested for line "${requested_for}" is appearing blank in the notification as well.

 

Below I have included screenshots that show what the user sent, what the technician received, what I would like to see, and the HTML I have configured.

 

Any time I try to look up how to get this set up correctly I get redirected to Email Template, Email Notification, or Business Rule. I'm not sure where this needs to be setup. 

 

Thank you in advance for any help you can provide me. 

2 ACCEPTED SOLUTIONS

Easiest option is to select the "field actions" tab and set the description to email body text. 

 

But you can add to your script by using 

 

current.description = email.body_text

View solution in original post

It's really hard to remove signatures as they can appear in many formats, styles, and wording. 

 

You could try what's mentioned in the below article and tailor it to your needs. 

 

https://www.servicenow.com/community/servicenow-ai-platform-articles/remove-email-signatures-from-in... 

View solution in original post

7 REPLIES 7

Kieran Anson
Kilo Patron

Hi,

requested_by is the field on a request. The field you're wanting is caller_id. If you're unsure of the field, use the "fields" selection option to the write of the text area to look at all fields available. 

 

To simplify your requirement you could populate the description of the incident with the body of the email. 

 

There will be an inbound action that is creating the incident record. You'd modify this to populate the incident correctly 

TALENAJ
Tera Contributor

Thank you Kieran! This information is very helpful and I have modified to add the caller_ID

I have this code in our Inbound email action "Create Incident". Where can I modify to include the text of the email body?

//  Note: current.opened_by is already set to the first UserID that matches the From: email address

current.caller_id = gs.getUserID();
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;

current.category = "inquiry";
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";

if (email.body.assign != undefined)
   current.assigned_to = email.body.assign;

if (email.importance != undefined) {
   if (email.importance.toLowerCase() == "high") {
        current.impact = 1;
        current.urgency = 1;
   }
}

if (current.canCreate())
    current.insert();

Easiest option is to select the "field actions" tab and set the description to email body text. 

 

But you can add to your script by using 

 

current.description = email.body_text

TALENAJ
Tera Contributor

This did the trick! Again, thank you for your help. 

 

One last question, is there a way to strip the signature out of the body of the email so it doesn't get added to the incident "Description" and the email received by the technician? It contains text and pictures and the email ends up looking very strange (as seen in the attachment).