Source entity type and id in webform node
a naive solution:

function THEME_preprocess_node(&amp;$variables){
  //adding query source entity and type to a webform node
 if($variables['node']-&gt;getType()=='webform'){
   if (\Drupal::request()-&gt;get('source_entity_type') &amp;&amp; \Drupal::request()-&gt;get('source_entity_id')){
     $variables['content']['webform'][0]['#entity_type'] = \Drupal::request()-&gt;get('source_entity_type');
     $variables['content']['webform'][0]['#entity_id'] = \Drupal::request()-&gt;get('source_entity_id');
  }
 }
}