Skip to content

Commit 6efcd89

Browse files
author
Andrei Banaru
committed
feat: add action.email.sendcsv param
1 parent 093d75b commit 6efcd89

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

contentctl/objects/deployment_email.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import annotations
22

3+
from typing import Optional
4+
35
from pydantic import BaseModel, ConfigDict
46

57

@@ -8,3 +10,4 @@ class DeploymentEmail(BaseModel):
810
message: str
911
subject: str
1012
to: str
13+
sendcsv: Optional[bool] = False

contentctl/output/templates/savedsearches_detections.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ action.email.subject.alert = {{ detection.deployment.alert_action.email.subject
5555
action.email.to = {{ detection.deployment.alert_action.email.to }}
5656
action.email.message.alert = {{ detection.deployment.alert_action.email.message | custom_jinja2_enrichment_filter(detection) | escapeNewlines() }}
5757
action.email.useNSSubject = 1
58+
{% if detection.deployment.alert_action.email.sendcsv %}
59+
action.email.sendcsv = 1
60+
{% endif %}
5861
{% endif %}
5962
{% if detection.deployment.alert_action.slack %}
6063
action.slack = 1

0 commit comments

Comments
 (0)