{"id":16882733,"url":"https://github.com/lildude/strautomagically","last_synced_at":"2026-03-09T13:05:26.911Z","repository":{"id":39997465,"uuid":"470657984","full_name":"lildude/strautomagically","owner":"lildude","description":"🏃‍♂️ Webhook endpoint to do stuff automagically to my Strava activities as they appear.","archived":false,"fork":false,"pushed_at":"2026-02-16T16:38:10.000Z","size":525,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T00:02:22.709Z","etag":null,"topics":["automation","azure","azure-functions","go","golang","serverless","strava"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lildude.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"lildude"}},"created_at":"2022-03-16T16:10:37.000Z","updated_at":"2026-02-16T16:38:13.000Z","dependencies_parsed_at":"2024-03-14T11:33:44.805Z","dependency_job_id":"4c75def0-9cfc-4e7d-ba0f-8e7f16a5894b","html_url":"https://github.com/lildude/strautomagically","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lildude/strautomagically","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstrautomagically","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstrautomagically/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstrautomagically/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstrautomagically/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lildude","download_url":"https://codeload.github.com/lildude/strautomagically/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lildude%2Fstrautomagically/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30297111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T11:12:22.024Z","status":"ssl_error","status_checked_at":"2026-03-09T11:10:54.577Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","azure","azure-functions","go","golang","serverless","strava"],"created_at":"2024-10-13T16:08:31.154Z","updated_at":"2026-03-09T13:05:26.889Z","avatar_url":"https://github.com/lildude.png","language":"Go","readme":"# Strautomagically\n\nWebhook endpoint that runs on Azure Functions to do stuff automagically to my Strava activities as they appear.\nInspired by [Klimat](https://klimat.app/) and [Strautomator](https://strautomator.com).\n\n## 🚧 WIP 🚧\n\nThis is very much WIP and it more of a tinker tool to help me learn Go with a purpose.\nThere's no guarantee, yet, that any of the info below is accurate of this even works.\nAs such I've disabled issues and I'm not taking PRs.\nFeel free to fork and tinker for your own purposes.\nIf I spot a fork and find something I like that you've done, I will pinch it 😜.\n\n## Usage\n\n### Prerequisites\n\nYou will need to create an API application in [your settings on Strava](https://www.strava.com/settings/api) and take note of the client ID and secret.\nIf you are running this locally, you will need to set the callback domain to `localhost:8080`, or your ngrok URL if you want to use [ngrok](https://ngrok.com/).\nYou will also need a Redis database which is used to store the authentication and refresh tokens.\nI use a free database from [Redis](https://redis.com/try-free/) as it's cheaper than Azure 😜.\nOptional: If you want to add weather information to your entries, you will need to register for a free [OpenWeather](https://openweathermap.org) account and obtain an API key.\n\n### Running Locally\n\n1. Create a `.env` file and set the following:\n   - `STRAVA_CLIENT_ID` \u0026 `STRAVA_CLIENT_SECRET` to the values from Strava\n   - `STRAVA_REDIRECT_URI` to the callback domain you registered followed by `/auth`, eg `http://localhost:8080/auth`\n   - `STRAVA_CALLBACK_URI` to the same domain as you registered followed by `/webhook` eg `http://localhost:8080/webhook`\n   - `STRAVA_VERIFY_TOKEN` to any random unique string\n   - `STATE_TOKEN` to any random unique string\n   - `REDIS_URL` to the database URL for your Redis database in the form `redis://\u003cusername\u003e:\u003cpassword\u003e@\u003chostname\u003e/\u003cdatabase\u003e:\u003cport\u003e`.\n     If you're using Heroku, you can use the URL Heroku uses.\n   - Optional: `OWM_API_KEY` to the OpenWeather API key.\n1. Copy those same settings to `local.settings.json` as it makes it easy to set these in the Azure Functions configuration.\n1. Configure your rules in the `update.go` file. I plan to move this out to a better place in future.\n1. Run: `make start` and then visit the `STRAVA_REDIRECT_URI` URL and authorize the application with Strava.\n1. Go for a run.\n\n### Deployment\n\n1. Create the Azure Functions app...\n  - in the Azure portal:\n    \u003cdetails\u003e\u003csummary\u003eHow to set up a custom handler Azure Function\u003c/summary\u003e\n    \u003cp\u003e\n\n    Start by searching for Function App in the Azure Portal and click Create.\n    The important settings for this are below, other settings you can use default or your own preferences.\n\n    [Basic]\n\n    1. Publish: Code\n    2. Runtime stack: Custom Handler\n    3. Version: custom\n\n    [Hosting]\n\n    1. Operating System: Linux\n    2. Plan type: Consumption (Serverless)\n\n    \u003c/p\u003e\n    \u003c/details\u003e\n\n    ... or ...\n    \n  - in [VSCode](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Clinux#create-the-function-app-in-azure)\n  \n2. Create an Azure Service Principal for RBAC for the deployment credentials. Follow [these](https://github.com/Azure/functions-action/blob/d4e7f5d24dc958f6904ffd095fe5033d474abe49/README.md#using-azure-service-principal-for-rbac-as-deployment-credential) instructions.\n3. Add the configuration variables from the `.env` file above to the Azure function configuration, or if you added them to `local.settings.json` too, use the VSCode Azure Functions extension to upload them.  \n4. Deploy using your preferred method - either manually from the Azure Functions extension in VSCode or using the GitHub workflow by merging a PR into `main` or pushing directly to main.\n5. Visit the `STRAVA_REDIRECT_URI` URL and authorize the application with Strava.\n6. Go for a run.\n","funding_links":["https://github.com/sponsors/lildude"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flildude%2Fstrautomagically","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flildude%2Fstrautomagically","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flildude%2Fstrautomagically/lists"}