Skip to main content


A Workflow Engine function that converts a JSON payload to an XML string using the Moobot utility jsonToXML. This function is intended for payloads created using the getPayload() action. The resulting XML replaces the payload for use in subsequent actions.


If the payload requires other XML attributes, you should add these as JSON keys before the workflow converts the XML payload.

This action does not escape XML restricted characters (e.g. > and < to < >). Make sure that all values are XML safe before running this action.

This function is available as a feature of the Add-ons v2.3.5 download and later.

This function is available for event, alert, and Situation workflows.

Back to Workflow Engine Functions Reference.


Workflow Engine function workflowEngineFunction takes the following arguments:







JSON object

The JSON object to convert to XML.


To set up a workflow to send an XML payload rather than the standard JSON, do the following:

  1. Verify that the REST endpoint supports a Content-type appropriate for an XML payload: text/xml, application/xml, etc.

  2. Include the following actions in the relevant workflow:

The following example code demonstrates typical use of the jsonToXML method:

var jsonObjectExample =
  "data": {
         "enriched": "false",
         "id": "1",
         "description": "Alert 1",
         "host": "",
         "severity": "5"
         "enriched": "true",
         "id": "2",
         "description": "Alert 2",
         "host": "",
         "severity": "2"

var convertedXML = utilities.jsonToXML(jsonObjectExample);

The variable convertedXML now contains:

      <description>Alert 1</description>
      <description>Alert 2</description>