CreateEmailHtmlBody

This script allows sending an HTML email, using a template stored as a list item under Lists: - Cortex XSIAM: Settings -> Configurations -> Lists. - Cortex XSOAR: Settings -> Lists. Placeholders are marked in DT format (i.e. ${incident.id} for incident ID). Available placeholders for example: - ${incident.labels.Email/from} - ${incident.name} - ${object.value} See incident Context Data menu for available placeholders Note: Sending emails require an active Mail Sender integration instance.

javascript · Common Scripts

Details

IDCreateEmailHtmlBody
Languagejavascript
From Version5.0.0
Tagsemail communication

README

Sends a HTML email, using a template stored as a list item under Lists (Settings -> Advanced -> Lists).
Placeholders are marked in DT format. For example, ${incident.id} for the incident ID.

Examples of available placeholders:

  • ${incident.labels.Email/from}
  • ${incident.name}
  • ${object.value}
    See incident Context Data menu for available placeholders

Note: Sending emails requires an active Mail Sender integration instance.

Script Data


Name Description
Script Type javascript
Tags email, communication

Inputs


Argument Name Description
listTemplate The list where the template is stored.
key The context key to store the HTML body.
object The values object provided as stringified JSON.
removeNotFound Whether to replace a path not found, if true, with an empty string, otherwise to leave it as is.

Outputs


Path Description Type
htmlBody The HTML body. Unknown
commonfields:
  id: CreateEmailHtmlBody
  version: -1
name: CreateEmailHtmlBody
script: ''
type: javascript
tags:
- email
- communication
comment: |-
  This script allows sending an HTML email, using a template stored as a list item under Lists: 
  - Cortex XSIAM: Settings -> Configurations -> Lists.
  - Cortex XSOAR: Settings -> Lists.
  Placeholders are marked in DT format (i.e. ${incident.id} for incident ID).
  Available placeholders for example:
  - ${incident.labels.Email/from}
  - ${incident.name}
  - ${object.value}
  See incident Context Data menu for available placeholders

  Note: Sending emails require an active  Mail Sender integration instance.
enabled: true
args:
- name: listTemplate
  required: true
  default: true
  description: The list where the template is stored.
- name: key
  required: true
  description: Context key to store the HTML body.
- name: object
  description: Values object provided as stringified JSON.
  isArray: true
- name: removeNotFound
  auto: PREDEFINED
  predefined:
  - "yes"
  - "no"
  description: If true, replace path not found with empty string.
  defaultValue: "no"
outputs:
- contextPath: htmlBody
  description: HTML Body.
scripttarget: 0
tests:
- CreateEmailHtmlBody_test_pb
fromversion: 5.0.0