Inbound Action to trim inbound email

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2009 09:18 AM
I'm looking for a way to trim either the activity history on an outbound message or the incoming reply.
Our company is email happy and this has cause some problems. By default, adding ${comments} to a mail notification includes everything. As a result, someone who hits reply, sends all that stuff back and it gets add to the activity history. When an itil person adds a comment to an incident, for example, the notification is now exponentially longer and longer and longer. After a dozen responses back and forth, the activity history becomes useless.
Does anyone have any suggestions how to control these really long tickets (other than telling people to manage their replies better)?
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2009 04:17 PM
FWIW, The Email property "For reply emails, discard everything below this text..." did the trick. I added the replaced the "--Original Text--" with the proper delimiter and it worked perfectly. No more 10 mile long activity histories (unless there is a whole lot of activity.
Thanks for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2013 10:52 AM
The script works but it started to screw up targets for the incoming emails in service-now's inbox, hence no tickets are getting updated.
It worked for sometime, then for awhile, target became blank. I don't see what's wrong with this?
var resp = email.body_text.indexOf('From: ');
current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text.substring(0,resp);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2013 03:59 PM
If the "discard below this text" email property doesn't work, you'll have to use regular expressions to exclude the "Ref:MSG0044568" watermark info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2013 12:47 PM
What if there's no watermark on the emails? Just a simple email reply? Pls help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2013 04:18 PM
Sorry, I don't understand what you're looking to do. Can you explain?
Per the wiki:
The email contains one of the following conditions and the table specified in the email matches the table of the inbound action:
1. A valid watermark that matches an existing record.
2. An In-Reply-To email header (when no watermark is present) that matches an existing record.
3. A subject line starting with a recognized reply prefix (when neither a watermark nor an In-Reply-To header is present) and a valid record number that matches an existing record.
Source: http://wiki.servicenow.com/index.php?title=Inbound_Email_Actions#Matching_Incoming_Email_to_an_Inbound_Action_Type