Skip to main content
Back to Templates
Task Automation

Delete Old Tracks after a Given Time from Spotify Playlist

I heard from a lot of people that maintain spotify playlists, that they would like to have a function where they can remove old tracks after a few weeks or months to keep the playlist small. This is my first workflow here, I hope it's useful for somebody. 1. Get Tracks from a Spotify Playlist 2. Covert the added_at Date to a Unix Timestamp 3. Get the current Date and add it to the Node 4. Convert the current Date to a Unix Timestamp 5. Check if current Date - added_at Date is larger than the entered Value. (In Value 2 you can enter the Time in seconds 1 day = 86400, 30 days = 2592000. All tracks that are longer in the playlist than this time amount will be removed in Step 6.) 6. Delete Old Tracks from Playlist

Problem Solved

This automation solves the problem of manual processes, saving time and reducing errors.

Who Is This For

This workflow is designed for users who want to automate their delete old tracks after a given time from spotify playlist processes.

Complete Guide to This n8n Workflow

How This n8n Workflow Works

This n8n workflow efficiently automates the process of deleting old tracks from a Spotify playlist, ensuring your collection remains current and manageable. The workflow initiates by fetching tracks from a specified playlist and converting the 'added_at' date into a Unix timestamp for accurate time calculations. It then retrieves the current date and performs a comparison to determine whether the track has exceeded the specified age limit in seconds. If the track's age surpasses this value, it is marked for deletion, keeping your playlist fresh.

Benefits of Using This n8n Template

Implementing this n8n template brings numerous benefits, primarily reducing the manual effort required to maintain an up-to-date Spotify playlist. Users can save time by automating the deletion process, which not only enhances efficiency but also minimizes the risk of human error. Additionally, this automation allows playlist curators to focus more on discovering new music rather than managing existing tracks, resulting in a better user experience.

Implementation Guide

To set up this n8n workflow, start by connecting your Spotify account to n8n. Configure the 'Get Tracks from a Spotify Playlist' node to specify the desired playlist. Next, set the time interval for how long tracks should remain in the playlist before deletion. Once the workflow is configured, test it to ensure that old tracks are being removed as expected. This straightforward implementation can significantly streamline your music management process.

Who Should Use This Workflow

This workflow is ideal for Spotify playlist managers, music curators, and anyone looking to maintain a tidy collection of tracks. Whether you are a casual listener or a professional DJ, automating the removal of old tracks will enhance your playlist curation process. Embrace this n8n workflow to ensure your music library stays relevant and enjoyable, making your listening experience more satisfying.

Actions

Template Info

15,239 views
487 downloads
4.8 average (72 ratings)

Services Used

ManualtriggerSpotify

Category

Task Automation
Delete old tracks after a given time from Spotify playlist - n8n template