DisplayTaggedWarroomEntries
Display warroom entries in a dynamic section which are tagged with 'report'.
- Type
- python
- Pack
- CommunityCommonScripts
Source
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import json
filter_arg = json.loads(demisto.args().get("filter", json.dumps({"tags": ["report"]})))
raw_entries = None
if filter_arg:
raw_entries = demisto.executeCommand("getEntries", {"id": demisto.incident().get("id"), "filter": filter_arg})
if raw_entries:
entries = []
for entry in raw_entries:
entries.append(str(entry["Contents"]))
else:
entries = ["No entries tagged with 'report' tag"]
# demisto.results(str(entries))
result = {
"Type": entryTypes["note"],
"Contents": "\n".join(entries),
"ContentsFormat": formats["markdown"],
"HumanReadable": "\n".join(entries),
"ReadableContentsFormat": formats["markdown"],
}
demisto.results(result)
README
Display warroom entries in a dynamic section which are tagged with ‘report’
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | dynamic-section |
| Cortex XSOAR Version | 6.0.0 |
Inputs
| Argument Name | Description |
|---|---|
| filter | The JSON filter for warroom entries described here: https://xsoar.pan.dev/docs/integrations/get-entries-filter |
Outputs
There are no outputs for this script.