Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Inbound action regex condition

JMHSN
Tera Contributor

I created an email inbound action to respond to customers who ask for a Distribution list or a DL with a link. 

I want the inbound action to catch DL in the subject line but not the word MIDDLE for example, so I added a regex condition, (\s{0,3}DL\s{0,3}).

 

This works fine to weed out MIDDLE and catch DL but if I have a space before or after DL "I need a DL created", it doesn't catch it. Does anyone have any ideas? I'm not a developer so I'm looking for a simple solution as I will be creating many of these inbound actions. 

 

Thanks

1 ACCEPTED SOLUTION

Hi, to combine 2 conditions you would use AND && or OR ||

So something like for the OR version

email.subject.toLowerCase().indexOf(' dl ') > -1 || email.subject.toLowerCase().indexOf('distribution list') > -1

 

View solution in original post

7 REPLIES 7

Hi, to combine 2 conditions you would use AND && or OR ||

So something like for the OR version

email.subject.toLowerCase().indexOf(' dl ') > -1 || email.subject.toLowerCase().indexOf('distribution list') > -1

 

That worked perfectly. Thanks so much!!

I have another question. I'm now finding that the condition field has a size limitation. I have a need to query where subject contains any of a large list of keywords. Using the format above, it looks like this (email.subject.toLowerCase().indexOf(' A3 ') > -1 || email.subject.toLowerCase().indexOf('Adobe Acrobat Pro') > -1 || email.subject.toLowerCase().indexOf(' ADP ') > -1 || email.subject.toLowerCase().indexOf('Jira') > -1)

This is about the limit but I have 30 or so other words I need to query on. Do you know of a way around this limitation?

Thanks in advance!