Scripts in a playbook
You can access all scripts from the playbook library.
The library organizes all global scripts by object type, and local scripts under Local. A global script is available to every playbook and also included in the Scripts tab in Customization Settings. A local script is available to this playbook only.
- Click the Scripts icon in the library.
- Expand the object type or Local category and select the script. A panel displays detailed information about the script.
- Add it to the canvas by dragging it or selecting the + icon. The script's details panel updates to show editable fields.
- If needed, click the edit icon in the details panel to modify the script. If it is a global script, any changes you make apply to all instances of the script.
- To edit the script, click the script in the library or on the canvas. In the details panel, click the edit icon. Editing a script changes that script for all playbooks, rules, and workflows.
- If you need another instance of this script, click the Duplicate script icon in the details panel or right-click the script and select Duplicate. The script is added to the canvas.
- To remove a script from the canvas, click the script in the canvas. You can right-click on the node and select Remove, or click the node and select the Remove script from canvas icon in the panel.
- When you delete a script from the library, the script is deleted from all playbooks and any rules and workflows. To delete the script from the library, click the script in the library then click the Delete from library icon in the panel.
If you need to create a new script, click Create script at the end of the panel, which takes you to the Create script page.
Unlike workflows, playbooks do not have post-process scripts for functions. Instead, to access the output of functions in the playbook or set a property value, use the playbook keywords as described in Playbook operations; otherwise, see Writing scripts for details about writing a script.
The example adds a script to the canvas.