Common Scripts
This module allows working with "Common Scripts" within the selected client, to fulfill the function of reusing, simplifying, and reducing the code of Scripts for Devices and Actions.
A Script is a code fragment in an interpreted language (JavaScript) that is easy to understand, expanding the range of tools available when processing a specific business logic.
Common Scripts will be used as libraries of common functionalities. Common Scripts will be used as dependencies in other scripts.
The module allows viewing the list of Common Scripts generated by the client, as well as creating, editing, or deleting those scripts. Scripts can be related to each other to leverage code reuse and access all devices of the client in which they are running.
From the following menu option

Triggers
Triggers can be created for actions based on any event, including Calendar and State events. For each trigger, the user interface typically offers two options.
Add Common Script
Select the Common Scripts option from the menu. When selecting Add, the user can include a description, select a dependency, and enter the JS code below.