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

Implementing flow designer instead of inbound email action

divyadhanda
Giga Guru

I am trying to create flow designer whenever an email comes from a particular email address it should create incident based on the email content. I used trigger as inbound email and condition as Subject contains "Some text" (as we dont have from field).  Then, in the if the condition, I used from address with the email id which is required.

divyadhanda_1-1788509667927.png

divyadhanda_2-1788509862377.png

 

But, I dont have any emails from the particular email id in the exisitng email logs, I created email manually and tried to test flow but if condition always executes as false.

divyadhanda_3-1788510004946.png

 

I believe there is no from column in the sys_email table.

 

Please help.

 

 

 

8 REPLIES 8

@divyadhanda maybe a silly question but is the flow published? There's a red bubble in the top tab.

 

Another thing that you can try is the Test/Debug button in the Workflow stuido (it's in the top-right area, around the zone where your screenshots ends) and/or to validate the condition - remove it completely so it shall be triggered always, that gives you idea whether it's issue with the condition as such or just the particular email address is not accepted for whatever reason.

 

Also, what are the actions in the step 2 and below? Does it log or updates anything? Perhaps it might be working just doesn't do anything so it seems it's not working..

 

 


✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---

It is published.

 

Below are the emails i have created via background script in the non prod instance but it is not going to the if the condition. 

var emailGr = new GlideRecord('sys_email');
emailGr.initialize();

// 1. Force the critical System Parameters
emailGr.type = 'received';
emailGr.state = 'processed';

// 2. THE COMMUNITY WORKAROUND: Explicitly force lower-case database cells
emailGr.setValue('from', 'posdt-alerts@discounttire.com');
emailGr.setValue('user_id', 'posdt-alerts@discounttire.com');

// 3. Inject standard visible content
emailGr.subject = 'POSDT Sale GK';
emailGr.body = 'Store: 1048\nPosting Date: 08/27/2026\nPOS Number: 9991\nTransaction No: 1\nBusiness Type: Sales Movement\nError Message: POS transaction for 01.06.2026 already exists.';
emailGr.headers = 'From: posdt-alerts@discounttire.com\nSubject: POSDT Sale GK 1048 08/19/2026 POS 9991 Txn 1';

// 4. Save record
var emailSysID = emailGr.insert();
gs.print('### Brand New Simulation Email Log Created! Sys_ID: ' + emailSysID);

 

divyadhanda_0-1788521789812.png

 

divyadhanda_1-1788521904920.png

 

 

 

Is it not considering the from address in the email??

 

Dr Atul - LNG
Tera Patron

Is it in PDI or the client instance? If it’s in PDI, then it’s not working. In that case, could you please confirm the email in PDI and set up the account? @divyadhanda 

****************************************************************************************
Regards
Dr Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************

HarishKumar6668
Kilo Sage

Hi @divyadhanda ,

From your second screenshot, specifically the Flow Execution, I assume that the From Address is not being retrieved.

Could you please log the From Address value and verify whether it is being retrieved or it is empty?

Regards,
Harish