Skip to content

Strava Webhook

GitHub
JavaScript
0 stars
0 forks
Updated Feb 22, 2026

Strava Webhook → Vercel Deploy

A Cloudflare Worker that listens for new Strava activities and triggers a Vercel deployment.

How it works

  1. You log a new activity on Strava
  2. Strava sends a POST to this worker
  3. Worker triggers your Vercel deploy hook
  4. Your site rebuilds with fresh Strava data

Setup

Prerequisites

  • Cloudflare account (free tier works)
  • Strava API application (create one here)
  • Vercel deploy hook URL

1. Deploy the worker

CLOUDFLARE_API_TOKEN=your_token npx wrangler deploy

2. Set secrets

CLOUDFLARE_API_TOKEN=your_token npx wrangler secret put STRAVA_VERIFY_TOKEN
CLOUDFLARE_API_TOKEN=your_token npx wrangler secret put VERCEL_DEPLOY_HOOK
Secret Description
STRAVA_VERIFY_TOKEN Any string you choose for webhook validation
VERCEL_DEPLOY_HOOK Your Vercel deploy hook URL (Settings → Git → Deploy Hooks)

3. Register Strava webhook

curl -X POST https://www.strava.com/api/v3/push_subscriptions \
  -F client_id=YOUR_CLIENT_ID \
  -F client_secret=YOUR_CLIENT_SECRET \
  -F callback_url=https://your-worker.workers.dev \
  -F verify_token=YOUR_STRAVA_VERIFY_TOKEN

4. Verify

Check your subscription:

curl -G https://www.strava.com/api/v3/push_subscriptions \
  -d client_id=YOUR_CLIENT_ID \
  -d client_secret=YOUR_CLIENT_SECRET

Delete your subscription:

curl -X DELETE "https://www.strava.com/api/v3/push_subscriptions/SUBSCRIPTION_ID?client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"

Notes

  • Only activity + create events trigger a deploy — updates and deletes are ignored
  • Strava allows one webhook subscription per API application
  • The worker responds to Strava's validation GET and event POST requests

© 2026 Miguel Franco Trinidad. All rights reserved.