Update ticket based on Email description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 02:50 PM
Hi All,
We currently get service status update email from a vendor when their service is down, and another email when service is back up.
The vendor email provides a ticket number (from their own system) in the emails subject, and when the service issue is resolved ,they include the original ticket number and the word "done" in the email subject.
Rather than having two tickets creating, I would like to have the second ticket (resolution ticket - "done") to be appended to the original ticket.
I was thinking about doing this using Inbound Emails Actions, but I am not familiar with it. I hope you can either assist or provide an alternative solution.
With Inbound Email action how do filter based on external emails (non-ServiceNow account emails). I am currently getting in "invalid reference error", and I I assume I will have to create an account to resolve it.
Thank you.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 03:10 PM
Hello lqbal,
Flow Designer would perfectly solve your requirement in this case.
You need to create a trigger which is "Created" on sys_email table and the condition would be "subject starts with " the text you want here" You could add recepients, To etc as condition as well but I am just giving an example for flow designer use case. The screenshot is below for your reference.
Then you would go to the actions to update Incident (under ServiceNow Core Spoke) with the updated fields from email subject / body such as number, status, description, assigned to etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 05:58 PM
I will take a look into it. I think I will have to write a script to accomplish though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2020 08:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2020 11:27 AM
Thank that actually helps.
To give you some context:
1. We receive an email from a Vendor with the Vendors ticket number (Format: #123456) that an issue has occurred with the Vendors service. Example:
Email Subject: "[Service Down] #123456"
2. We receive a second email from the same vendor saying the issue has been resolved. Example:
Email Subject: "[Service Down] #123456 done"
3. I would like to update he ticket created from "1." with the contents of ticket "2." and close ticket "2.", or make ticket "2." a child of "1."
When an email that contains in its subject the word "done", I am attempting to search for the ticket in created in "1." by extracting the ticket number "#123456" using a regex which works fine, but for someone reason when I create a query it returns blank for the when printing target.number.
I had the same output in the inbound action, so I tested in the background scripts page
var target = new GlideRecord('incident');
var regex = /#\d{6}/;
var subject = "Poke #123456 done";
var ticket = subject.match(regex);
target.addQuery('short_description', 'CONTAINS', ticket);
target.query(); // Issue the query to the database to get all records
while (target.next()) {
// add code here to process the incident record
gs.print(target.number);
}