Play a single song at random

I am trying to play a single song from a playlist at random. From research I copied and merged several similar scipts to get the following code. It runs with the following error

Failed to perform the action script/aa_random_song2. required key not provided @ data[‘config_entry_id’]
I am not an expert in YAML. Could anyone assist me with a script that will select a song at random from a playlist and play one song on a nominated device.
Appreciate any help.

alias: Play Random Song Script
description: ""
sequence:
  - data:
      media_type: track
      search: Jukebox Queen
      limit: 1
      order_by: random
    response_variable: random_track
    action: music_assistant.get_library
  - data:
        media_content_id: "{{ random_track.tracks[0].uri }}"
        media_type: track
        enqueue: play
        radio_mode: true
    target:
       entity_id: media_player.spanish_hub
    action: music_assistant.play_media

Read the documentation. Error message says exactly what is wrong, you need to provide the config_entry_id your Music Assistant integration.

Also see this other recent thread about playing randomized tracks through MA. Apparently there are some errors in the MA examples regarding this.

Random doesn’t work . It can return an empty list frequently.
The inline examples ( which I also tried to use ) vary a bit !

Thank you for the responses. I took the easy approach, set a timer 3:30; play a random song; after timer finishes turn off speaker. Not elegant but mostly does the job.