{"call_it":"\"Refresh my music and podcast playlists\" by James Raybould","owner":"James Raybould","runbook":"https://myrunbook.ai/jamesraybould","n":19,"id":"taste","name":"Refresh my music and podcast playlists","runner":"a scheduled workflow","schedule":"Travel playlist daily; weekly pair on Mondays","description":"A daily travel playlist, plus a weekly music playlist and podcast playlist based on my listening. The weekly pair contains 50 tracks and 25 episodes.","reads":["15 years of listening history","Spotify top tracks","podcast episode history"],"lands":"Refreshed playlists in my Spotify account","source":null,"figure":null,"link":null,"example":{"kind":"invented","note":"Weekly Mix\n50 songs, 25 episodes, updated Monday\n\n1. Glasshouse, Northern Relay, 3:42\n2. Slow Engine, Harbour Lights, 4:05\n...\nEpisodes: Why agents fail in the second week (new to you, 48 min)"},"output":"New music","build":"Ask first\n- Which playlists should it manage? (default three: a travel playlist, a weekly music playlist and a weekly podcast playlist)\n- How often? (default the travel playlist daily, the weekly pair on Monday morning)\n- How many items in the weekly pair? (default 50 tracks and 25 podcast episodes)\n- What belongs on the travel playlist? (you set the rule)\n- Do you have your listening history exported? (default no; then start from the service's own top-tracks data and grow the history from here)\n- Where should the run live? (default a scheduler that does not need your laptop on)\n\nNeeds\n- A music service account whose interface allows reading listening history and editing playlists, with a one-time authorization. Connecting: \"It reads what you played and rewrites the three playlists it owns; it touches no other playlist.\"\n- The person's listening history in a small local database; the longer it goes back, the better the picks.\n- A record of podcast episodes already queued, so none repeat.\n- A scheduler that keeps secrets encrypted and can open an issue on failure.\n- If your assistant can only chat: once a week, tell it your five most-played songs and ask for ten new ones to add by hand; the playlists are then yours to edit.\n\nBuild\n1. Read: authorize once and keep the long-lived credential as a secret; each run exchanges it for a short-lived one. Read the service's top tracks and the local history.\n2. Decide (travel): each day, rebuild the travel playlist from the listening history using your rule for what belongs.\n3. Decide (weekly music): every Monday, choose 50 tracks from the listening history and top-tracks data. They need not all be new; the aim is a weekly set that fits what you actually play.\n4. Decide (weekly podcasts): every Monday, take the latest episodes from the chosen shows plus topical searches over the last 14 days. Drop anything in the episode record, rank by recency and relevance, keep the top 25.\n5. Deliver: write the three playlists in the person's account. Save the episode record. Fallback: a message listing the picks for the person to add by hand.\n6. Memory: the episode record. On failure, open an issue so a revoked credential is noticed.\n\nCheck\n- Trigger a manual run and open each playlist: counts and dates match the rules above (50 tracks and 25 episodes in the weekly pair).\n- Run again: the podcast list shows no repeats.\n- Quiet run: a run with nothing new leaves the playlists unchanged and logs one line; revoke the credential on purpose and a failure issue appears.\n\nIn my version\n- Spotify. A travel playlist refreshed daily, and a weekly music playlist and podcast playlist refreshed on Mondays. Fifteen years of listening history in a local database.","built":{"method":"POST","url":"https://myrunbook.ai/api/runbooks/_bSFet4kFzjy/built","body":{"job":"taste","by_handle":"<your own runbook handle, if you have one>","note":"<what you built, what you changed, what broke; up to 1200 characters>"},"ask_first":"Only send this after the person says yes.","link_for_the_person":"https://myrunbook.ai/jamesraybould/built?routine=19"}}