-
Notifications
You must be signed in to change notification settings - Fork 184
[ResponseOps][9.3 & Serverless]: Scheduled reports new email fields and Mustache support #4161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Vale Linting ResultsNo issues found on modified lines! |
🔍 Preview links for changed docs |
| * **Message**: Keep the default email message, or enter your own. | ||
| ::::{note} | ||
| In the subject and message, you can use the [Mustache](https://mustache.github.io/mustache.5.html) template syntax (`{{variable name}}`) to dynamically pass values from data sources when the email is generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umbopepato we may need to define the list of variables that users can select for the email subject and message, especially if they're not clearly defined in the UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooo good question. @umbopepato can you help with this question? ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@umbopepato we may need to define the list of variables that users can select for the email subject and message, especially if they're not clearly defined in the UI.
Variables are listed, with descriptions, in the picker just above the subject and message fields. In case we want to list the available vars in the docs as well, here's the data model we use to render the picker.
Does this also apply? https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts/rule-action-variables#enhance-mustache-variables
Good point @bmorelli25! Yes, we're using the same Mustache rendering functions as in actions, so the same lambdas are available.
@nastasha-solomon shall we specify that the message field also supports Markdown? It has implications on how Mustache is compiled, since a dedicated escape strategy is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we specify that the message field also supports Markdown? It has implications on how Mustache is compiled, since a dedicated escape strategy is used.
Yes! Can you share the method of escaping markdown in mustache templates?
benironside
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple minor edits! Otherwise copy edit LGTM
explore-analyze/report-and-share/automating-report-generation.md
Outdated
Show resolved
Hide resolved
explore-analyze/report-and-share/automating-report-generation.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
umbopepato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 💯
Summary
Fixes #4027 by adding docs for the new email notification fields that were added for scheduled reports.
Generative AI disclosure
Preview