Reporting

custom Email Templates with dynamic search results? can it be done?

PatrickButterly
Explorer

Hey Hoping somebody has a clean answer to this.
Basically I have a search generating data to turn into an alert that ends in:

| table Group email Values | map search="| sendemail to= $email$ subject=Update message=$Values$"

The powers that be command certain styling on this email message not simply the values. After combing through many posts I haven't really found a straight answer. Ideally I would have a template email (template.html) that i could import and replace a part of it with the values. someting like
| eval emessage=getTemplate(template.html).replaceregex("x", "$Values$") | map search="| eval emessage=getTemplate(template.html).replace("replaceMe", "$Values$") | sendemail to= $email$ subject=Update message=emessage"

I get that is a bit of a stretch, but has anybody been able to achieve something like that? or is the only option to write a script and work it through that
Thanks

0 Karma
1 Solution

PatrickButterly
Explorer

So after much research and work I found the only way to do this is to build out a new command with a sendmail function that will generate a templated email

View solution in original post

0 Karma

PatrickButterly
Explorer

So after much research and work I found the only way to do this is to build out a new command with a sendmail function that will generate a templated email

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...