Pass 1 · insert
For each unread Miniflux entry whose URL points at a YouTube video, callplaylistItems.insert on the mapped playlist and write a tracked-row to D1. The D1 row keeps a per-entry ledger so Pass 2 knows what's already on the playlist.
Name
A serverless sync job that bridges Miniflux with YouTube playlists. Reads unread RSS entries from your Miniflux categories on a cron tick, adds them to mapped playlists, and marks them read after you watch and remove them on YouTube.
One run, two passes. Pass 1 only adds. Pass 2 only removes. Each pass is idempotent — re-running mid-failure is safe.
For each unread Miniflux entry whose URL points at a YouTube video, callplaylistItems.insert on the mapped playlist and write a tracked-row to D1. The D1 row keeps a per-entry ledger so Pass 2 knows what's already on the playlist.
For each row in D1, ask YouTube whether the video is still on the playlist. Ifyou removed the video (watched and dismissed), mark the Miniflux entry read and delete the D1 row. No video deletion is ever issued from this side.
One file. A list of category → playlist pairs. Reload by re-deploying the Worker.
# category → playlist pairs (toml) [[sync]] category = "tech" playlist = "PL_tech_watch_later" [[sync]] category = "cycling" playlist = "PL_rides"
A silent process needs loud logs. Four surfaces, layered: console, dead-man's-switch, structured shipping, metrics.
always on · wrangler tail
cron dead-man's switch
structured log shipping
11 gauges per run