How can I auto-populate fields with Ajax?
I was able to get a basic autopopulation callback working based on this question:

How do I modify a core field to use Ajax and add markup?

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\ReplaceCommand;

/**
 * Implements hook_form_alter() on behalf of mymodule.module.
 */
function mymodule_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {

  if ($form_id == 'node_publication_form') {

    $form['title']['widget'][0]['value']['#value'] = 'enter title here';

    $form['import_from_third_party_service_id'] = [
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Import from third_party_service Id'),
      '#description' =&gt; t('To autopopulate fields from third_party_service, enter the third_party_service ID above in the textfield above and hit the import key below'),
      '#maxlength' =&gt; 64,
      '#size' =&gt; 8,
      '#weight' =&gt; '-10',
    ];

    $form['import_from_third_party_service_submit'] = array(
      '#name' =&gt; 'custom',
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Import'),
      '#weight' =&gt; -9,
      '#ajax' =&gt; [
        'callback' =&gt; 'mymodule_import_ajax_callback',
        'wrapper' =&gt; 'import-wrapper',
      ],
    );

    $form['#prefix'] = '&lt;div id="import-wrapper"&gt;';
    $form['#suffix'] = '&lt;/div&gt;';

  }
}

function mymodule_import_ajax_callback($form, &amp;$form_state) {

  // replace with code to get value from third party service
  $new_title = 'hello world';

  $form['title']['widget'][0]['value']['#value'] = $new_title;

  return $form;
}