- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 07:46 AM
If I a not giving any condition in When to run section, and directly giving condition in script, it is still creating an incident.
I want to put condition if email is not from particular domain, incident should be created . How can i check this condition in When to run section only?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 10:06 AM
Hi @Bhawana Tomar ,
You can use email filters to ignore the emails
you can also block it based on the domain
You can also use the condition field in the Inbound email action
Ignore if the email came from gmail.com
email.from.indexOf("@gmail") == -1
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 07:58 AM
Hi @Bhawana Tomar ,
In the inbound action, you can add below condition to exclude emails from other domains
if (email.origemail.indexOf('@calstate.edu')>-1)//update with your email id
{
return false;
}
(or)
Please refer to below thread:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0659203
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 09:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 10:06 AM
Hi @Bhawana Tomar ,
You can use email filters to ignore the emails
you can also block it based on the domain
You can also use the condition field in the Inbound email action
Ignore if the email came from gmail.com
email.from.indexOf("@gmail") == -1
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2024 09:18 AM - edited 03-16-2024 09:19 AM
Hi @Bhawana Tomar ,
Seem like you want to restrict certain domains from creating incidents. to do so you can allow only certain domain to process inbound using system property.
go to inbound email properties from navigator and from available properties of inbound enter the domain on which you want to allow the inbounds to be created.
i hope this helps..
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....