Spotify Sync Liked Songs to Playlist

This workflow automatically synchronizes the user's "liked songs" on Spotify with a specified playlist, ensuring that the content of both remains consistent in real-time. It can periodically add new tracks and remove songs that are no longer liked, keeping the playlist tidy and accurate. By pushing notifications through Gotify when synchronization is complete, users can stay informed about updates, greatly simplifying music management and enhancing efficiency, making it suitable for individual users and small teams.

Workflow Diagram
Spotify Sync Liked Songs to Playlist Workflow diagram

Workflow Name

Spotify Sync Liked Songs to Playlist

Key Features and Highlights

This workflow automatically synchronizes a user’s Spotify “Liked Songs” with a specified playlist, ensuring real-time consistency between the two. It not only adds newly liked tracks to the target playlist but also removes songs from the playlist that are no longer liked, maintaining accuracy and cleanliness. The workflow supports scheduled daily automatic execution to guarantee timely synchronization. Additionally, it sends completion notifications via Gotify, allowing users to stay informed about updates promptly.

Core Problem Addressed

Spotify does not provide automatic synchronization between the “Liked Songs” collection and user-created playlists, making it cumbersome to manage multiple playlists and often resulting in playlists that do not reflect the user’s current preferences. This workflow solves the issues of automatic syncing and deduplication, reducing manual effort and enhancing music management efficiency and user experience.

Use Cases

  • Users who like to save songs on Spotify and want these saved tracks automatically organized into a frequently used playlist.
  • Users who need to regularly clean playlists by removing songs they no longer like, keeping playlist content fresh and aligned with personal taste.
  • Music enthusiasts or content managers seeking to simplify the maintenance of their Spotify music library and playlists.
  • Suitable for individual users and small teams aiming to automate music management.

Main Workflow Steps

  1. Trigger Method: Supports manual start and scheduled execution (default runs daily at midnight).
  2. Initialize Variables: Configure the target playlist name.
  3. Data Retrieval:
    • Fetch all user “Liked Songs.”
    • Retrieve all user playlists and filter to find the target playlist.
    • Get all songs currently in the target playlist.
  4. Data Processing:
    • Sort and compare the “Liked Songs” and target playlist tracks.
    • Identify newly liked songs missing from the target playlist.
    • Identify old songs in the playlist that are no longer liked.
  5. Synchronization Operations:
    • Batch add newly liked songs to the target playlist.
    • Batch remove songs from the playlist that are no longer liked.
  6. Result Summary and Notification:
    • Count the number of songs added and removed.
    • Send a synchronization completion notification via Gotify, including operation details and elapsed time.

Systems and Services Involved

  • Spotify: Utilizes the Spotify API to access user music library and playlists, and to perform add/remove track operations.
  • Gotify: Sends synchronization completion notifications in Markdown format.
  • n8n Workflow Automation Platform: Serves as the execution and scheduling environment for the entire process.

Target Users and Value

  • Heavy Spotify users who collect and manage large numbers of songs.
  • Users who want to automatically maintain consistency between their playlists and “Liked Songs.”
  • Music content curators and small music teams seeking to improve music library management efficiency.
  • Automation enthusiasts and technical users aiming to achieve intelligent, unattended Spotify music management through this workflow.

This workflow greatly simplifies the synchronization process between Spotify’s “Liked Songs” and playlists by automating additions and deletions, enhancing user experience and music management efficiency. It is an ideal assistant for music lovers and content managers alike.