<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Script to send notification to different email addresses based on variable response in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3029957#M527077</link>
    <description>&lt;P&gt;I have a RITM with a list collector variable with three options, we'll go with A, B, and C for simplicity.&lt;/P&gt;&lt;P&gt;The ask is that a notification is sent that includes all stakeholders so they can reply all and keep a chain of questions/comments together. I built a custom workflow already as they asked for this notification after the first task is closed and fire at the same time as the second (attached pic)&lt;/P&gt;&lt;P&gt;The problem is each option has a slight variance of email addresses.&amp;nbsp; If A is selected a notification needs to a group of email addresses, lets go with groups 1, 2, and 3.&amp;nbsp; If B, 1, 2, and 4.&amp;nbsp; If A and B 1, 2, 3, and 4. If c, 2, 3, 5, 6 and if all selected then email to 1-6.&lt;/P&gt;&lt;P&gt;I am struggling on how to make this work, a script in workflow somehow, a business rule, someone figure a way to pass the string from workflow to a decision table?&lt;/P&gt;&lt;P&gt;All of the above I am not great at yet or know much about as I'm a youngling in my Admin/DEV career.&amp;nbsp; Any suggestions would be appreciated!&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2024 13:58:41 GMT</pubDate>
    <dc:creator>Michelle P</dc:creator>
    <dc:date>2024-08-28T13:58:41Z</dc:date>
    <item>
      <title>Script to send notification to different email addresses based on variable response</title>
      <link>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3029957#M527077</link>
      <description>&lt;P&gt;I have a RITM with a list collector variable with three options, we'll go with A, B, and C for simplicity.&lt;/P&gt;&lt;P&gt;The ask is that a notification is sent that includes all stakeholders so they can reply all and keep a chain of questions/comments together. I built a custom workflow already as they asked for this notification after the first task is closed and fire at the same time as the second (attached pic)&lt;/P&gt;&lt;P&gt;The problem is each option has a slight variance of email addresses.&amp;nbsp; If A is selected a notification needs to a group of email addresses, lets go with groups 1, 2, and 3.&amp;nbsp; If B, 1, 2, and 4.&amp;nbsp; If A and B 1, 2, 3, and 4. If c, 2, 3, 5, 6 and if all selected then email to 1-6.&lt;/P&gt;&lt;P&gt;I am struggling on how to make this work, a script in workflow somehow, a business rule, someone figure a way to pass the string from workflow to a decision table?&lt;/P&gt;&lt;P&gt;All of the above I am not great at yet or know much about as I'm a youngling in my Admin/DEV career.&amp;nbsp; Any suggestions would be appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 13:58:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3029957#M527077</guid>
      <dc:creator>Michelle P</dc:creator>
      <dc:date>2024-08-28T13:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script to send notification to different email addresses based on variable response</title>
      <link>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3030056#M527090</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/6891"&gt;@Michelle P&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;for similar kind of issue, please refer to the below link:&lt;BR /&gt;&lt;A href="https://www.servicenow.com/community/itsm-forum/send-notification-based-on-a-variable-response/td-p/883934" target="_blank"&gt;https://www.servicenow.com/community/itsm-forum/send-notification-based-on-a-variable-response/td-p/883934&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If it is helpful, please mark it as helpful and accept the correct solution.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Thanks &amp;amp; Regards,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Abbas Shaik&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 15:13:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3030056#M527090</guid>
      <dc:creator>abbasshaik4</dc:creator>
      <dc:date>2024-08-28T15:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Script to send notification to different email addresses based on variable response</title>
      <link>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3030125#M527094</link>
      <description>&lt;P&gt;I read that post and I would need 7 different if conditions on the workflow which I felt was excessive and impractical which is why I was trying, or thought a better answer, to potentially do a single script somehow where it say if variable X is option A send to these people, else&amp;nbsp;if variable X is option A and B send to these,&amp;nbsp;if variable X is option B send to these,&amp;nbsp;if variable X is option C send to these and so on to include each potential combination&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 16:07:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3030125#M527094</guid>
      <dc:creator>Michelle P</dc:creator>
      <dc:date>2024-08-28T16:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Script to send notification to different email addresses based on variable response</title>
      <link>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3030192#M527096</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is you List collector variable referring to a OOB or custom table?&lt;/P&gt;&lt;P&gt;My simple solution would be like:&lt;/P&gt;&lt;P&gt;1. Create a new String field in your referenced table called group emails.(or use existing if you have any unused field).&lt;/P&gt;&lt;P&gt;2. In the new field give all the emails with comma separated .&lt;/P&gt;&lt;P&gt;For Example: For A option input your 1,2,3 email address&lt;/P&gt;&lt;P&gt;Similarly do for all the options&lt;/P&gt;&lt;P&gt;3.Write a script in workflow to trigger the event&amp;nbsp; -&lt;/P&gt;&lt;P&gt;GlideRecord its table and get the values you created for the corresponding options ,Push in a array and get unique values&lt;/P&gt;&lt;P&gt;Parse that value to event.parm1-so you ill get the recipients list for notifications&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please mark my answer helpful/correct if it resolved your query&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 17:46:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/script-to-send-notification-to-different-email-addresses-based/m-p/3030192#M527096</guid>
      <dc:creator>Ramz</dc:creator>
      <dc:date>2024-08-28T17:46:40Z</dc:date>
    </item>
  </channel>
</rss>

