Data & Databases

Sync Spotify Tracks to Supabase and Create YouTube Playlists

54 nodes 110 78 Scheduled trigger
Download

Workflow Description

A scheduled automation that extracts Spotify data at regular intervals, stores it in Supabase database, and automatically creates YouTube playlists based on extracted information, with duplicate removal and Discord notifications for tracking progress.

How it works

  1. 1.Extract track data from Spotify according to the scheduled trigger
  2. 2.Validate new data and compare it against existing records in Supabase
  3. 3.Split data into batches and apply conditional filters for processing
  4. 4.Remove duplicate tracks from the dataset
  5. 5.Create playlists on YouTube with the processed track information
  6. 6.Send completion notifications to Discord with operation results

Use cases

  • Maintain a synchronized music library linking streaming platforms with centralized data storage
  • Build music recommendation systems using Supabase as the primary data repository
  • Automatically organize favorite tracks and group them into YouTube playlists
  • Monitor Spotify updates and receive instant alerts when new content is added

Requirements

  • Active Spotify account with API access credentials
  • Supabase database configured with tables for data storage
  • YouTube account with permissions to create and manage playlists
  • Discord server or channel configured for notifications

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

If Supabase YouTube Split In Batches Discord Remove Duplicates

Details

Trigger Scheduled trigger
Nodes 54
Apps 6
Views 110
Downloads 78

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (54)

/

Get playlist snapshot

If

#1

Get playlist snapshot1

If

#2

If different snapshot

If

#3

Get all musics

Supabase

#4

Update to_delete to true

Supabase

#5

Add music

Supabase

#6

Compare Datasets

Set

#7

Spotify

If

#8

No Operation, do nothing

No Op

#9

Get all musics not in youtube playlist

Supabase

#10

Every day at noon

Schedule Trigger

#11

Every day at noon + 1mn

Schedule Trigger

#12

Every hour

Schedule Trigger

#13

Wait 1 hour

Wait

#14

variables

Set

#15

Search video

You Tube

#16

Get video duration

You Tube

#17

Loop Over Items

Split In Batches

#18

If video duration ~= music duration

If

#19

Add music to playlist

You Tube

#20

Add youtube id to row

Supabase

#21

Discord

Discord

#22

Discord1

Discord

#23

Set youtube id to NOTFOUND if no matching

Supabase

#24

Aggregate

Aggregate

#25

If no result

If

#26

data

Set

#27

variables2

Set

#28

variables1

Set

#29

Loop Over Items1

Split In Batches

#30

data1

Set

#31

Get playlist items

You Tube

#32

Playlist items to be deleted

Set

#33

Get all musics that should be in playlist

Supabase

#34

Remove Duplicates

Remove Duplicates

#35

Remove video from playlist

You Tube

#36

Check for deleted videos

Set

#37

Set youtube_video_id to null

Supabase

#38

Get all musics to be deleted

Supabase

#39

Delete music

Supabase

#40

Every day at midnight

Schedule Trigger

#41

variables3

Set

#42

Reset NOTFOUND id to NULL

Supabase

#43

variables4

Set

#44

Every month

Schedule Trigger

#45

Sticky Note

Sticky Note

#46

Sticky Note1

Sticky Note

#47

Sticky Note2

Sticky Note

#48

Sticky Note3

Sticky Note

#49

Sticky Note4

Sticky Note

#50

Sticky Note5

Sticky Note

#51

Sticky Note7

Sticky Note

#52

Sticky Note8

Sticky Note

#53

Sticky Note6

Sticky Note

#54