<?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>topic Re: How to send report to different user based on SPLUNK query in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406618#M9738</link>
    <description>&lt;P&gt;Hi, yo ucan sort of roundabout implement this through alerts&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.1/Alert/Emailnotification"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.1/Alert/Emailnotification&lt;/A&gt; &lt;BR /&gt;
This allows you to pass the To field dynamically through the  $result.recipient$ token&lt;BR /&gt;
Now,assuming that there is only 1 unique row per email address, you can set up an alert to run for each search result AND pass the 'TO' email address dynamically. I am sure you have access to the alert documentation, it is worth a try&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jun 2018 11:44:29 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2018-06-28T11:44:29Z</dc:date>
    <item>
      <title>How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406617#M9737</link>
      <description>&lt;P&gt;I have a SPLUNK query that generate following table:&lt;/P&gt;

&lt;P&gt;User_Name    Number                 recipient&lt;BR /&gt;
 user_a               10                  &lt;A href="mailto:user_a@mail.com" target="_blank"&gt;user_a@mail.com&lt;/A&gt;&lt;BR /&gt;
 user_b               20                  &lt;A href="mailto:user_b@mail.com" target="_blank"&gt;user_b@mail.com&lt;/A&gt;&lt;BR /&gt;
 user_c               30                  &lt;A href="mailto:user_c@mail.com" target="_blank"&gt;user_c@mail.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;how can i achieve for each recipient only receive email contains its records? like &lt;A href="mailto:user_a@mail.com" target="_blank"&gt;user_a@mail.com&lt;/A&gt; only receive following:&lt;BR /&gt;
    User_Name          Number&lt;BR /&gt;
        user_a                   10&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406617#M9737</guid>
      <dc:creator>twtyj</dc:creator>
      <dc:date>2020-09-29T20:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406618#M9738</link>
      <description>&lt;P&gt;Hi, yo ucan sort of roundabout implement this through alerts&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.1/Alert/Emailnotification"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.1/Alert/Emailnotification&lt;/A&gt; &lt;BR /&gt;
This allows you to pass the To field dynamically through the  $result.recipient$ token&lt;BR /&gt;
Now,assuming that there is only 1 unique row per email address, you can set up an alert to run for each search result AND pass the 'TO' email address dynamically. I am sure you have access to the alert documentation, it is worth a try&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 11:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406618#M9738</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-06-28T11:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406619#M9739</link>
      <description>&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1794/"&gt;sendresults&lt;/A&gt; may help here&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 01:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406619#M9739</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2018-06-29T01:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406620#M9740</link>
      <description>&lt;P&gt;Indeed this is the right command to do such a thing, here is an example :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Base search here 
| map search="| sendemail to=$recipient$ subject="words here" from=splunk@company.com message="We have this $Number$ for you""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here are more examples &lt;A href="https://answers.splunk.com/answers/186045/how-can-i-use-a-combination-of-map-and-sendemail-t.html"&gt;https://answers.splunk.com/answers/186045/how-can-i-use-a-combination-of-map-and-sendemail-t.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 01:29:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406620#M9740</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-06-29T01:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406621#M9741</link>
      <description>&lt;P&gt;Hi Mus,&lt;/P&gt;

&lt;P&gt;I try your query but failed, the result is empty.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 02:42:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406621#M9741</guid>
      <dc:creator>twtyj</dc:creator>
      <dc:date>2018-06-29T02:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406622#M9742</link>
      <description>&lt;P&gt;This is from another Q&amp;amp;A:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/399434/send-emailed-results-to-an-email-address-in-the-re.html#answer-399515"&gt;https://answers.splunk.com/answers/399434/send-emailed-results-to-an-email-address-in-the-re.html#answer-399515&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you need to send a contextually-appropriate subset of results to some people, you can skip the configuration-based email settings and do this in SPL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | outputlookup TempFile.csv
| stats values(Email_Address) AS emailToHeader | mvexpand emailToHeader
| map search ="|inputcsv TempFile.csv | where Email_Addresss=\"$emailToHeader$\"
   | fields - Email_Address
   | sendemail
      sendresults=true inline=true
      server=\"Your.Value.Here\"
      from=\"Your.Value.Here\"
      to=\"$emailToHeader$\"
      subject=\"Your Subject here: \$name\$\"
      message=\"This report alert was generated by \$app\$ Splunk with this search string: \$search\$\""
| where comment="MakeSureNoEventsRemail"
| append [|inputlookup TempFile.csv]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Jun 2018 15:38:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406622#M9742</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-06-30T15:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to send report to different user based on SPLUNK query</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406623#M9743</link>
      <description>&lt;P&gt;Hi there, well you need to adapt the example to match your fields in the events &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 00:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-send-report-to-different-user-based-on-SPLUNK-query/m-p/406623#M9743</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-07-02T00:58:20Z</dc:date>
    </item>
  </channel>
</rss>

