Playlist (spotify or YouTube Music) in an automation

Is it possible to automatically play a playlist with an automation? I tried several things I found on the web or on this forum. But none of this worked. Doesn’t matter if it is with Spotify or YouTube Music. Anyone an idea? I have a motion trigger when activated a playlist needs to play. Now I have a TuneIn Radio station but with commercials…

Maybe Android Debugging Bridge (ADB) commands can help here? I responded to a similar question over here with an answer that works for Android TVs: Casting playlists (from Emby, YouTube) to Chromecast - #4 by cjborchert

I’ve also been looking for this for quite some time and only recently figured it out.

Is it possible to play a YouTube Music playlist/song when an RFID card reader receives a signal?