DisplayHTML

Display HTML in the War Room.

python · Common Scripts

Details

IDDisplayHTML
Languagepython
From Version6.5.0
Docker Imagedemisto/python3:3.12.13.10404775

README

Displays HTML in the War Room.

Script Data


Name Description
Script Type python
Tags  

Inputs


Argument Name Description
html The HTML to display.
markAsNote Whether the entry should be marked as a note.
header Adds a header text to the output.

Outputs


There are no outputs for this script.

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401


def main():
    html = demisto.args().get("html")
    note = demisto.args().get("markAsNote")
    header = demisto.args().get("header")

    note = bool(note and note.lower() == "true")
    if header:
        html = f"<h1>{header}</h1></br>{html}"

    demisto.results({"ContentsFormat": formats["html"], "Type": entryTypes["note"], "Contents": html, "Note": note})


if __name__ == "__builtin__" or __name__ == "builtins":
    main()