← All N8N workflows
Data & databasesCodeFilterIfMergeNo Op

Check if the song is present in the database

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

Workflow preview
CodeGet current dateCodeFiles / mediaGet last 10 likedtracksSpotifyData storeCheck if track is savedNoco DbRoutingIs not savedIfData storeCreate song entryNoco DbFiles / mediaGet all user playlistSpotifyRoutingGet monthly playlistFilterData storeGet playlist in DBNoco DbRoutingMonthly playlist existin Spotify ?IfRoutingPlaylist exist in DB ?IfFiles / mediaCreate playlist inSpotifySpotifyData storeCreate playlist in DB1Noco DbData storeCreate playlist in DBNoco DbTransformMergeMergeRoutingClean opNo OpRoutingClean op2No OpData storeGet this month playlistin DBNoco DbData storeGet this month tracksin DBNoco DbFiles / mediaAdd song to theplaylistSpotifyRoutingFor each tracks inliked songLoop Over ItemsRoutingFor each monthly tracksin DBLoop Over ItemsFiles / mediaGet this month tracksin SpotifySpotifyRoutingFilter1FilterRoutingSong is not present inthe playlist ?IfRoutingClean op1No OpTriggerSchedule TriggerSchedule TriggerRoutingEndNo Op

Node categories in this workflow

  • Code
  • Files / media
  • Data store
  • Routing
  • Transform
  • 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
Get current dateCodeCodeSee node parameters
Get last 10 liked tracksFiles / mediaSpotifylibrary
Check if track is savedData storeNoco DbgetAll
Is not savedRoutingIfSee node parameters
Create song entryData storeNoco Dbcreate
Get all user playlistFiles / mediaSpotifyplaylist / getUserPlaylists
Get monthly playlistRoutingFilterSee node parameters
Get playlist in DBData storeNoco DbgetAll
Monthly playlist exist in Spotify ?RoutingIfSee node parameters
Playlist exist in DB ?RoutingIfSee node parameters
Create playlist in SpotifyFiles / mediaSpotifyplaylist / create
Create playlist in DB1Data storeNoco Dbcreate
Create playlist in DBData storeNoco Dbcreate
MergeTransformMergeSee node parameters
Clean opRoutingNo OpSee node parameters
Clean op2RoutingNo OpSee node parameters
Get this month playlist in DBData storeNoco DbgetAll
Get this month tracks in DBData storeNoco DbgetAll
Add song to the playlistFiles / mediaSpotifyplaylist
For each tracks in liked songRoutingLoop Over ItemsSee node parameters
For each monthly tracks in DBRoutingLoop Over ItemsSee node parameters
Get this month tracks in SpotifyFiles / mediaSpotifyplaylist / getTracks
Filter1RoutingFilterSee node parameters
Song is not present in the playlist ?RoutingIfSee node parameters
Clean op1RoutingNo OpSee node parameters
Schedule TriggerTriggerSchedule TriggerSee node parameters
EndRoutingNo OpSee 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

  • nocoDbApiToken
  • spotifyOAuth2Api

Workflow notes

Check if the song is present in the database

Check if the song is present in the database

Purpose and structure

This folder contains the Check if the song is present in the database workflow. Its executable nodes use code, filter, if, merge, noOp, nocoDb, scheduleTrigger, splitInBatches, 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/Code/0034_Code_Filter_Create_Scheduled.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Check if the song is present in the database
  • Check if the playlist present in the database
  • Check if the song is in the Spotify playlist. If not, add it.

More in Data & databases