How to setup an automation with a webhook JSON variable?

Hi,

I try to setup an automation wich groups Sonos speaker together:

- id: '1582236119964'
  alias: sonos_ueberall
  description: ''
  trigger:
  - platform: webhook
    webhook_id: sonos_ueberall
  condition: []
  action:
  - data_template:
      master: '{{ trigger.json.entity_id }}'
      entity_id: media_player.wohnzimmer, media_player.schlafzimmer, media_player.kuche, media_player.bad
    service: sonos.join

Then I get this error:

voluptuous.error.MultipleInvalid: Entity ID {{ trigger.json.entity_id }} is an invalid entity id for dictionary value @ data[‘master’]

I think that there is something wrong with the emplating '{{ trigger.json.entity_id }}' ?

Thanks for your help

According to the documentation for a Webhook Trigger State Object:

Template variable Data
trigger.platform Hardcoded: webhook
trigger.webhook_id The webhook ID that was triggered.
trigger.json The JSON data of the request (if it had a JSON content type).
trigger.data The form data of the request (if it had a form data content type).

Is the received information truly in JSON format?