Skip to content

Collects as they arrive, acts daily

Get a Sunday email of your top artists and tracks

An email each Sunday evening ranks what you played most that week.

Runs
Collects as they arrive, acts daily
Apps
Spotify
AI
Not needed
Access
user-read-recently-played

Send this to your assistant

Create a ClickRuntime automation: track what I play on Spotify through the week and every Sunday at 7pm email me my top 5 artists and top 10 tracks.

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

Streaming services publish a year-end recap, and little else. If you want to know what you actually played this week, which artists dominated, or whether you have been stuck on the same album since Tuesday, there is nowhere to look. Spotify only exposes your last fifty plays, so by the time you wonder, the data has already moved on, and unlike scrobbling services you cannot go back and reconstruct a week from the app.

Throughout the week, ClickRuntime polls your recently played tracks and stores any new plays as they arrive, so none are lost between checks. On Sunday it counts your top artists and top tracks from the stored plays and emails you a short digest of the week in music.

It suits people who like looking at their own habits, and those who want to find the songs they kept replaying.

What you get out of it

  • Your week in music is kept

    Since Spotify only returns fifty recent plays, saving them as they arrive is the only way to see a whole week. Without it, most of your listening disappears unrecorded. The recap becomes a complete record of the week's listening.

  • Favorites are identified by plays

    The counts show which songs you replayed most, which are often the ones worth adding to a playlist or buying. Your behavior says more than your memory does. A play count is a more honest guide than the songs you remember.

  • Habits become visible

    Seeing that one artist took a third of your listening time is interesting and sometimes surprising. It is a gentle prompt to explore something new, or to enjoy your current obsession. It can also help you see when you have stopped exploring. Seeing it laid out in numbers is more revealing than memory.

  • A year of recaps builds a history

    Sunday emails collect into a personal archive of what you listened to each week, which is more detailed than any year-end summary and much easier to browse. Looking back at an old week can bring back a memory.

  • Discovery gets a second chance

    A song you played twice in a busy week may be forgotten. The recap points you back to it, so promising new tracks are not lost in the stream. A short list of top tracks is an easy way to rediscover them.

How it works

What happens, step by step

  1. Every hour, ClickRuntime checks what you have recently played on Spotify and adds any new plays to a running list for the week.

  2. It only picks up plays newer than the last check, so nothing is counted twice.

  3. On Sunday evening it counts up your most played artists and tracks for the week.

  4. You get an email ranking your top artists with play counts and naming your top track, then the list starts fresh for the next week.

Before it runs live

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

What you get

RunsCollects as they arrive, acts daily
Get a Sunday email of your top artists and trackstoday, 9:00Succeeded
Email · Your week on SpotifyTop artists: Acme Quartet (41), Northwind (22), The Contoso Lights (17)… Top track: Harbour Lights – Northwind (9 plays)

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • 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.
weekly_listening_recap_email.pyexample
from collections import Counter
from datetime import datetime
from zoneinfo import ZoneInfo
from clickruntime import on_trigger, credentials, http, state, notify

TZ = ZoneInfo("Europe/London")

@on_trigger
def run(event):  # runs hourly
    h = {"Authorization": f"Bearer {credentials.connection('spotify', 'personal')}"}
    plays = state.get("plays") or []
    after = state.get("after") or 0
    items = http.get("https://api.spotify.com/v1/me/player/recently-played", headers=h,
                     params={"limit": 50, "after": after}).json()["items"]
    plays += [[i["track"]["name"], i["track"]["artists"][0]["name"]] for i in items]
    if items:
        state.set("after", int(datetime.fromisoformat(items[0]["played_at"].replace("Z", "+00:00")).timestamp() * 1000))
    now = datetime.now(TZ)
    if now.weekday() == 6 and now.hour == 19 and plays:
        artists = Counter(a for _, a in plays).most_common(5)
        tracks = Counter(f"{t} – {a}" for t, a in plays).most_common(10)
        notify.email_me("Your week on Spotify",
                        "Top artists:\n" + "\n".join(f"{a} ({n})" for a, n in artists) +
                        "\n\nTop tracks:\n" + "\n".join(f"{t} ({n})" for t, n in tracks))
        plays = []
    state.set("plays", plays)
    return {"stored": len(plays)}

FAQ

Common questions

Why does it collect plays through the week?
Spotify's recently played endpoint returns only the last 50 tracks, which can be a few hours of listening. Storing new plays as they arrive keeps a complete picture for the entire week. Collecting throughout the week avoids gaps.
Does it count a song skipped after a few seconds?
Spotify only reports a track as played after it has run for a short while, usually about 30 seconds. Very quick skips are not included, so the counts reflect songs you actually listened to. The counts therefore track real listening.
What does the Sunday email contain?
It lists your top artists and top tracks with play counts for the week. Further details, like total listening time or number of different artists, can be added if you would like a fuller summary.
What permissions does it need?
user-read-recently-played. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
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 “Get a Sunday email of your top artists and tracks” from your assistant

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