- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 01:53 AM - edited ‎12-23-2023 01:55 AM
Hello Experts,
I want to send a notification when a request is raised for a catalog item. on my catalog item, I have a list collector variable. if I select multiple users in the list collector variable I want to send a notification to all users who are in that list collector variable. (I am trying to send a notification using flow).
how can I achieve this please guide me thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 04:42 AM
Hi,
You can use below script for mail addresses.
var email=['noreply@noreply.noreply'];
var ids=new GlideRecord('sys_user');
ids.addEncodedQuery('sys_idIN'+fd_data.trigger.current.watch_list+"");//fd_data.trigger.current.watch_list you need to change this as this is as per my field on table. You can change as per you catalog variable
ids.query();
while(ids.next())
{
email.push(ids.getValue('email'));
}
return email.join(",");
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 02:53 AM - edited ‎12-23-2023 02:54 AM
Hello @Saurabh Gupta ,
I have used the send email action. for the recipient, I have dragged my catalog variables which is the list collector type.I am getting errors I have attached screenshots of it, what mistakes I am making here. please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 03:10 AM
Hi,
Can you please check if the selected users are having the email id in user table.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 03:18 AM
Hi,
To avoid validation and all, what you can do, add a fake additional email id as per below screenshot.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 04:20 AM
Hello @Saurabh Gupta , it's not working as expected. I have selected 3 users in the watchlist variable so it's sending notifications to only one user who is first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2023 04:22 AM
All three are having emails.
Let me give you some script as well. Give me 5 minutes?
Thanks and Regards,
Saurabh Gupta