- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 10:14 AM
Hi All,
I have to write a script for inbound email action if subject contains 3 key words like xyz, abc & pqr then the ticket will assign to the particular group. Can anyone please let me know how to do this ?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2023 10:38 AM
Hi,
Yes, that will work. One suggestion would be to convert the subject to lowercase, just incase they use ABC instead of abc...with your current script, it would miss that.
email.subject.toLowerCase().indexOf('abc') > -1 would be better.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 12:51 AM - edited 03-07-2023 12:54 AM
Yes this will work indeed. You can also extend the condition with other things, like "from email address + subject is".
I did something like that a few days ago. Maybe not needed, but see here below for the topic:
https://www.servicenow.com/community/incident-management-forum/help-wanted-with-extending-part-of-in...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2023 07:51 AM
Can you please suggest how to assign a assignment group based on subject line in flow designer, as we are adding different subjects into single inbound using OR condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2023 02:14 AM - edited 04-20-2023 02:16 AM
Hi Navya,
Using Flow Designer to achieve good inbound email processing can be hard.
It's difficult to configure Flow Designer to mark the email "as read" at Exchange/Outlook, to prevent the same email being imported again. So you should figure out that first if you have not done yet.
That aside, for what you want, there are more ways to Rome, here for example (a part) of a possible solution:
First step: define trigger.
Identify mailbox from which you want to import and process your email further.
Second step: define wanted action.
Create Incident (or task, etc.).
Third step: update created Incident/task/etc.
Here you define the Assignment Group per Subject. You can use OR/AND in your IF statement to combine more keywords.
Fourth step: process your IF statement by updating your record (your created Incident for example).