- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi, I am currently working on integrating SN with email. In this case, I have a group call HR with their group email, I want to make an inbound action to create a custom HRcase record but I am stuck at the action trigger. I want the action to run when the recept is HR's group email instead of a fixed email so I don't need to update the action config everytime they change their email. Is it possible with the execution condition field?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
It's possible in the scripted condition field. You have access to the target record with the current variable. You might fit the script in the field or you can create a script include that returns the email address of the group
email.recipients.indexOf(new YourScriptInclude().getHRGroupEmail(current.getValue("assignment_group"))) > -1;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
It's possible in the scripted condition field. You have access to the target record with the current variable. You might fit the script in the field or you can create a script include that returns the email address of the group
email.recipients.indexOf(new YourScriptInclude().getHRGroupEmail(current.getValue("assignment_group"))) > -1;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
since it's inbound action of type NEW you don't have access to the target record
do you want to create the HR case only when email is coming from particular email?
if yes then you can give this in condition
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader