Target field in mails in inbound email action is empty and incident is not getting created.

purnendu
Tera Contributor

I have configured the system to create an incident whenever an email is sent to our ServiceNow instance. Specifically, I sent an email from my Gmail account to dev****@servicenowdeveloper.com with the subject line "Create Incident" and the body containing "TEST12."

However, I noticed that in the System Logs under Mail, the Target Field (Instance) is showing as empty, and no incident is being created as expected.

Could you please provide guidance on how to resolve this issue? Any insights or suggestions would be greatly appreciated. I am attaching the screenshot of it.

Thank you in advance for your assistance.

3 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@purnendu 

ideally with current.insert() it should set

don't use this line current.instance and remove it

but use these lines to set the target if it's empty

See if this works, also ensure you fill any mandatory fields on incident if there are any which are made mandatory via data policy

If you don't set the mandatory fields then system will stop the insertion

var sysId = current.insert():
sys_email.target_table = 'incident';
sys_email.instance = sysId;
sys_email.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

@purnendu 

Looks like email filter is the culprit here.

Navigate to All > System Mailboxes > Administration > Filters

Probably one of those filters are causing the issue. Check and be careful on updating those records as you might be ending up with security issues and unwanted emails.

 

Accept the solution and mark as helpful if it does.

Regards,

Sumanth

View solution in original post

@purnendu 

since your inbound email action is getting ignored, it's not creating INC and hence not populating the target field

there is already 1 OOTB inbound action on incident table of type "New", see below if that's getting processed

When you receive the email it will show the inbound actions processed on that email record.

AnkurBawiskar_0-1746521572090.png

 

If that's getting executed then is it creating INC?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

9 REPLIES 9

SumanthDosapati
Mega Sage
Mega Sage

@purnendu 

Can you share the inbound email logs. State shows received ignored so you might find the log for ignoring your inbound action.

Sure @SumanthDosapati .

@purnendu 

Looks like email filter is the culprit here.

Navigate to All > System Mailboxes > Administration > Filters

Probably one of those filters are causing the issue. Check and be careful on updating those records as you might be ending up with security issues and unwanted emails.

 

Accept the solution and mark as helpful if it does.

Regards,

Sumanth

Ankur Bawiskar
Tera Patron
Tera Patron

@purnendu 

ideally with current.insert() it should set

don't use this line current.instance and remove it

but use these lines to set the target if it's empty

See if this works, also ensure you fill any mandatory fields on incident if there are any which are made mandatory via data policy

If you don't set the mandatory fields then system will stop the insertion

var sysId = current.insert():
sys_email.target_table = 'incident';
sys_email.instance = sysId;
sys_email.update();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader