<?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: Splunk Scheduled PDF - Use token on mail subject in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326401#M9430</link>
    <description>&lt;P&gt;Instead of setting a token in the XML of the report, try using a token with the sendemail command. &lt;BR /&gt;
 i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;query&amp;gt;my_search_here
 | eval fstatus=if(AAA==BBB AND CCC==DDD  , "SUCCESS","ERROR")
 | fields fstatus
 | sendemail to=someone@somewhere.net sendpdf=t subject=$result.fstatus$&amp;lt;/query&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 11 Apr 2018 04:12:53 GMT</pubDate>
    <dc:creator>masonmorales</dc:creator>
    <dc:date>2018-04-11T04:12:53Z</dc:date>
    <item>
      <title>Splunk Scheduled PDF - Use token on mail subject</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326400#M9429</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;

&lt;P&gt;I have a scheduled PDF delivery mail, where I want to manipulate the mail subject, using a mail token. Basically, I want to add the word SUCCESS or ERROR, to the mail subject.&lt;/P&gt;

&lt;P&gt;To achieve this, on my dashboard, I am using a global search, where I am creating a token, using the following code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search id="get_status_token"&amp;gt;
    &amp;lt;query&amp;gt;my_search_here
| eval fstatus=if(AAA==BBB AND CCC==DDD  , "SUCCESS","ERROR")
| fields fstatus&amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;-1d@d&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;@d&amp;lt;/latest&amp;gt;
    &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;set token="fstatus"&amp;gt;$result.fstatus$&amp;lt;/set&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the EDIT PDF SCHEDULE menu, I adding the following code as Subject&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TEST $fstatus$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but the email does never display the value of the token in the subject.&lt;/P&gt;

&lt;P&gt;Can someone help me find what am I missing?&lt;/P&gt;

&lt;P&gt;NOTE: I am using the token in the email subject and not in the PDF.&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 19:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326400#M9429</guid>
      <dc:creator>nuaraujo</dc:creator>
      <dc:date>2018-04-10T19:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Scheduled PDF - Use token on mail subject</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326401#M9430</link>
      <description>&lt;P&gt;Instead of setting a token in the XML of the report, try using a token with the sendemail command. &lt;BR /&gt;
 i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;query&amp;gt;my_search_here
 | eval fstatus=if(AAA==BBB AND CCC==DDD  , "SUCCESS","ERROR")
 | fields fstatus
 | sendemail to=someone@somewhere.net sendpdf=t subject=$result.fstatus$&amp;lt;/query&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Apr 2018 04:12:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326401#M9430</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2018-04-11T04:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Scheduled PDF - Use token on mail subject</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326402#M9431</link>
      <description>&lt;P&gt;Thanks @masonmorales for the quick reply, but since in this dashboard I have 3 different searches, this would require at least 3 mails.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 07:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-Scheduled-PDF-Use-token-on-mail-subject/m-p/326402#M9431</guid>
      <dc:creator>nuaraujo</dc:creator>
      <dc:date>2018-04-11T07:24:13Z</dc:date>
    </item>
  </channel>
</rss>

