A Google Apps Script project that allows you to manage your Spotify playlists directly from Google Sheets.
- Download playlists from your Spotify library to Google Sheets
- Search and download public playlists
- Update existing playlists by adding, removing and reordering tracks
- Create new private playlists
- Manage 'Liked Songs' library
- Google Account
- Spotify Account
- Spotify Developer Account (for API credentials)
-
Create a new Google Sheet at sheets.google.com
-
Open Apps Script Editor ("Extensions" > "Apps Script")
-
In the Apps Script Editor, create the files located in the respective folders with the same name and in lower case
Script files (
.gs):config core operations sheets uiHTML files (
.html):user_guide setup_guide playlists_manager download_playlists update_playlists create_playlists error -
Copy-paste the file contents from this GitHub repo into the respective files
-
Once saved, refresh your Google Sheet to see the "🎵 Spotify Playlists Manager" menu
-
Click on the "🎵 Spotify Playlists Manager" menu, and follow the steps to authorize the Apps Script project
-
Follow the "ℹ️ User Guide" menu to understand the features
-
Follow the "🛠️ Setup Guide" menu to:
- Create Spotify API credentials
- Add OAuth2 library
- Authorize the application
-
Once authorized and connected to Spotify API, you can use the "Playlists Manager" menu to easily manage your playlists
config.gs: Configuration constants and user settingscore.gs: Core Spotify API functionality and authenticationoperations.gs: Playlist managementsheets.gs: Google Sheets operationsui.gs: UI components and event handlers- HTML files: Web interfaces for different features
-
Playlists Summary
- Click on "Get Summary" to see all your playlists info
-
Download Playlists
- Select your playlists or search public playlists to download
- View detailed track information in sheets
-
Update Playlists
- Add/remove tracks using Track IDs
- Reorder tracks by moving rows
- Click "Update Playlist" to sync changes
-
Create Playlists
- Name your playlist
- Add description (optional)
- Add tracks in the new sheet
- Use "Update Playlists" option to upload tracks
To customize the script, modify the values in the USER_CONFIG constant located in the config.gs file:
fontSize: Set the default font sizedefaultFont: Set the default fonthideMetadataRows: Hide the metadata rows at the top of each playlistsummarySheetName: Name of the Playlists Summary sheetsavedTracksName: Name for user's 'Liked Songs'savedTracksDesc: Description for user's 'Liked Songs'
- Maximum 10,000 tracks per playlist (Spotify limit)
- Cannot download Spotify algorithmic/editorial playlists
- To update Public playlists, you will need to be added as a collaborator
- Spotify API rate limits may impact performance for large playlists, multiple reordering or frequent syncing
- The Google Apps Script project may experience slow performance due to platform limitations
- Complex operations might need to be performed in batches, as a Google Apps Script run times out in 6 minutes
- OAuth2 library for Google Apps Script
- Spotify Web API
- TailwindCSS (via CDN)
- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License
