How can I get the submission ID in a custom submit handler?
To get the webform submission ID in a custom form handler, I used the following code.
function MODULE_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if ($form_id== 'webform_submission_add_form') {
    $form['actions']['submit']['#submit'][] = 'MODULE_custom_submit_handler';
  }
}

function MODULE_custom_submit_handler(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state) {
  $webform_submission_id = $form_state-&gt;getFormObject()-&gt;getEntity()-&gt;id();
 }