I use Automagic too much that sometimes I create a simple alarm just in Automagic
Later I add so many things and it became a flow already.
Automagic don't have the method yet to delete or enable/disable certain alarm. We need plugin to do that, and I think it is also no efficient.
- Why don't just create the alarm directly in Automagic. To set the alarm, just use Time, and set the work days as the trigger, set the time.
- Then use query content provider to check if today is holiday, probably such as in this thread :
viewtopic.php?f=3&t=7210 or here with reverse logic :
viewtopic.php?f=5&t=7172
- If the query says there is a holiday, then stop there. If not holiday, continue to main branch.
- The main branch is simply Open URL in browser, choose Spotify and use the link you copy from Spotify playlist (Copy URI). Or if it doesn't work, use Start Activity with the playlist as the URI.
Beware of using certain playlist or favourites songs as the alarm. Several weeks later, you will hate it.
So to randomize the songs, it is also possible you create several playlist. Copy URI of all these playlist, put in a list type Glovar. Later you can use getRandomElement() to retrieve random list and use it as the alarm. You probably still will hate the playlist, but takes a very long time.