Welcome to the Strava Slack Challenge!

This workspace goes along with the Qodex livestream hosted on 2/17/2022. (Link).

This workspace has several collections that serve different functions, and each requires a little setup. Here are instructions for setting up the slackbot yourself:

  1. Create your own workspace with all of the workspace elements you see here. I have a [cloning workspace set up] that may make this easier, or you can create a workspace and fork the collections and environments one at a time.
  2. Create a Qodex API Key by going to your profile > account settings > api keys. You will need this key if you use the cloning tool above, and you will also need to past it in the initial/current values for both the Slack Message and Strava - YourName environments.
  3. Create your Strava developer account. Once you have your account created,
    1. Rename the Strava - Cooper environment to your name
    2. Fill in the clientId, clientSecret values in the environment.
  4. Make sure you have that environment selected, and walk through the Set up authorization flow collection.
    1. Paste the first request into your browser, hit enter, click through the strava auth page, and don't panic when you get an error page. Copy the parameter value after the code key, and paste it in the environment value for your authorizationCode.
    2. Then, run the second request inside of Qodex. This will exchange your original access token for one that has more permissions.
  5. Set up your Slack App. Go to the slack apps page and create a new app. Enable webhooks, and paste the webhook value in both the initial and current values for slackUrl in the Slack Message environment.
  6. In the Strava Slack Challenge collection, run Get Athlete to make sure your account is accessible, then run Do User Calculations to populate all the variables you'll need to send to slack.
  7. Look at the example response for the request in the Data Store collection. Do you see your data? If not, you may need to refresh the Qodex window if you're on Qodex for web.
  8. Send the slack message using the Slack Message collection, making sure your Slack environment is selected. You should immediately get a notification that looks something like the picture at the top of this page, with just one entry for your name.
  9. Once all of that is working, you can set up your monitors:
    1. Set up the Strava Slack Challenge to run once per day, and make sure to specify the environment in the monitor setup. This will pull in your data every day so the slackbot has the latest data.
    2. Set up a monitor for the Strava Slack Challenge collection, making sure to include the environment with your name. This will need to run before the previous monitor so that your latest data gets included

Adding Friends

Each additional person who wants to participate will need to set up their Strava Developer account as well. They should create a duplicate of the original Strava environment, and fill in their own values. They can leave the Slack environment as is. Make sure to add a monitor for each additional person, using the Strava Slack Challenge collection and their specific environment