Inbound Email Action Not working Fine in Servicenow?

siva44
Tera Contributor

Hi to All,

I have created one inbound email action  with specific condition for creation of incident and condition script like below

 

"email.subject.index("Fw:Demo Card library") == -1 && !(email.origemail == 'Alerts@group.com')"

 

But whenever i am forwared one email to servicenow with subject like FW:Demo Card library then also the inbound action triggering and with small letter for 'w' in 'Fw' then it is not triggering.

How to check the subject correctly in script

please let me known if anyone known 

1 ACCEPTED SOLUTION

Hi @siva44,

 

Looking a little more closely, not only do you need to change the 'index' to 'indexOf' as described above, can you explain what email.origemail relates to? This is not a standard column on the email table. I believe this should be 'email.from'

 

Can you try:

email.subject.indexOf("Fw:Demo Card library") == -1 && !(email.from == 'Alerts@group.com')

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.




Thanks, Robbie

View solution in original post

5 REPLIES 5

Hi @siva44,

 

Looking a little more closely, not only do you need to change the 'index' to 'indexOf' as described above, can you explain what email.origemail relates to? This is not a standard column on the email table. I believe this should be 'email.from'

 

Can you try:

email.subject.indexOf("Fw:Demo Card library") == -1 && !(email.from == 'Alerts@group.com')

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.




Thanks, Robbie