Inbound Action Not Working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
One-line summary: the inbound action code is not inserting the record (usually because required fields are missing, current.insert() is not reachable, ACLs/canCreate() blocks it, or the inbound action conditions didn’t match) — add defensive logging, ensure required fields (opened_for) and valid sys_ids, and prefer record.initialize()/insert() style to guarantee creation.
try this
Go to System Mailboxes → Inbound Actions, enable the action and Turn on logging (if available) or check System Logs → Emails to see if action matched the incoming email.
Add a simple gs.log('InboundAction hit for: ' + email.from); at top of your script to prove execution.
use this script :
var ir = new GlideRecord('interaction');
ir.initialize();
ir.opened_for = 'd71b87bec3da2d6d1339b6ce0013137'; // validate this sys_id exists
ir.chat_summary = 'received from: ' + email.origemail + '\n\n' + email.body_text;
ir.short_description = email.subject;
ir.type = 'Email';
ir.state = 'new';
ir.assignment_group = 'f07c7de7c3a7d6103d4cf973e4013191';
var sysid = ir.insert();
if (!sysid) gs.log('Interaction insert failed');
else gs.log('Interaction created: ' + sysid);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Can you check your code as it looks like you might have copied from knowledge target table and not applicable to interaction table. Refer below for out of box inbound email action for interaction table, try to replicate for your action and test it.
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If I kept the type as NEW in the same inbound email action,then it is working fine.It is creating the Interaction.But it is not working for the type Forward.Iam getting the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Please see if below helps
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0538137
Try to use inbound email flow rather than inbound email action and see if it works.
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan