Automation library · Data collection

Spotify to YouTube playlist synchronization with Discord

Started by a clock, and works across Discord, Supabase and YouTube. 45 steps, 3 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

Large

45 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
3Loops or waits
3Services it connects to

The flow

Starts it 5Logic 16Service 24

The steps in the order they run, from what starts it.

  1. 1Every day at noonSchedule triggerStarts it
  2. 2Every day at noon + 1mnSchedule triggerStarts it
  3. 3Every hourSchedule triggerStarts it
  4. 4Every day at midnightSchedule triggerStarts it
  5. 5Every monthSchedule triggerStarts it
  6. 6variables2SetLogic
  7. 7variables1SetLogic
  8. 8variablesSetLogic
  9. 9variables3SetLogic
  10. 10variables4SetLogic
  11. 11SpotifySpotifyService
  12. 12Get all musicsSupabaseService
  13. 13Get all musics not in youtube playlistSupabaseService
  14. 14Get playlist snapshotSpotifyService
  15. 15Get all musics that should be in playlistSupabaseService
  16. 16Get playlist itemsYou TubeService
  17. 17Get all musics to be deletedSupabaseService
  18. 18Reset NOTFOUND id to NULLSupabaseService
  19. 19Compare DatasetsCompare DatasetsService
  20. 20dataSetLogic
  21. 21Wait 1 hourWaitLogic
  22. 22Check for deleted videosCompare DatasetsService
  23. 23Playlist items to be deletedCompare DatasetsService
  24. 24Add musicSupabaseService
  25. 25Update to_delete to trueSupabaseService
  26. 26Loop Over Items1Split In BatchesLogic
  27. 27Get playlist snapshot1SpotifyService
  28. 28Set youtube_video_id to nullSupabaseService
  29. 29Remove DuplicatesRemove DuplicatesLogic
  30. 30data1SetLogic
  31. 31If different snapshotIfLogic
  32. 32Remove video from playlistYou TubeService
  33. 33Search videoYou TubeService
  34. 34No Operation, do nothingNo OpLogic
  35. 35Delete musicSupabaseService
  36. 36If no resultIfLogic
  37. 37AggregateAggregateLogic
  38. 38Loop Over ItemsSplit In BatchesLogic
  39. 39Set youtube id to NOTFOUND if no matchingSupabaseService
  40. 40Get video durationYou TubeService
  41. 41Discord1DiscordService
  42. 42If video duration ~= music durationIfLogic
  43. 43Add music to playlistYou TubeService
  44. 44Add youtube id to rowSupabaseService
  45. 45DiscordDiscordService

How it's built

Starts on
A clock
Steps
45, with 3 branches, 3 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Discord, Supabase, YouTube
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Discord, Supabase and YouTube accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 45 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 45 steps before you point it at anything that matters.