Inbound action - subject contains 'incident' && email address contains
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 03:10 AM
I'm struggling to get an inbound action working with the condition below.
The subject must always contain incident but must match one of the email addreses.
The inbound action still triggers if it contains 'incident' but is NOT one of the email addresess.
if(email.subject.contains("incident") && email.to.toLowerCase().indexOf('systemsupport1@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport2.@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport3@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport4123@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport5@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport6@test.com') > -1) {
Labels:
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 03:14 AM
Try below
if((email.subject.indexOf("incident")>-1) && (email.to.toLowerCase().indexOf('systemsupport1@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport2.@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport3@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport4123@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport5@test.com') > -1 ||
email.to.toLowerCase().indexOf('systemsupport6@test.com') > -1)) {
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2022 03:33 AM
Thanks, but it still triggers from an email not on the list.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2022 04:26 AM
Any ideas?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 03:37 AM
Bump!