Automation, play music with movement sensor

How would be the code to play a, shuffled, playlist on Google home or Amazon echo, activated by a movement sensor?