Filtering a Spotify Playlist

I have a Spotify Playlist called United States Top 50 which I want to monitor and filter by audio features of each track and add to a playlist. It appears that I have everything working properly but wanted to check a couple of things. My current workflow looks like this:

The concern I have is that when I run this workflow will it pull all 50 songs and go through them one by one adding the ones that qualify to the correct playlist? Or do I need some other steps to ensure this happens. Secondly, can I get this workflow to trigger as soon as new songs are added by Spotify or do I need to do it as a time based trigger?

Thanks in advance for the help

Hey @Colin_Cameron!

Welcome to the n8n community! We are glad to have you! :slightly_smiling_face:

Yes, the workflow will all the 50 songs and the IF node will check for each song and all the songs that match the criteria will be added. Your workflow looks good and should work fine as expected.

Let me know if you need further help.

Hope this was helpful. :slightly_smiling_face:

Is there a way to compare the current playlist with the updated one and only add new songs? I have used one of the workflows from this site to archive the Top 50. The original archives the Discover Weekly playlist which works well since all of those songs are new every week. The Top 50 though only changes a few songs at a time. I have this workflow:

That runs every hour. The issue I have run into is that it will add all the songs every time it runs. I’m thinking I need some sort of lookup to get the workflow to compare playlists and not add the duplicates, unfortunately I have no idea where to start on that.

You can look at this issue because of that: