Get the FREE Ultimate OpenClaw Setup Guide →

Spotify Automation

Scanned
npx machina-cli add skill ComposioHQ/awesome-claude-skills/spotify-automation --openclaw
Files (1)
SKILL.md
7.2 KB

Spotify Automation

Automate Spotify operations -- manage playlists, search the music catalog, control playback, browse albums and tracks, and access user profiles -- all orchestrated through the Composio MCP integration.

Toolkit docs: composio.dev/toolkits/spotify


Setup

  1. Connect your Spotify account through the Composio MCP server at https://rube.app/mcp
  2. The agent will prompt you with an authentication link if no active connection exists
  3. Once connected, all SPOTIFY_* tools become available for execution
  4. Note: Some features (playback control) require a Spotify Premium subscription

Core Workflows

1. Get Current User Profile

Retrieve comprehensive profile information for the authenticated Spotify user.

Tool: SPOTIFY_GET_CURRENT_USER_S_PROFILE

No parameters required.
Returns: display name, email, country, subscription level (premium/free),
explicit content settings, profile images, follower count, and Spotify URIs.
Required scopes: user-read-private, user-read-email.

2. Search the Spotify Catalog

Find albums, artists, playlists, tracks, shows, episodes, or audiobooks by keyword.

Tool: SPOTIFY_SEARCH_FOR_ITEM

ParameterTypeRequiredDescription
qstringYesSearch query keywords
typearrayYesItem types: album, artist, playlist, track, show, episode, audiobook
limitintegerNoResults to return (default: 20)
offsetintegerNoOffset for pagination (default: 0)
marketstringNoISO 3166-1 alpha-2 country code
include_externalstringNoSet to audio to include external content

Note: Audiobooks are only available in US, UK, Canada, Ireland, New Zealand, and Australia.


3. Manage Playlists

Browse, create, modify, and populate playlists.

Get a user's playlists:

Tool: SPOTIFY_GET_USER_S_PLAYLISTS

ParameterTypeRequiredDescription
user_idstringYesSpotify user ID
limitintegerNoMax playlists, 1-50 (default: 20)
offsetintegerNoPagination offset, 0-100000 (default: 0)

Get current user's playlists:

Tool: SPOTIFY_GET_CURRENT_USER_S_PLAYLISTS

ParameterTypeRequiredDescription
limitintegerNoMax playlists, 1-50 (default: 20)
offsetintegerNoPagination offset, 0-100000 (default: 0)

Get playlist details:

Tool: SPOTIFY_GET_PLAYLIST

ParameterTypeRequiredDescription
playlist_idstringYesSpotify playlist ID (e.g., 3cEYpjA9oz9GiPac4AsH4n)
fieldsstringNoComma-separated field filter to reduce response size
marketstringNoISO country code for market-specific content
additional_typesstringNotrack,episode to include podcast episodes

Update playlist details:

Tool: SPOTIFY_CHANGE_PLAYLIST_DETAILS

ParameterTypeRequiredDescription
playlist_idstringYesPlaylist ID (must be owned by current user)
namestringNoNew playlist name
descriptionstringNoNew playlist description
publicbooleanNoPublic/private toggle
collaborativebooleanNoCollaborative mode (only on non-public playlists)

4. Browse Playlist Items & Add Tracks

View tracks in a playlist and add new items.

Tool: SPOTIFY_GET_PLAYLIST_ITEMS

ParameterTypeRequiredDescription
playlist_idstringYesSpotify playlist ID
limitintegerNoItems per page, 1-50 (default: 20)
offsetintegerNoPagination offset (default: 0)
fieldsstringNoField filter (e.g., items(track(name,id)))
marketstringNoISO country code
additional_typesstringNotrack,episode for podcast episodes

Tool: SPOTIFY_ADD_ITEMS_TO_PLAYLIST

Add tracks or episodes to a playlist using Spotify URIs.


5. Get Track & Album Details

Retrieve catalog information for individual tracks and albums.

Tool: SPOTIFY_GET_TRACK -- Get details for a single track by Spotify ID.

Tool: SPOTIFY_GET_ALBUM -- Get comprehensive album data including track listing, artist info, cover art, and popularity.


6. Control Playback

Start, resume, or change playback on the user's active device.

Tool: SPOTIFY_START_RESUME_PLAYBACK

ParameterTypeRequiredDescription
context_uristringNoSpotify URI of album, artist, or playlist (cannot combine with uris)
urisarrayNoList of track URIs to play (cannot combine with context_uri)
offsetobjectNoStarting position: {position: 5} or {uri: 'spotify:track:...'}
position_msintegerNoStart position in milliseconds
device_idstringNoTarget device ID (defaults to active device)

Requirements: Spotify Premium subscription and at least one active device.


Known Pitfalls

PitfallDetails
Premium required for playbackSPOTIFY_START_RESUME_PLAYBACK returns 403 if the user does not have Spotify Premium
Active device requiredPlayback control returns 404 if no Spotify device (mobile, desktop, web, speaker) is active
context_uri vs uris are exclusiveCannot use both context_uri and uris in the same playback call
Collaborative playlistscollaborative can only be set to true on non-public playlists (public must be false)
Playlist ownershipSPOTIFY_CHANGE_PLAYLIST_DETAILS only works on playlists owned by the authenticated user
Audiobook market restrictionsAudiobooks via search are only available in US, UK, Canada, Ireland, New Zealand, and Australia
Max 11000 playlistsUsers are limited to approximately 11,000 playlists via SPOTIFY_CREATE_PLAYLIST

Quick Reference

Tool SlugPurpose
SPOTIFY_GET_CURRENT_USER_S_PROFILEGet authenticated user's profile
SPOTIFY_SEARCH_FOR_ITEMSearch catalog for tracks, albums, artists, etc.
SPOTIFY_GET_USER_S_PLAYLISTSGet playlists for any user
SPOTIFY_GET_CURRENT_USER_S_PLAYLISTSGet current user's playlists
SPOTIFY_GET_PLAYLISTGet detailed playlist info
SPOTIFY_GET_PLAYLIST_ITEMSList tracks/episodes in a playlist
SPOTIFY_CHANGE_PLAYLIST_DETAILSUpdate playlist name, description, visibility
SPOTIFY_CREATE_PLAYLISTCreate a new playlist
SPOTIFY_ADD_ITEMS_TO_PLAYLISTAdd tracks/episodes to a playlist
SPOTIFY_GET_TRACKGet track details by ID
SPOTIFY_GET_ALBUMGet album details by ID
SPOTIFY_START_RESUME_PLAYBACKStart or resume playback on a device

Powered by Composio

Source

git clone https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/spotify-automation/SKILL.mdView on GitHub

Overview

Spotify Automation orchestrates playlist management, catalog search, playback control, and profile access for a connected account. It leverages the Composio MCP integration to run SPOTIFY_* tools, enabling automated curation, discovery, and user-specific actions. This is useful for building repeatable Spotify routines across teams, apps, or workflows.

How This Skill Works

After connecting your Spotify account through the Composio MCP server at https://rube.app/mcp, SPOTIFY_* tools become available for execution. The agent uses these tools to get the current user profile, search the catalog, manage playlists, and control playback. Note that playback control requires a Spotify Premium subscription.

When to Use It

  • Automate playlist creation and curation for a team or event.
  • Seed playlists by searching the catalog with keywords (albums, artists, tracks).
  • Fetch and display the authenticated user’s profile for personalization.
  • Update playlist details (name, description, visibility) and populate with tracks.
  • Browse playlist items and programmatically add or modify tracks.

Quick Start

  1. Step 1: Connect your Spotify account through the Composio MCP server at https://rube.app/mcp.
  2. Step 2: Complete authentication if prompted and verify SPOTIFY_* tools are available.
  3. Step 3: Run a quick test, e.g., SPOTIFY_GET_CURRENT_USER_S_PROFILE or SPOTIFY_SEARCH_FOR_ITEM with a sample query.

Best Practices

  • Ensure MCP connection is established before invoking SPOTIFY_* tools.
  • Use the required scopes (user-read-private, user-read-email) for profile data.
  • Be mindful that playback controls require Spotify Premium.
  • Paginate safely with limit and offset when listing playlists or search results.
  • Test changes on a non-critical playlist to avoid accidental edits.

Example Use Cases

  • Create a new playlist named 'Team Picks' and populate it with top tracks from a search.
  • Search for 'focus' and add the top 10 results to an existing playlist.
  • Retrieve the current user's profile to display display name and subscription level.
  • Update a playlist's description and visibility, then save changes.
  • List a user's playlists and inspect a specific playlist's details.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers