
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 04:16 PM
Hi,
We are sending out automatic emails for scheduled reports, and would like to allow users to reply to that email if they have questions or want to raise an incident about that report. When they reply to the email, Service Now ignores the email with this error message "watermark's target table 'sysauto_report' does not match any Inbound Action table, setting to 'Ignored' state"
I would like to create a new inbound action to accommodate this. The inbound action should create a new incident based on that email received, not a new report. If I do a current.insert() I believe it would just insert a new report since the table is sysauto_report. How do I create a new incident or call the inbound action for the incident table passing the email that I am processing.
Any help is appreciated.
Thank you very much,
Monette
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 04:58 PM
Hi Monette,
Just a thought off the top of my head, could you initialize a new GlideRecord on the Incident table as part of the Inbound Email action on the systauto_report table
i.e.
if (current.getTableName() == "sysauto_report") {
var rec = new GlideRecord("incident")
rec.initialise();
rec.short_description = email.subject
//add additional fields here
rec.insert();
I just tested the above in test and seems to create the Incident ok! Just populate it with what your after!
Hope this helps!
- Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 04:58 PM
Hi Monette,
Just a thought off the top of my head, could you initialize a new GlideRecord on the Incident table as part of the Inbound Email action on the systauto_report table
i.e.
if (current.getTableName() == "sysauto_report") {
var rec = new GlideRecord("incident")
rec.initialise();
rec.short_description = email.subject
//add additional fields here
rec.insert();
I just tested the above in test and seems to create the Incident ok! Just populate it with what your after!
Hope this helps!
- Scott

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2014 12:10 PM
Thanks so much for your reply, Scott.
May I know where you added this code to? I tried two things and both didn't work.
First one I tried was I added a new inbound email action where target table is sysaut_report and condition is current.sys_class_name == "sysauto_report". I added this script for this:
gs.log("Adding incident from a reply of automated scheduled report");
var rec = new GlideRecord("incident");
rec.initialise();
rec.short_description = email.subject;
//add additional fields here
rec.insert();
gs.log("reply inserted email subject: " + email.subject);
I can see both logs for "Adding incident from a reply of automated scheduled report" and "reply inserted email subject ..." which means that the script was able to execute.
However, it doesn't create a new incident, though. I checked for the logs of the email processed I see these lines among others:
Skipping '[ITSM] Create Incident', email is type 'reply', which does not match Inbound Email Action's type 'new' | |
Skipping 'Update Incident (BP)', email is a reply, and the record it matches is not in the Inbound Email Action's table |
Skipping 'Create Incident when replies to scheduled reports received', did not create or update sysauto_report
Second one I did was to add your entired code to my update incident inbound email action for incident. I removed the other inbound action that I added above, but I got this in the logs:
watermark's target table 'sysauto_report' does not match any Inbound Action table, setting to 'Ignored' state
May I know which part you added your code in, please. Which inbound action and what are the parameters? Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2014 04:56 PM
Hi Monette,
I'm a little surprised the first thing you tried didn't create an Incident (its what I did in my DEV environment) - whilst the Email processed didn't indicate that an Incident was created, when I checked the Incident table it was inserted. If the Script Log made it to the second statement then it should have inserted the Incident record. Could you modify your second script log statement to include the Incident Number?
The second option you tried wont work because it was trying to match the watermark with a watermark generated by the Incident table rather than the watermark generated by the sysauto_report table - hence a mismatch.
I would create a fresh Inbound Email Action on the sysauto_report table of type Reply. This will allow ServiceNow to match the reply with a Watermark on the Sysauto_report table that the outbound email would have been sent from.
Name: Report Replies
Type: Reply
Target Table: Automated Report [sysauto_report]
Business Rule:
if (current.getTableName() == "sysauto_report") {
gs.log("Adding incident from a reply of automated scheduled report");
var rec = new GlideRecord("incident");
rec.initialise();
rec.short_description = email.subject;
//add additional fields here
rec.insert();
gs.log("reply inserted email subject: " + email.subject + " of Incident " + rec.number);
I've justed tested this in my Development environment and the Script Log statement did spit out the Incident number that it created - so it seems like it is working correctly. Once you can confirm this, I'm sure there is a way to update the inbound email log to spit out the Incident number, rather than just saying did not update or create any records in sysauto_report.
Give it a shot and let me know
Cheers
- Scott

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2014 04:27 PM
Hi Scott,
Thanks for your reply. I can see that it did create an incident from the incident number displayed in the logs. However, the target in the email record received for the reply is blank. This is where I usually check for the record created from the incoming email that is why I thought none was being created. However, it seems that the incident was created and that is all that matters. Thanks so much for your help with this. I appreciate it
Regards,
Monette