Log every Strava activity to a Google Sheets training journal

By General Input

Every couple of hours, new Strava activities land as fresh rows in your Google Sheets training log, so you keep a permanent backup of every run, ride, and swim.

Integrations

  • Strava
  • Google Sheets

Type

Deterministic Code

Categories

  • Personal Productivity
  • Operations

Build me a code workflow that backs up every new Strava activity to a Google Sheets training log. I want a permanent, portable record of my training outside Strava.

Trigger: cron, every 2 hours.

On each run, call Strava's List Athlete Activities and filter to activities recorded since the last successful execution (use a watermark of the most recent activity's start time that was logged on the previous run; on first run, default to roughly the last 24 hours so we do not flood the sheet with the entire history). Paginate until you have all new activities.

Skip any activity where commute is true or manual is true. Skip activities already logged.

For each remaining activity, call Google Sheets' Append Values on the configured spreadsheet and worksheet to add a single row with these columns, in this order:

date (the activity's local start date), name, sport_type, distance in kilometers (rounded to 2 decimals), moving_time in minutes (rounded to 1 decimal), elevation_gain in meters, average heart rate, max heart rate, average pace for runs and swims (mm:ss per km) or average speed in km/h for rides and other sport types, kudos_count, and a link back to the activity (https://www.strava.com/activities/{id}).

Use USER_ENTERED as the value input option so dates and numbers are parsed natively by Sheets. If a field is missing from Strava (for example heart rate on an activity recorded without a watch), leave the cell blank rather than writing 0 or null.

Inputs the user should configure: the Google Sheet URL (or spreadsheet id) and the worksheet/tab name to append to. Default tab to 'Training Log'.

Respect Strava's rate limits (200 requests per 15 minutes, 2000 per day) and handle 429s with backoff. Do not delete or overwrite anything in the sheet, only append.

Note: Strava is not in our poll trigger catalog, so cron with a timestamp watermark is the right shape here rather than a poll or webhook trigger.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads