Custom action should be executed when a new webspace is added in Parallels Plesk Automation, but there is no "webspace created" event handler.
The feature is not implemented yet. Corresponding request exists, and the feature will be implemented in future updates.
The issue could be workaround with a Plesk side event handler system. Please follow the below steps to create an event in Plesk event handler:
Log in to PPA, and modify the URL as follows:
Add the following event:
Default domain (the first domain added to a subscription/webspace) created lowest (0) root /usr/local/ppa/scripts/domain_add.sh <new_domain_name>