For gallery_onAfterApproveGalleryItem the variables are as follows.
Code:
$_PLUGINS->trigger( 'gallery_onAfterApproveGalleryItem', [ $gallery, $source, $row ] );
So var1 is incorrect. The media row object is var3. That's why yours is not generating properly. Please keep in mind I've implemented a helper for this. Under the Global tab you should see all the variables for any triggers you add to your auto action. If it's not displaying for you please let me know.
You should be able to fix your issue by simply swapping your var1 to var3 in your substitutions.