- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 04:48 AM
I have a requirement to send a notification to the manager of a group within a service catalog request.
Could you advise how best to achieve this with Flow Designer?
I have tried Send Email with a scripted to field with the below script however, when I have saved the flow, the script disappears
var grGroup = new GlideRecord('sys_user_group');
grGroup.query('sys_id','5cd9840a37d4dy00af525aa543990ez5');
if(grGroup.next()){
return grGroup.manager;
}
I've also tried a Send Notification action calling a notification from the Requested Item table however, it is not sending as the 'to' field is empty - I either have a problem with my mail script or it's not possible to send a notification with the 'Who Will Receive' section not completed.
Previously we have achieved this via a glide record to the user table stored as a workflow scratchpad variable in classic workflow however, we are trying to move to Flow Designer.
Any help appreciated thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 06:40 AM - edited 06-27-2023 06:42 AM
Why use a script at all? You are working in Flow Designer, so don't script unless you absolutely have to.
First do a lookup record action, and find the needed group. Then use the pillpicker, to dotwalk to the manager of the group in your Send Email action.
Another way would be to use the 'send notification' action and define the recipients in the notification record. (In that case do not forget to set the trigger of the notification to 'triggered'.
Good luck!
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2023 07:02 AM
Lookup record was what I needed - thank you!