Facing issues with the Inbound Email Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello Community,
I'm facing an issue with an Inbound Email Action in ServiceNow.
I've created an Inbound Email Action with Action type set to "Record Action" and Type set to "Reply". I removed the condition from the Condition field and, in the Action Script, I'm simply trying to print a log for testing—but it’s not working.
Use case: When a new case is created, an email notification is sent. When we reply to that email, it should update the Additional Comments field of the corresponding case.
However, the script inside the Inbound Email Action doesn’t seem to execute. Even when I remove all logic and just try to log a message, it still doesn't work.
In the email log, I’m seeing this error: "Unable to determine origemail"
Could this be preventing the Inbound Email Action script from running?
Any help would be appreciated. Thanks!
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
there is a standard process based on which system checks which inbound action to process
Inbound email action processing
If my response helped please mark it correct along with other ones from my response so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
26m ago
Hi @Ankur Bawiskar ,
When I create a "receive" type email record in the sys_email table and then reprocess it, the following info message appears in the email logs:
"Skipping script ' Test- Reply', email is type 'new', which does not match Inbound Email Action's type 'reply'".
This message indicates that the email is being treated as type 'new', even though I’ve attached the target record while creating the email record.
I suspect I might be missing some kind of reference—either in the body or headers of the email record—that's required for it to be correctly recognized as a 'reply'.
Also, I wanted your suggestion:
Would it be a good idea to enable outbound email temporarily and use a real reply to get the correct headers and body structure for reference?
Thanks.
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15m ago
yes somewhere something is missed as config and hence it's not working.
You can enable outbound email but ensure it goes only to 1 email address so that users are not bombarded with the emails in their inbox and then test by actually replying.
If my response helped please mark it correct along with other ones from my response so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11m ago
Its giving this info message now : Test Basic Case - Reply : did not create or update table_name using current
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8m ago
We used this particular script in the inbound action script -
(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
//add CC to watchlist array
var userArray = [];
var copied = email.copied.toString().split(',');
for (var i = 0; i < copied.length; i++) {
var contact = new GlideRecord("sys_user");
contact.addQuery('email', copied[i]); //changed here
contact.query();
if (contact.next()) {
userArray.push(contact.getUniqueValue().toString());
}
}
if (current.state == 3 || current.state == 7) {
var gr = new GlideRecord('table_name');
gr.initialize();
gr.account = current.account;
gr.short_description = email.subject;
gr.description = email.body_text;
gr.contact_type = current.contact_type;
gr.u_contact_method = current.u_contact_method;
gr.impact = current.impact;
gr.state = 1;
gr.contact = current.contact;
gr.assignment_group = current.assignment_group;
gr.priority = current.priority;
gr.channel = current.channel;
gr.product = current.product;
gr.comments = "Case created from reply email to case " + current.number + " which was already closed.";
gr.watch_list = userArray.toString();
gr.insert();
} else {
current.comments = global.ReplyExtractor(email).getReply();
current.watch_list = userArray.toString();
current.update();
}
})(current, event, email, logger, classifier);
Shashank Jain