import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 incident = demisto.incidents() query = incident[0].get("CustomFields", {}).get("ransomwaredataencryptionstatus", "Pending Confirmation") Color = "green" if query == "Encrypted": color = "red" html = "

Encrypted

" elif query == "Decrypted": color = "green" html = "

Decrypted

" else: html = "

Pending Confirmation

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