You can run a workflow for working with objects. Scripts are available for templates and documents (including documents within a package), but not available for template packages.
Scripts can be automated or manual.
Automated scripts run when a template or document changes.
To run a manual script:
Open a template or document.
Click button in the upper right corner.
Select Run script.
Select a script in the window that appears.
Click the Run button.
The script is running. A message will appear based on the results of the script execution.