Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Which column refers "from" in sys_email table?

divyadhanda
Giga Guru

I am trying to implement inbound email action via flow designer.
I need to trigger the flow and create incident record only when i get an email from particular email address.

 

divyadhanda_0-1788944136686.png

 

Here, i am creating the emails using bg script as we dont have such emails in the dev.

Script:

var emailGr = new GlideRecord('sys_email');
emailGr.initialize();
emailGr.type = 'received';
emailGr.state = 'processed';
emailGr.from = 'posdt-alerts@discounttire.com';
emailGr.setValue('from', 'posdt-alerts@discounttire.com');
emailGr.headers = 'From: posdt-alerts@discounttire.com\nSubject: POSDT Sale GK 1048 08/19/2026 POS 9991 Txn ' + uniqueStamp;

emailGr.body = 'test.';
var emailSysID = emailGr.insert();
gs.print('### Test-Ready Email Created! Sys_ID: ' + emailSysID);
 
But, if condition is not triggered for this email.
 
Also, i am wondering there is no from column in sys_email table. Do we have any other column to identify from which email address this email has come from ?
divyadhanda_1-1788944394978.png

 

2 REPLIES 2

harishk07
Giga Guru

Hi,

 

There are two separate issues here.

 

The "from" column - sys_email does not have one. The sender address is in the headers field (email headers), and after processing it resolves into the user reference field via sys_user lookup. Your emailGr.from and setValue('from', ...) lines are ignored because that column does not exist.

 

For the flow not triggering - Flow Designer's Inbound Email trigger fires from the email processing pipeline, not from sys_email inserts. Your GlideRecord insert bypasses that pipeline. On top of that, you set state = 'processed', which tells the platform the email is already handled.

 

Find any existing received email in sys_email, edit its headers to include the From: address you want to test, then use Reprocess Email from the record's context menu. That pushes it back through the inbound pipeline and your flow trigger will evaluate.

 

For the flow condition, use the trigger's data pill for the sender and not a sys_email column.

 

 

Hope this helps. If it did, marking the reply as helpful or accepted makes it discoverable for others hitting the same issue.

Regards,
Harish K

Ankur Bawiskar
Tera Patron

@divyadhanda 

the To field contains the actual recipient and Recipients contains combination of To and CC

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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