Most of us already have the videos for the playlist we want. They are just scattered: the workout videos in a playlist called "Saved for later", the recipes somewhere in Liked videos. On YouTube, building a new playlist from them means saving each video, one menu at a time.
I built TidyList, a web app for cleaning up big YouTube playlists, on the YouTube Data API v3, and building new playlists from old ones is half of what it does. Creating the playlist is one call. Filling it properly took three lessons.
The manual way
Find a video you want in one of your playlists.
Open its menu, choose Save and tick the new playlist.
Repeat for every video, keeping track yourself of which ones you have already added.
Trap 1: insert order is not the order you loop in
playlistItems.insert takes an optional snippet.position . Leave it out and each video is appended at the end, which is also where YouTube's own Save puts it.…