import_playlist
Imports playlists from M3U or CSV files, extracts Spotify URIs, and appends them to a target Spotify playlist. Handles batching and deduplication with a dry-run preview option.
Instructions
Parse an M3U or CSV document (the inverse of export_playlist) and append its Spotify URIs to a target playlist. Pass the document inline via content or read it from input_path. Skips non-Spotify lines, dedupes within the batch, and adds in batches of 100. Use dry_run=true to preview without writing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Document format; auto-detected when omitted | |
| content | No | The M3U or CSV document body, passed inline | |
| dry_run | No | Parse and report what would be added without touching the playlist | |
| input_path | No | Read the document from this local file instead of content | |
| playlist_id | Yes | Target playlist ID or spotify:playlist: URI |