Inbound Email Action

JP6
Tera Contributor

Hi All,

We have an inbound action that creates incident, we want to restrict this inbound action to execute only when the users are external .We have tried to restrict using the userid. email contains in the filter but find that the inbound email action is still executing . Need assistance

3 REPLIES 3

Aylee Andersen
Kilo Sage

Hi @JP6,

 

Could you explain what would qualify the user as an "external" user in your use case? Also, could you please provide a screenshot of your inbound action?

 

Thanks,

- Aylee

We are using email address to qualify the user as external/internal . Anyone with @telstra.com is internal and everyone else is external .

Amit Gujarathi
Giga Sage
Giga Sage

HI @JP6 ,
I trust you are doing great.
Here is an example script you could use in the "Condition" field of your inbound action:

(function() {
    // Check if the email object and sender's address are available
    if (email && email.origemail) {
        var senderEmail = email.origemail.toLowerCase();

        // Define the internal domain
        var internalDomain = '@telstra.com'.toLowerCase();

        // Check if the sender's email ends with the internal domain
        return !senderEmail.endsWith(internalDomain);
    }

    // If email object is not available, do not process the inbound action
    return false;
})();

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi