# Spotify to YouTube playlist synchronization with Discord: n8n workflow

> 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...

Source: https://millionrounds.com/workflow/spotify-to-youtube-playlist-synchronization-with-discord (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Data collection](https://millionrounds.com/workflows?category=Data+collection#library)

# 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

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fspotify-to-youtube-playlist-synchronization-with-discord)

**45 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**3** Loops or waits

**3** Services it connects to

## The flow

Starts it 5 Logic 16 Service 24

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

- 1 **Every day at noon** Schedule trigger *Starts it*
- 2 **Every day at noon + 1mn** Schedule trigger *Starts it*
- 3 **Every hour** Schedule trigger *Starts it*
- 4 **Every day at midnight** Schedule trigger *Starts it*
- 5 **Every month** Schedule trigger *Starts it*
- 6 **variables2** Set *Logic*
- 7 **variables1** Set *Logic*
- 8 **variables** Set *Logic*
- 9 **variables3** Set *Logic*
- 10 **variables4** Set *Logic*
- 11 **Spotify** Spotify *Service*
- 12 **Get all musics** Supabase *Service*
- 13 **Get all musics not in youtube playlist** Supabase *Service*
- 14 **Get playlist snapshot** Spotify *Service*
- 15 **Get all musics that should be in playlist** Supabase *Service*
- 16 **Get playlist items** You Tube *Service*
- 17 **Get all musics to be deleted** Supabase *Service*
- 18 **Reset NOTFOUND id to NULL** Supabase *Service*
- 19 **Compare Datasets** Compare Datasets *Service*
- 20 **data** Set *Logic*
- 21 **Wait 1 hour** Wait *Logic*
- 22 **Check for deleted videos** Compare Datasets *Service*
- 23 **Playlist items to be deleted** Compare Datasets *Service*
- 24 **Add music** Supabase *Service*
- 25 **Update to_delete to true** Supabase *Service*
- 26 **Loop Over Items1** Split In Batches *Logic*
- 27 **Get playlist snapshot1** Spotify *Service*
- 28 **Set youtube_video_id to null** Supabase *Service*
- 29 **Remove Duplicates** Remove Duplicates *Logic*
- 30 **data1** Set *Logic*
- 31 **If different snapshot** If *Logic*
- 32 **Remove video from playlist** You Tube *Service*
- 33 **Search video** You Tube *Service*
- 34 **No Operation, do nothing** No Op *Logic*
- 35 **Delete music** Supabase *Service*
- 36 **If no result** If *Logic*
- 37 **Aggregate** Aggregate *Logic*
- 38 **Loop Over Items** Split In Batches *Logic*
- 39 **Set youtube id to NOTFOUND if no matching** Supabase *Service*
- 40 **Get video duration** You Tube *Service*
- 41 **Discord1** Discord *Service*
- 42 **If video duration ~= music duration** If *Logic*
- 43 **Add music to playlist** You Tube *Service*
- 44 **Add youtube id to row** Supabase *Service*
- 45 **Discord** Discord *Service*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fspotify-to-youtube-playlist-synchronization-with-discord)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Discord](https://millionrounds.com/workflows?service=Discord#library)[Supabase](https://millionrounds.com/workflows?service=Supabase#library)[YouTube](https://millionrounds.com/workflows?service=YouTube#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**WordPress - AI chatbot to enhance user experience** 45 steps · calls a model · Postgres, Supabase](https://millionrounds.com/workflow/wordpress-ai-chatbot-to-enhance-user-experience)
- [**Interactive knowledge base chat with Supabase RAG** 43 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/interactive-knowledge-base-chat-with-supabase-rag)
- [**Multi-agent personal assistant orchestration with OpenAI** 49 steps · calls a model · Redis, Supabase](https://millionrounds.com/workflow/multi-agent-personal-assistant-orchestration-with-openai)
- [**From sitemap crawling to vector storage: Creating an efficient** 35 steps · calls a model · Postgres, Supabase](https://millionrounds.com/workflow/from-sitemap-crawling-to-vector-storage-creating-an-efficien)
- [**Automatic YouTube shorts generator with Google Cloud Storage** 34 steps · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/automatic-youtube-shorts-generator-with-google-cloud-storage)
- [**Create a self-updating RAG chatbot with Google Drive** 34 steps · calls a model · Google Drive, Postgres](https://millionrounds.com/workflow/create-a-self-updating-rag-chatbot-with-google-drive)
