Configure scripts
You can write and edit scripts that allow you to customize incidents and retrieve information on incidents and other object types. You can then invoke a script from a playbook, rule or workflow.
You must be familiar with writing scripts using Python.
The Scripts tab allows you to view, edit, and create scripts. The tab
provides the following information:
- Script Name. Click on the name of a script to view its details or edit the script. When editing or creating a script, you should enter a name that is descriptive of the script’s purpose.
- Script Language. The language used to evaluate all script conditions. Scripts written in Python 2.7 or Python 3.6 are supported.
- Description. Enter text to describe the script.
- Object Type. You assign a script to one type of object, such as incident, note, milestone, task, attachment, artifact, data table, or email message. The object type determines the context of the data that is provided to the script.
- Rules. A list of rules that call the script. Any disabled rules are shown in red.
- Trash can icon. Click to delete the script. If a script is referenced in a rule, you must remove it from the rule before you can delete it.
You can also write scripts from the Playbook designer. When writing a script from a playbook, you can choose to make the script local to that playbook only, and access outputs from functions within the playbook.