Email Flow Designer Trigger Set to lowercase

Chad Wilhelm1
Tera Expert

Hello,

I would like to know how to lowercase recipients for email trigger on flow so we do not have to put 2 or conditions.   IE ABC@123.com OR abc@123.com.   I see string transforms on the actions but not the triggers. 

find_real_file.png

8 REPLIES 8

sekhar kurumoju
Mega Guru

Hai Chad Wilhelm,

 

In this case there is on other solution if in case it is sting type(fx) you can ignore case sanative .

 

find_real_file.png

Please mark reply as Helpful/Correct, if applicable. Thanks!

 

Mayank Das
Tera Contributor

Hi @Chad Wilhelm1, in order to make the inbound emails case insensitive, we can create a before insert BR on the sys_email table to make the email to lowercase before it is processed by ServiceNow.

 

MayankDas_0-1714134320063.png

 

MayankDas_1-1714134327503.png

 

Using the BR, the inbound email will first be converted to lowercase and then the corresponding record will either be created or updated depending on your flow.

 

Please mark my answer correct if you find it useful.

 

Thanks & Regards

Mayank Das

 

 

If you are using flow designer to fill the role of inbound actions, the flow trigger looks at the 'To' field (system name 'direct').

 

To cover both scenarios use

 

(function executeRule(current, previous /*null when async*/) {

	current.setValue('recipients' , current.recipients.getValue().toLowerCase());
	current.setValue('direct' , current.direct.getValue().toLowerCase());

})(current, previous);

ZacharyB3535501
Tera Expert

If you are using flows to fill the role of inbound actions, the trigger will look at the 'To' field (system name 'direct'), so to cover both fields where the address is held, use:

 

(function executeRule(current, previous /*null when async*/) {

	current.setValue('recipients' , current.recipients.getValue().toLowerCase());
	current.setValue('direct' , current.direct.getValue().toLowerCase());

})(current, previous);