← All N8N workflows
Media & contentAggregateCodeFilterIfSchedule Trigger

create playlist spotify and get liked tracks and aggregate

Configured with Aggregate, Filter, Schedule Trigger, Loop Over Items, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
RoutingIf no playlistIfFiles / mediaCreate DownloadsPlaylistSpotifyFiles / mediaGet Liked TracksSpotifyRoutingLoop Over ItemsLoop Over ItemsTransformAggregateAggregateTransformSplit OutSplit OutFiles / mediaAdd tracks to DownloadsSpotifyFiles / mediaGet Downloads PlaylistSpotifyCodeFilter out new tracksCodeCodeGet tracks to removeCodeFiles / mediaRemove oldest tracksfrom DownloadsSpotifyRoutingFilter out DownloadsPlaylistFilterFiles / mediaGet Updated DownloadsPlaylistSpotifyFiles / mediaGet all PlaylistsSpotifyTriggerSchedule TriggerSchedule TriggerRoutingIf no DownloadsPlaylist foundIfTransformGlobalsEdit Fields

Node categories in this workflow

  • Routing
  • Files / media
  • Transform
  • Code
  • Trigger

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
If no playlistRoutingIfSee node parameters
Create Downloads PlaylistFiles / mediaSpotifyplaylist / create
Get Liked TracksFiles / mediaSpotifylibrary
Loop Over ItemsRoutingLoop Over ItemsSee node parameters
AggregateTransformAggregateSee node parameters
Split OutTransformSplit OutSee node parameters
Add tracks to DownloadsFiles / mediaSpotifyplaylist
Get Downloads PlaylistFiles / mediaSpotifyplaylist / get
Filter out new tracksCodeCodeSee node parameters
Get tracks to removeCodeCodeSee node parameters
Remove oldest tracks from DownloadsFiles / mediaSpotifyplaylist / delete
Filter out Downloads PlaylistRoutingFilterSee node parameters
Get Updated Downloads PlaylistFiles / mediaSpotifyplaylist / get
Get all PlaylistsFiles / mediaSpotifyplaylist / getUserPlaylists
Schedule TriggerTriggerSchedule TriggerSee node parameters
If no Downloads Playlist foundRoutingIfSee node parameters
GlobalsTransformEdit FieldsSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • spotifyOAuth2Api

Workflow notes

Set Globals

Set Globals

Define the download_limit of how many songs should be kept in the Downloads playlist. This setup currently supports a maximum of 50.

Setup Trigger

Setup Trigger

Define the update interval. By default the playlist gets updated ones a day.

Information

Information

This workflow automatically creates a playlist in Spotify named "Downloads". It keeps a list of a defined amount of the latest liked songs up to date.

This enables only the Downloads playlist to set for automatic downloading and thus free up space on the device.

Beware that it can take several minutes until a newly created Spotify developer app is fully functioning.

Sticky Note3

Get the "Downloads" playlist by name. Create it, if it does not exist.

Sticky Note4

Get all latest liked songs and check whether they already exist in the Downloads playlist.

Sticky Note5

Add new tracks to the Downloads playlist. Remove tracks if they exceed the defined limit.

create playlist spotify and get liked tracks and aggregate

create playlist spotify and get liked tracks and aggregate

Purpose and structure

This folder contains the create playlist spotify and get liked tracks and aggregate workflow. Its executable nodes use aggregate, code, filter, if, scheduleTrigger, set, splitInBatches, splitOut, spotify. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Schedule Trigger

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/0503_Splitout_Code_Create_Scheduled.json MIT; preserve source notices.

More in Media & content