Managing your YouTube channel manually can become time-consuming, especially if you have several playlists to update or maintain. One common task creators often face is the need to make multiple playlists private—either for temporary reasons (like a rebrand or cleanup) or as part of a workflow.
While YouTube does not offer a bulk privacy setting option in its interface, you can accomplish this with Google Apps Script—a JavaScript-based cloud scripting language that can interact with many Google services, including YouTube.
In this detailed guide, we will walk through how to use Google Apps Script to:
Authenticate with your YouTube account.
Fetch your playlists.
Set their visibility to “private”.
Schedule this task if needed (optional).
Google Apps Script is a lightweight scripting platform that works with Google services like Sheets, Drive, YouTube, Gmail, and more. For YouTube, it allows you to programmatically:
Manage videos and playlists
Update metadata
Change privacy settings
Automate content workflows
Making playlists private with this tool offers you more flexibility than the standard YouTube interface.
Before you begin coding, enable the YouTube Data API v3 for your Google account.
Create a new project or select an existing one.
In the sidebar, go to "Library".
Search for "YouTube Data API v3" and click Enable.
Also, make sure you’ve enabled OAuth consent screen (necessary for authorization).
Click "New Project"
Name your project: YouTube Playlist Privacy Tool
Here is a complete script that finds all your playlists and sets them to private:
function makeAllPlaylistsPrivate() {
var response = YouTube.Playlists.list('id,snippet,status', {
mine: true,
maxResults: 50
});
if (!response.items || response.items.length === 0) {
Logger.log('No playlists found.');
return;
}
for (var i = 0; i < response.items.length; i++) {
var playlist = response.items[i];
var playlistId = playlist.id;
var title = playlist.snippet.title;
var privacyStatus = playlist.status.privacyStatus;
if (privacyStatus !== 'private') {
Logger.log('Making "' + title + '" private...');
var update = {
id: playlistId,
status: {
privacyStatus: 'private'
}
};
YouTube.Playlists.update(update, 'id,status');
} else {
Logger.log('"' + title + '" is already private.');
}
}
}
Before running the script, you must enable the YouTube Advanced Service in Apps Script:
In the Apps Script editor, click "Services" (the + icon on the left panel).
Search for YouTube Data API.
Click Add.
This allows your script to use YouTube.Playlists and other advanced methods.
Click the function dropdown and select makeAllPlaylistsPrivate.
Click the Run ▶ button.
Authorize the script when prompted.
After authorization, run the script again.
You should now see the logger printing messages such as:
Making "My Travel Vlogs" private...
"My Old Vlogs" is already private.
All playlists found will be updated to private unless already so.
If you want to run this script regularly—for example, to ensure all newly created playlists remain private—you can use a time-based trigger.
In the Apps Script editor, go to Triggers (alarm clock icon in left menu).
Click + Add Trigger.
Choose:
Function: makeAllPlaylistsPrivate
Event Source: Time-driven
Type: e.g., Every day, or Every hour
Save
Now your script will automatically run and update playlist privacy on the chosen schedule.
Batch privacy reset before launching a new version of your channel.
Temporarily hiding playlists during maintenance or review.
Content migration workflows, where you want to hide outdated playlists.
Enforcing policy compliance, especially in multi-user YouTube channels or brand accounts.
YouTube's API quota is limited to 10,000 units per day. Each playlist update costs about 50 units, so plan accordingly.
You must be logged in with the account that owns the playlists.
Only the owner of the channel can modify playlist privacy settings.
This script does not affect individual videos—only playlists.
You can extend this to filter by title or skip certain playlists by modifying the loop.
You can modify the script to:
Only make playlists with a certain keyword in the title private.
Export a list of all playlist titles and privacy status to Google Sheets.
Log all changes to a Google Doc for records.
Example: Make only playlists with "archive" in the title private
if (title.toLowerCase().includes("archive") && privacyStatus !== 'private') {
// continue with update
}
YouTube offers powerful APIs, and using Google Apps Script gives you a practical way to take control of your channel. By making playlists private through automation, you save time, reduce manual errors, and maintain a consistent content strategy. Whether you're managing a small personal channel or a large branded one, this workflow is highly useful for content privacy and management.
Now that you've seen how easy it is to automate YouTube playlist privacy, you can explore other features like video privacy, automated tagging, or syncing metadata with Sheets.