How to Bulk “Add to Queue” Videos from a Youtube Playlist

Adding videos to a youtube playlist is the easiest way to bulk add videos from one channel. It only takes a few clicks and you can save time by adding all of your favorite content in one place! If you’re looking for ways to increase your productivity, this blog post will help. I’ll show you how to bulk add videos from Youtube playlists so that you can get more done every day.

How to Add to Queue Manually

Youtube has an action button to allow user to add a video to a queue.

The action menu is quite straight forward.

  • Open a playlist on Youtube.
  • Click on the Keban menu on the right side of the video you want to add to queue.
  • Click “Add to queue” button.

How to Bulk Add Videos to Queue

As you see in the manual step, it is quite simple. The script below will simulate these steps.

  • Open Google Chrome’s DevTool by pressing Ctrl+Shift+I or F12.
  • Switch to Console tab.
  • Copy and paste the script below to the console window
var itemIndex = 0;
const maxToAdd = 10;
const delay = 1000; //1 second
if(itemIndex < maxToAdd){
	setInterval(function() {
	document.querySelectorAll('#primary button[aria-label="Action menu"]')[itemIndex].click();
		var items = document.evaluate('//yt-formatted-string[contains(text(),"Add to queue")]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
		for (var i = 0; i < items.snapshotLength; i++) {
		    items.snapshotItem(i).click();	    
		}					
		itemIndex++;
	}, delay);
}

You can adjust max videos allowed to add (maxToAdd) you want to add to queue and the interval (delay) each video is added.

Support Other Languages

Similar to the solution posted on this article, you can change the English text in the script to your language in order to make it work.

The 2 phrases you need to change are:

  • Action menu
  • Add to queue

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top