Sync Spotify Tracks to Supabase and Create YouTube Playlists
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.Extract track data from Spotify according to the scheduled trigger
- 2.Validate new data and compare it against existing records in Supabase
- 3.Split data into batches and apply conditional filters for processing
- 4.Remove duplicate tracks from the dataset
- 5.Create playlists on YouTube with the processed track information
- 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
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (54)
Get playlist snapshot
If
Get playlist snapshot1
If
If different snapshot
If
Get all musics
Supabase
Update to_delete to true
Supabase
Add music
Supabase
Compare Datasets
Set
Spotify
If
No Operation, do nothing
No Op
Get all musics not in youtube playlist
Supabase
Every day at noon
Schedule Trigger
Every day at noon + 1mn
Schedule Trigger
Every hour
Schedule Trigger
Wait 1 hour
Wait
variables
Set
Search video
You Tube
Get video duration
You Tube
Loop Over Items
Split In Batches
If video duration ~= music duration
If
Add music to playlist
You Tube
Add youtube id to row
Supabase
Discord
Discord
Discord1
Discord
Set youtube id to NOTFOUND if no matching
Supabase
Aggregate
Aggregate
If no result
If
data
Set
variables2
Set
variables1
Set
Loop Over Items1
Split In Batches
data1
Set
Get playlist items
You Tube
Playlist items to be deleted
Set
Get all musics that should be in playlist
Supabase
Remove Duplicates
Remove Duplicates
Remove video from playlist
You Tube
Check for deleted videos
Set
Set youtube_video_id to null
Supabase
Get all musics to be deleted
Supabase
Delete music
Supabase
Every day at midnight
Schedule Trigger
variables3
Set
Reset NOTFOUND id to NULL
Supabase
variables4
Set
Every month
Schedule Trigger
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Sticky Note6
Sticky Note