Operator
← Back to blog
GuidesFitness

Pull your Strava workouts into a log OpenClaw keeps

Operator TeamOperator Team···5 min read

Strava is good at recording the run you just did and showing it to your friends. It is less good at being the place you reason about your training over time, especially if you do not pay for the analytics. Strava's subscription tier runs $79.99 per year in the United States for features like Fitness Score tracking, workout analysis, and filtered segment leaderboards, and the free tier keeps basic GPS recording and social features but gates the deeper training views behind that paywall.

Connect the Strava API and your Operator.io agent can pull your activities into a plain log of your own, then come back to you once a week with the summary you would otherwise have to assemble by hand.

Strava logo

What you get

With Strava connected, OpenClaw reads the activities on your account and turns them into a record it controls:

  • Each day it checks for anything new since the last run and adds a row, so the log fills itself in as you train.
  • Because the log is a CSV in its workspace, it is yours to keep and to question. Ask how your weekly mileage has trended, whether your easy runs are staying easy, or how this build compares to the same stretch last year, and it answers from the rows it has been keeping.

The Strava API returns structured fields for each activity: distance, moving time, elapsed time, elevation gain, average and max heart rate when your device recorded them, average speed, and sport type. The agent can store whichever columns matter to you, and you can add a notes field for context Strava never captures, like how your legs felt on an easy day or whether you cut a run short because of weather.

Taken together those fields are a fairly personal record: when and how far you train, how hard, and your heart rate when your watch caught it. It lives as a CSV in the agent's workspace, and the weekly recap arrives in whatever channel you connected, so a private chat with the agent is the natural home if you would rather your training patterns and your numbers not show up where other people read.

The weekly recap is where it stops being a passive log. On the day you choose, it sends your total distance and time, how the week measured against the one before, and whatever stood out, a long run, a missed rest day, a new fastest effort. You can fold in a "how it felt" note when you log, and that turns a pile of GPS data into something closer to a training diary.

Step 1: Create an API application

Go to your Strava API settings and create an application. Give it a name, a category, and a website, and set the Authorization Callback Domain to localhost, which is all you need for the one authorization step below. Once it is created, the page shows your Client ID and Client Secret. Copy both, and treat the secret like a password.

Strava's getting started guide walks through the same screen and explains that access tokens on that page expire every six hours while refresh tokens are what you use for long running connections.

Step 2: Authorize with the right scope

The page also shows an access token and a refresh token, but the default ones use read only scopes and will not return your full activity history, so do not stop here. Strava distinguishes between activity:read, which returns public activities only, and activity:read_all, which includes private activities and ones marked "only you".

To let the agent read everything, you authorize once with the activity:read_all scope by visiting Strava's authorize URL with your client ID, your callback, response_type=code, and scope=activity:read_all, approving the request, and copying the code Strava returns in the redirect. You then exchange that code at https://www.strava.com/oauth/token for a refresh token and a short lived access token. The scopes and the exact flow are laid out in Strava's authentication documentation.

Wagner Osborne's 2026 walkthrough runs the same authorize then exchange flow in Postman, the clearest way to watch the read_all scope and the returned code turn into the refresh token you paste into Operator.

The token you keep is the refresh token. The access token expires every six hours, but the agent uses the refresh token to mint a new one whenever it needs to, so it stays connected on its own. Strava's API FAQ notes that every refresh returns a new refresh token and invalidates the previous one, which is why the agent stores the latest token in its workspace rather than assuming the original stays valid forever.

Step 3: Add the three keys to Operator

In your Operator dashboard, open Environment and add three variables, pasting in the values from the steps above.

VariableWhat it is
STRAVA_CLIENT_IDyour application's ID from the Strava API settings
STRAVA_CLIENT_SECRETyour application's secret, treated like a password
STRAVA_REFRESH_TOKENthe long lived token the agent trades for fresh access tokens

Each is encrypted and shown only once, and the agent reads them by name when it calls Strava, so they never surface in a chat.

Step 4: Connect a channel and try it

Connect Telegram or Discord on the channels page so the agent has somewhere to reach you, then set it going:

Start a training log from my Strava. Pull in the last month of activities so there's some history to start from.
Every Sunday evening, send me a recap of the week's training: total distance, time, and how it compared to last week.

The first seeds the log with real history so the comparisons mean something from day one. The second is the standing instruction that becomes a scheduled job, so the recap arrives on its own each week.

If you want the log to update the moment you upload a run from your watch instead of waiting for a daily poll, the agent can subscribe to Strava webhooks for real time activity events, though a once daily check is enough for most personal logs and uses almost none of your rate limit budget.

Good to know

Strava's API is limited to 200 requests every fifteen minutes and 2,000 per day per application, with separate read limits of 100 per fifteen minutes and 1,000 per day on non upload endpoints. A daily pull of your own activities, even with pagination at 30 results per page, will never come close to spending that budget. Strava's FAQ recommends syncing at most the last 30 days of activity data on initial setup rather than pulling an entire multi year history in one burst, which is why the seed prompt above asks for the last month rather than everything since 2019.

The connection only reaches your own data, so this is a personal training log, not a way to read a club's or a friend's activities. Tell the agent once whether you think in miles or kilometers and it keeps the whole log in your units. And if a refresh ever fails after a long gap, reauthorizing with the same scope and updating STRAVA_REFRESH_TOKEN puts it right.

Frequently asked questions

What credentials does the Strava connection use?

+

Three, from an application you create in your Strava API settings: a client ID, a client secret, and a refresh token. Add them to Operator's Environment as STRAVA_CLIENT_ID, STRAVA_CLIENT_SECRET, and STRAVA_REFRESH_TOKEN. The access token Strava issues expires every six hours, but the agent uses the refresh token to mint a new one whenever it needs to, so the connection holds on its own.

Why won't Strava return my full activity history?

+

The default token on the API settings page is read only and will not return private activities or ones marked only you. To read everything, authorize once with the activity:read_all scope: visit Strava's authorize URL with your client ID, callback, response_type=code, and scope=activity:read_all, approve, then exchange the returned code at the token endpoint for a refresh token. Strava's authentication docs lay out the flow.

Where does my Strava training log live?

+

In the agent's own workspace as a CSV, so it is yours to keep and to question. Each day the agent checks for new activities and adds a row, and because the data is plain text you can ask how your weekly mileage has trended, whether your easy runs are staying easy, or how this build compares to the same stretch last year, and it answers from the rows it has kept.

Will the connection hit Strava's rate limits?

+

No. Strava's API allows 200 requests every fifteen minutes and 2,000 a day per application, and a daily pull of your own activities never comes close. One detail the agent handles: Strava issues a new refresh token on every refresh and retires the old one, so the agent keeps the latest token in its workspace rather than relying on the original. If a refresh fails after a long gap, reauthorize with the same scope and update STRAVA_REFRESH_TOKEN.