Bring back Spotify's Daily Drive — your personal mix of podcasts and music, updated automatically.
Spotify killed Daily Drive on March 17, 2026. This project brings it back. It runs on any Linux machine and automatically refreshes a Spotify playlist with your podcasts interleaved with music.
Listen to a live example — updated twice daily with NPR News, The Journal, Freakonomics, and a mix of top tracks and genre discovery.
You need Spotify Premium. Since Feb 2026, Spotify requires Premium for Developer apps. It's free to use the API — you just need a Premium account.
This tells Spotify your script is allowed to manage your playlists. It's free and takes 2 minutes.
- Go to developer.spotify.com/dashboard and log in with your Spotify account
- Click "Create App"
- Fill in the form:
- App name:
Daily Drive(or anything) - App description:
Personal playlist tool(or anything) - Redirect URI: type in exactly:
http://127.0.0.1:8888/callbackthen click Add - Check both Web API and Web Playback SDK
- App name:
- Click "Save"
You're now on your app's dashboard page.
- On your app's page, click "Settings" (top right)
- You'll see your Client ID right there — copy it somewhere
- Click "View client secret" to reveal your Client Secret — copy that too
- Still in Settings, scroll down to "User Management"
- Type in the email address tied to your Spotify account and click Add
Why? Since Feb 2026, even the app owner must be explicitly added. Without this, you'll get a 403 error when the script tries to update your playlist.
- Open Spotify (the app or open.spotify.com)
- Create a new playlist — name it whatever you like (e.g., "My Daily Drive")
- Right-click the playlist → Share → Copy link to playlist
- You'll get a link like:
https://open.spotify.com/playlist/34nCFkIuIkiFF4W5dJKiTi - The part after
/playlist/is your Playlist ID — copy it
For each podcast you want to include:
- Open the podcast/show in Spotify
- Click ⋯ → Share → Copy link to show
- You'll get a link like:
https://open.spotify.com/show/6z4NLXyHPga1UmSJsPK7G1 - The part after
/show/is the Show ID
Some popular ones to get you started:
| Podcast | Show ID |
|---|---|
| NPR News Now | 6BRSvIBNQnB68GuoXJRCnQ |
| The Daily (NYT) | 3IM0lmZxpFAY7CwMuv9H4g |
| Freakonomics Radio | 6z4NLXyHPga1UmSJsPK7G1 |
| Up First (NPR) | 2mTUnDkuKUkhiueKcVWoP0 |
| The Journal (WSJ) | 0KxdEdeY2Wb3zr28dMlQva |
# Get the code
git clone https://github.com/patdeg/dailydrive.git
cd dailydrive
# Run the installer (installs Node.js if needed + dependencies)
chmod +x install.sh
./install.shNow edit your config file:
nano config.yamlPaste in your Client ID, Client Secret, Playlist ID, and your podcast Show IDs from the steps above. The file has comments explaining each field. Save and exit (Ctrl+X, then Y, then Enter).
npm run setupThis prints a URL. Open it in your browser, log into Spotify, and click Agree. The script saves your login token locally — you only do this once.
On a headless server (SSH, no monitor)? Connect with port forwarding first:
ssh -L 8888:127.0.0.1:8888 user@your-serverThen run
npm run setupon the server, and open the URL in your local browser.
npm startOpen Spotify — your playlist is now filled with a fresh mix of podcasts and music!
This is where you make it yours. Edit config.yaml to control what music goes in.
Pulls from your most-played songs — the best signal for "songs I actually like."
music:
top_tracks:
enabled: true
time_range: "short_term" # "short_term" (~4 weeks), "medium_term" (~6 months), "long_term" (all time)
count: 30Add genres to discover fresh tracks that match your taste:
music:
genres:
- pop
- indie pop
- dance pop
- singer-songwriterDon't know your genres? Run npm run taste:google to auto-detect them using AI for free (requires a Google Gemini API key in .env — see Taste Profile below). Or use npm run taste for the Demeterics version.
When both top tracks and genres are enabled, songs are split 50/50 — half familiar favorites, half new discoveries.
music:
playlists:
- name: "My Chill Playlist"
id: "your-playlist-id-here"The mix_pattern controls how podcasts (P) and music (M) alternate:
| Pattern | What it sounds like |
|---|---|
PMMMM |
1 podcast, 4 songs, repeat (default) |
PMMM |
1 podcast, 3 songs, repeat |
PM |
alternating podcast and song |
MMMPMMMM |
music-heavy: 3 songs, 1 podcast, 4 songs |
Great for news briefings:
podcasts:
- name: "NPR News Now"
id: "6BRSvIBNQnB68GuoXJRCnQ"
episodes: 1
position: first # Always plays first, before the patternSet up a cron job so your playlist refreshes on its own:
crontab -eAdd this line (refreshes at 4 AM and 4 PM daily):
0 4,16 * * * cd /home/$USER/dailydrive && /usr/bin/node index.js >> /tmp/dailydrive.log 2>&1
That's it — your Daily Drive is back on autopilot.
| Command | What it does |
|---|---|
npm run setup |
Log in to Spotify (one time, or if token expires) |
npm start |
Build/refresh the playlist now |
npm test |
Dry run — shows what would happen without changing anything |
npm run taste |
Auto-detect your music genres using AI (Demeterics) |
npm run taste:google |
Auto-detect your music genres using AI (Google Gemini — free) |
| Problem | Fix |
|---|---|
Not authenticated! |
Run npm run setup |
config.yaml not found! |
Run cp config.example.yaml config.yaml and edit it |
Token expired |
Run npm run setup again |
403 Forbidden |
Go to developer.spotify.com/dashboard → your app → Settings → User Management → add your Spotify email. Then re-run npm run setup |
404 Not Found |
Double-check your podcast/playlist IDs in config.yaml |
| Playlist is empty after running | Run npm test to see if podcasts/playlists are returning results |
Auto-detect your genre tags using AI. The script analyzes your Spotify listening history and suggests genre tags for your config.
Uses the Google Gemini API free tier. No credit card required.
- Go to aistudio.google.com/apikey
- Sign in with your Google account
- Click "Create API key" and select or create a Google Cloud project
- Copy the key (starts with
AIza...) - Create a
.envfile in the dailydrive folder (or add to your existing one):GEMINI_API_KEY=AIza...your_key_here - Run:
npm run taste:google
Free tier limits: 15 requests/minute, 1M tokens/day — more than enough for this.
Uses the Demeterics API — an LLM observability platform that acts as a proxy to 50+ providers (OpenAI, Anthropic, Google, Groq, etc.). Beyond routing, Demeterics tracks cost, latency, and errors across every call with 50+ fields per request — useful if you're building AI into multiple projects and want one dashboard to monitor spending and performance. Integration is just a URL change (OpenAI-compatible), and prompt-level tags let you slice data by app, workflow, or customer. See demeterics.ai/observability for details.
- Get an API key at demeterics.ai
- Add to
.env:DEMETERICS_API_KEY=dmt_your_key_here - Run:
npm run taste
| Mode | How | Fee |
|---|---|---|
| BYOK (default) | Store your vendor keys (OpenAI, Google, etc.) in Settings > Provider Keys. Or use dual-key format: dmt_YOUR_KEY;sk-YOUR_VENDOR_KEY |
10% |
| Managed Key | Demeterics provides vendor keys. Email sales@demeterics.com with subject "Feature Access Request" | 15% |
- Auth: OAuth 2.0 —
setup.jsruns a local server, you log in via browser, tokens are saved and auto-refresh - Podcasts: Fetches latest episodes from each show via Spotify API
- Music: Pulls from your top tracks, genre search, and/or playlists — pools, shuffles, and trims
- Mix: Pins episodes marked
position: first, then interleaves the rest using your mix pattern - Update: Replaces the playlist contents via the Spotify API
The script caches state in state.json — if nothing changed since last run, it skips the update. Delete state.json to force a refresh.
Spotify launched Your Daily Drive on June 12, 2019 — a personalized playlist mixing music with news and podcast clips. It typically had ~25 items (19 songs + 5-6 podcast segments), updated multiple times daily. The feature was fully removed on March 17, 2026.
This project brings it back — but better, because you control exactly what goes in it.
PRs welcome — especially for:
- Additional music sources (liked songs, recently played, etc.)
- Multiple playlist support
- Web dashboard
- Docker support
MIT — do whatever you want with it.
