Skip to content

Hourly

Hear when you set a PR or pass a monthly goal

An email arrives when an activity includes a personal record or your monthly distance passes your target.

Runs
Hourly
Apps
Strava
AI
Not needed
Access
activity:read_all

Send this to your assistant

Create a ClickRuntime automation: email me when a new Strava activity has a PR, and when my running distance this month passes 100 km.

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

A cyclist sets out to ride 1,000 km this month and a new 5K best is somewhere in the legs, but Strava rarely announces either at a useful moment. The PR trophy appears on one activity, gets buried under the next five, and the monthly total is a number you have to calculate by adding up rides in your head.

Each hour, ClickRuntime looks for new Strava activities, checks the pr_count and best efforts on each, and adds the distance to a running monthly counter kept in state. When you set a new personal record or cross a distance threshold you named, it sends an alert, so the moment gets noticed rather than lost.

People use it for race build-ups, yearly distance challenges and club leaderboards where milestones matter.

What you get out of it

  • Real achievements get celebrated on time

    A fresh PR is motivating for about a day. An alert while the effort is recent gives you the satisfaction and a reason to log the next session. Small wins keep a long training block feeling worthwhile and keep the habit going.

  • Monthly goals stay in view

    A running total against a target tells you early whether you are on pace. Falling 40 km behind on the 12th is far easier to fix than discovering it on the 29th.

  • You can plan around hitting thresholds

    Knowing you are 8 km from a distance goal lets you choose a route that closes it rather than guessing. Small decisions like that add up across a training block.

  • Progress is documented without effort

    Alerts form a timeline of personal bests with dates, useful when you are writing a race recap or checking whether a plateau is real. You end up with a dated list of milestones without ever typing them in anywhere yourself.

  • Nothing relies on remembering to check

    Streaks and goals break when attention drifts. The alert comes to you, so motivation does not depend on opening Strava and scrolling. The reminder simply arrives, which keeps a long goal alive through busy weeks and travel.

How it works

What happens, step by step

  1. Every hour, ClickRuntime checks Strava for new activities, skipping any it has already looked at.

  2. If an activity includes a personal record, you get an email naming the workout and the records you set.

  3. It also adds each activity's distance to your total for the month.

  4. When that total passes your monthly target, you get one email to say you have hit the goal.

Before it runs live

  • Connect Strava

What you get

RunsHourly
Hear when you set a PR or pass a monthly goaltoday, 9:00Succeeded
Email · New PRNew PR: Thursday Tempo 2 personal records on 2026-10-15 (5K 22:41, 10K 47:30)

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 Strava 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.
personal_best_milestone_alert.pyexample
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched

@on_trigger
def run(event):
    h = {"Authorization": f"Bearer {credentials.connection('strava', 'personal')}"}
    acts = http.get("https://www.strava.com/api/v3/athlete/activities", headers=h, params={"per_page": 30}).json()
    seen = set(state.get("seen") or [])
    new = [a for a in acts if a["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    month = datetime.now(timezone.utc).strftime("%Y-%m")
    month_km = state.get(f"km:{month}") or 0.0
    for a in new:
        if a["pr_count"]:
            notify.email_me(f"New PR: {a['name']}", f"{a['pr_count']} personal record(s) on {a['start_date_local'][:10]}.")
        if a["sport_type"] == "Run" and a["start_date"][:7] == month:
            before, month_km = month_km, month_km + a["distance"] / 1000
            if before < 100 <= month_km:
                notify.email_me("100 km this month!", f"You've run {month_km:.1f} km in {month}.")
    state.set(f"km:{month}", month_km)
    state.set("seen", [a["id"] for a in acts])
    return {"month_km": round(month_km, 1)}

FAQ

Common questions

How does it detect a personal record?
Strava includes a pr_count on activity data and lists best efforts for segments and standard distances. A new activity with a pr_count above zero, or a best effort that beats the stored one, counts as a personal record.
Does the monthly counter reset itself?
Yes. The counter is tied to the calendar month, so on the 1st it starts again from zero. Your previous month's final total can be included in the first alert of the new month if you like.
Can I set different goals for running and cycling?
Yes. Distance is added per sport type, so you can keep 150 km of running and 600 km of cycling as separate targets. Describe the goals and review the updated alert rules. Targets can be changed at any time.
What permissions does it need?
activity:read_all. 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 “Hear when you set a PR or pass a monthly goal” from your assistant

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