You can't without re-implementing the CB Gallery integration using CB Auto Actions. CB Gallery integration to PMS is hardcoded into CB Gallery. You're effectively needing something wildly different than what is available so you've to implement your own solution. The CB Gallery implementation is as follows if you want to try and replicate it in CB Auto Actions and change it to fit your needs.
Triggers:
Code:
$_PLUGINS->registerFunction( 'pm_onAfterDisplayMessage', 'pmDisplay', '\CB\Plugin\Gallery\Trigger\PMSTrigger' );
$_PLUGINS->registerFunction( 'pm_onAfterDisplayMessageEdit', 'pmEdit', '\CB\Plugin\Gallery\Trigger\PMSTrigger' );
$_PLUGINS->registerFunction( 'pm_onAfterDisplayMessageReply', 'pmEditReply', '\CB\Plugin\Gallery\Trigger\PMSTrigger' );
$_PLUGINS->registerFunction( 'pm_onAfterCreateMessage', 'pmSave', '\CB\Plugin\Gallery\Trigger\PMSTrigger' );
Implementation:
/components/com_comprofiler/plugin/user/plug_cbgallery/library/Trigger/PMSTrigger.php
I do not recommend just making changes to the file above as you will lose those changes when you update CB Gallery.