Skip to content

The moment it happens

Build a Spotify playlist from a mood you describe

You send an idea like "rainy Sunday jazz" and get an email with a link to a new 20-song playlist.

Runs
The moment it happens
Apps
Spotify
AI
Yes, uses the built-in AI allowance
Access
playlist-modify-private/public

Send this to your assistant

Create a ClickRuntime automation: give me a link where I can send a playlist idea. Have AI pick 20 songs that fit it, find them on Spotify, create a private playlist and email me the link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

You want music for a specific moment: a rainy Sunday cooking session, a 90-minute focus block, a wedding cocktail hour, a run at a steady 160 beats per minute. Spotify's search finds individual songs, and editorial playlists are generic. Building the right one yourself means thinking of fifty tracks, searching for each, checking that it is the right version and adding them one at a time. Most people give up after ten songs and settle for something close.

You send a short description, either from a form, a shortcut on your phone or any tool that can call a URL. ClickRuntime's built-in AI proposes a list of tracks and artists that fit it, searches for each on Spotify, creates a new playlist in your account, adds the tracks that were found and emails you the link to open.

DJs planning sets, event hosts, fitness instructors and anyone who is tired of making playlists by hand will get the most from it.

What you get out of it

  • Playlists exist in a minute, not an evening

    A mood or a theme becomes a ready playlist before the thought has passed. Event hosts and instructors can prepare a different list for each class or occasion without the usual time spent searching song by song.

  • Descriptions can be as specific as you like

    Asking for upbeat 80s synth-pop with no ballads, or quiet piano for studying, gives a result shaped by your words. Every request produces a playlist matched to that situation instead of a generic one.

  • New artists are introduced alongside favorites

    The AI draws on a broad knowledge of music, so lists often include songs you did not think to search for. That is one of the best ways to discover tracks that fit a mood.

  • Real Spotify tracks are used

    Each suggestion is searched on Spotify, and only those found are added, so you do not end up with invented songs. The playlist works immediately in the app on your phone or speakers.

  • Sharing is trivial

    The link arrives by email, so you can pass it to a guest, a colleague or a class straight away. Everyone hears the same list, and it stays in your account to reuse next time.

How it works

What happens, step by step

  1. When you send an idea like "rainy Sunday jazz" to your automation's link, ClickRuntime starts straight away.

  2. AI suggests around 20 songs and artists that fit the mood.

  3. ClickRuntime finds each song on Spotify and adds the ones it finds to a new playlist named after your idea.

  4. You get an email with the playlist link and how many songs made it in.

Before it runs live

  • Connect Spotify
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Build a Spotify playlist from a mood you describejust nowSucceeded
Email · New playlistYour playlist: rainy Sunday baking jazz 19 songs · https://open.spotify.com/playlist/3kX…

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Spotify steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
ai_playlist_from_a_text_description.pyexample
from clickruntime import on_event, credentials, http, ai, notify

API = "https://api.spotify.com/v1"

@on_event
def handle(event):
    idea = (event.json or {}).get("idea", "")
    h = {"Authorization": f"Bearer {credentials.connection('spotify', 'personal')}"}
    picks = ai.generate(f"Suggest 20 real songs for a playlist: {idea}",
                        json_schema={"type": "object", "properties": {"songs": {"type": "array", "items": {
                            "type": "object", "properties": {"title": {"type": "string"}, "artist": {"type": "string"}}}}}},
                        max_output_tokens=800).json["songs"]
    uris = []
    for s in picks:
        found = http.get(f"{API}/search", headers=h, params={
            "q": f"track:{s['title']} artist:{s['artist']}", "type": "track", "limit": 1}).json()
        items = found["tracks"]["items"]
        if items:
            uris.append(items[0]["uri"])
    playlist = http.post(f"{API}/me/playlists", headers=h,
                         json={"name": idea[:80], "public": False}).json()
    http.post(f"{API}/playlists/{playlist['id']}/tracks", headers=h, json={"uris": uris})
    notify.email_me(f"Your playlist: {idea[:60]}", f"{len(uris)} songs\n{playlist['external_urls']['spotify']}")
    return {"tracks": len(uris)}

FAQ

Common questions

Does it need a Spotify Premium account?
Creating playlists through the Spotify API works with a free account as well as Premium. Listening conditions depend on your own plan, but building and saving the playlist does not require paying for Premium. Either way, the finished playlist is yours to keep.
What if a suggested song cannot be found on Spotify?
Each suggestion is searched, and any track without a clear match is skipped instead of guessed. Your playlist therefore holds only real tracks, and you can ask for a longer list if a few get dropped.
How many songs does the playlist contain?
You decide, and 25 to 50 tracks is typical. Mention the length in your description, such as about an hour, and the AI will aim for it, although the final runtime depends on which tracks Spotify finds.
What permissions does it need?
playlist-modify-private/public. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Build a Spotify playlist from a mood you describe” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.