How to set/read the json 'id' from a kodi_call_method_result event

Hi,
i am fairly new to HA but thanks to the forum I managed to send a library query to kodi with a script and receive a proper result with an automation, eg.

kodi_get_next_episode_id:
  alias: Get next Episode ID
  sequence:
    service: kodi.call_method
    data_template:
      entity_id: media_player.kodi
      method: VideoLibrary.GetEpisodes
      limits:
        start: 0
        end: 1
      filter:
        field: playcount
        operator: is
        value: ‘0’
      tvshowid: ‘{{ (‘input_number.kodi_tvshow_id’) | int }}’
  mode: single

Expecting a JSON result like

{
	"id": "kodi_message_id",
	"jsonrpc": "2.0",
	"result": {
		"episodes": [
			{
				"episodeid": 8201,
				"label": "3x08. Dicke Luft",
				"playcount": 0
			}
		],
	}
}

So I am able to retrieve {{trigger.event.data.result.episodes.0.label}} for example.

My question is in order to have different queries to kodi (and that is when the ‘id’ field comes into play) how can I have an automation that reacts to a certain ‘id’ only. If I try to put it in the condition field, it would not fire at all and I figured out that I can’t access the ‘id’ field. I assumed it would be {{trigger.event.data.id}} ?

How? Sensor?

Thanks, that is a very good question.
I mean I do it with a script :
kodi_get_next_episode_id:
alias: Get next Episode ID
sequence:

  • service: kodi.call_method
    data_template:
    entity_id: media_player.kodi
    method: VideoLibrary.GetEpisodes
    limits:
    start: 0
    end: 1
    filter:
    field: playcount
    operator: is
    value: ‘0’
    tvshowid: ‘{{ (‘input_number.kodi_tvshow_id’) | int }}’
    mode: single

But with all the testing and trying with the browser and curl and hass.io I did not realise, that I don’t even send it with the hass.io ‘kodi.call_method’
So the question would be how to set it in the first place?