Replicate Spotify's Liked Songs to a Playlist

The Spotify Liked Songs feature allows individual songs to be liked by simply clicking the heart icon, and presents them in a playlist-like view within the app. However, this cannot be made public or shared with other users.

My use case is to use n8n to replicate my Liked Songs into a playlist which I can then share with my friends or even make public.

It turns out that n8n already has most of the building blocks for this – Spotify playlists can be created and tracks can be both added to and removed from them (although there seems to be a small bug here which allows only the first track to be removed). However it cannot currently read the list of Liked Songs from Spotify. Once it has this ability, some simple function code could be used as glue to diff the Liked Songs with those in the playlist, and add/remove tracks accordingly.

I have already gone ahead and created a PR to support fetching Liked Songs (as well as a minor bug fix to allow removing tracks from playlists at an arbitrary position): However I am still looking for someone to merge this PR if there are no outstanding issues to resolve.

I also have locally created a workflow which does what I describe in this post, and would gladly submit it to the website once my changes have been released.

Hello @gerardlouw

Will have a look again today. Hopefully we can add it to this week’s release.

1 Like

Thanks @RicardoE105.

I’ve just resolved merge conflicts introduced by and tested the changes again.

1 Like

@RicardoE105 Any chance you’ll be able to take another look soon? I’m quite eager to start using it on my production box and contribute the workflow which does this replication!

PR #1520 has been merged and released. If you update your n8n version, you should be able to use this new functionality.

@ivov Thanks I saw that and already rebased on top of it which is what I need merged. This PR adds fetching of Liked Songs and fixes a Remove Track bug which I don’t believe was done in #1520.

Indeed, #1520 was based on a different contribution. Added the review of #1472 to my list.