For activities of type Email, how do I get the id for the activity just created during hook_civicrm_postProcess?
As of 5.36 this wouldn't be possible in a way consistent with other activity types anyway, because if there's multiple recipients the system will now create multiple activities, so in 5.36+ the form doesn't correspond to a single activity like with other activity types.