Create a custom widget using a script - Administrator Guide - 8 - Cortex XSOAR - Cortex - Security Operations

Cortex XSOAR Cloud Documentation

Product
Cortex XSOAR
Version
8
Creation date
2024-03-07
Last date published
2024-11-13
Category
Administrator Guide
Solution
Cloud
Abstract

Create a custom script based widget in using a script. Use custom widgets in dashboards and reports.

You can use scripts in custom widgets to create dynamic widgets for more complex calculations. For examples of creating widgets using scripts, see Script-based widget examples.

Note

Cortex XSOAR supports JavaScript, Python and PowerShell.

Before creating a script-based widget in the Widgets Library, you need to create or upload the script to the Scripts page. In the Widgets Library, you can define the script arguments and change the visuals.

Note

If you upload a script to the Scripts page, the Arguments field is automatically updated. You can then define the arguments in the widget builder. If you create a new script (without uploading) in the Scripts page, you need to add the arguments manually for them to appear in the Widgets Library when creating or editing a widget.

  1. In the Scripts page, upload or create a new script for one of the following widget types:

    • Text

    • Number

    • Duration

    • Trend

    • Chart

    • Table or list

    • Filter Data for all Widgets (Pivoting)

  2. In the Widgets Library, create a widget. For more information about creating a widget, see Create a widget using the widget builder.

  3. Select the Scripts data type and then add the script to the widget.

    (Upload script only) If you have added arguments, these appear when creating a widget. If you have not uploaded the script, you need to add the arguments manually in the Scripts page.

  4. Add the script-based widget where relevant, for example to a report, a dashboard, or an incident.