Get form values into hook_node_insert / hook_node_update I need to get in hook_node_insert and hook_node_update the value of a field I manually added to a form. 

function hook_form_FORMID_alter(&amp;$form, FormStateInterface $formState, $form_id) {

  $form['newfield'] = [
    '#title' =&gt; 'New field',
    '#type' =&gt; 'checkbox',
  ];
}


In Drupal 7 every form field is copied to the entity and it's easy to access it as explained here Get data form into hook_node_insert / hook_node_update

Is there a way in Drupal 8 too?
Use an entity builder callback on the form, for example:

function menu_ui_form_node_form_alter(&amp;$form, FormStateInterface $form_state) {
  // ...
  $form['#entity_builders'][] = 'menu_ui_node_builder';
}

/**
 * Entity form builder to add the menu information to the node.
 */
function menu_ui_node_builder($entity_type, NodeInterface $entity, &amp;$form, FormStateInterface $form_state) {
  $entity-&gt;menu = $form_state-&gt;getValue('menu');
}