Sync YouTube Playlist to Spotify with n8n Automation

This n8n workflow automates syncing your YouTube playlist tracks to a Spotify playlist, ensuring no duplicates are added. It solves the challenge of manually updating playlists across platforms by comparing track lists and adding only new songs, saving time and eliminating errors.
spotify
youTube
manualTrigger
+3
Workflow Identifier: 1537
NODES in Use: manualTrigger, youTube, splitInBatches, spotify, set, compareDatasets
Sync YouTube to Spotify with n8n

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow copies songs from one YouTube playlist to a Spotify playlist.

It looks for songs in the YouTube list, checks what songs are already on Spotify playlist, and then adds only new songs to Spotify.

This stops duplicates and saves time from searching and typing songs manually.


Inputs, Process, and Output

Inputs

  • YouTube playlist ID: The source list of songs from YouTube.
  • Spotify playlist ID: The target playlist to update.
  • OAuth2 credentials: For YouTube and Spotify access.

Processing Steps

  • Get all songs from the YouTube playlist using the YouTube node.
  • Split items into batches to process songs one by one.
  • Search each song on Spotify by title.
  • Keep the Spotify track IDs from search for later.
  • Get existing tracks from the Spotify playlist.
  • Compare new Spotify track IDs with the existing playlist to find missing songs.
  • Add missing songs to Spotify playlist without duplicates.

Output

The Spotify playlist updates with all unique songs from the YouTube playlist.

The user will have the same songs on both platforms without manual copying.


Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor where you want to run the workflow.
  3. Click “Import from File” and choose the downloaded workflow JSON file.

Step 2: Set Up Credentials

  1. Add YouTube OAuth2 credentials to the YouTube nodes.
  2. Add Spotify OAuth2 credentials to the Spotify nodes.

Step 3: Update Playlist IDs

  1. Change the YouTube node’s playlistId setting to your YouTube playlist ID.
  2. Change Spotify nodes’ settings to use your Spotify playlist ID for fetching and adding tracks.

Step 4: Test Workflow

  1. Click the Manual Trigger node’s button “Execute Workflow” to run it once.
  2. Watch the response to see songs fetched, matched, and added.

Step 5: Activate for Production

  1. After testing, activate the workflow in n8n to run when triggered manually or scheduled.
  2. Optionally, replace the Manual Trigger with a Cron node to automate on a schedule.

If you want full control, you can run this on your own server by self-host n8n.


Tools and Services Used

  • n8n: Automation platform where workflow runs.
  • YouTube API: Fetching playlist songs.
  • Spotify API: Getting and updating playlist tracks.
  • OAuth2 Authentication: Grants secure access to APIs.

Customization Ideas

  • Change YouTube or Spotify playlist IDs to sync different playlists.
  • Adjust batch size in the Split in Batches node to handle API limits.
  • Add artist or album name in Spotify search for better match accuracy.
  • Use a Cron node instead of Manual Trigger to automate syncing regularly.

Common Issues and Solutions

Problem: Spotify Search Finds No Songs

Cause: Song titles from YouTube are different from Spotify titles.

Solution: Improve search queries with extra info like artist name or fix title formats before search.

Problem: Too Many API Requests

Cause: Sending many requests quickly causes rate limits on YouTube or Spotify.

Solution: Use Split in Batches node with smaller batches to slow down requests.

Problem: Authentication Fails

Cause: OAuth2 credentials are expired or wrong.

Solution: Re-authenticate by updating credentials securely in n8n settings.


Summary of Results

✓ Saves time by automating playlist syncing without manual effort.

✓ Prevents duplicates by checking Spotify playlist before adding new songs.

✓ Works with YouTube and Spotify using official APIs and OAuth2 security.

→ Gives users synced playlists on both platforms without mistakes.

→ Easy to set up and customize inside n8n with simple steps.

Sync YouTube to Spotify with n8n

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

Update YouTube playlist ID, Spotify playlist ID, and connect YouTube and Spotify OAuth2 credentials.
It compares Spotify track IDs from existing playlist with new tracks found from YouTube, adding only missing ones.
Differences between YouTube track titles and Spotify titles can cause no matches in search.
Yes, by replacing the Manual Trigger node with a Cron node to run at set times.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.