It’s that time of the year again, to get all social media sending your annual reports and summaries of your activities over the last year. That made me think about creating a dashboard of my latest activities myself. I am a cyclist and thus Strava is my second home. However, despite all the connectors available already within Power Automate, I did not find anything which suited my case. Let’s dig in on how to create a custom connector to Strava.

Getting a Strava application

To authenticate, we need to register an application on the Strava developer area. This will be used to connect via Oauth2 and will define which rights the connection will have. Strava has a fairly good documentation about the authentication flow, which you can find here. When you understand the basics and created your API application, you need the information provided by Strava for your application in the next step when registering your custom connector.

Creating the custom connector

The next step is to be able to address our application from our Flow. We need to create a custom connector with the correct parameters to be able to communicate from our canvas app through our Flow to Strava. Let’s see how this works.

Go to https://make.powerapps.com and choose the custom connectors option in the navigation menu

Click add a new custom connector and a wizard will guide you through all the necessary steps. Let’s check them out in detail:

First step is to provide general details on your connector, like a logo, a base url and how people will find your connector to use them within Power Automate.

Second step is where we need all the information of your application you created in the first steps of this article.

It is clear that every property maps one on one with the properties on the Strava application. Explained briefly, this step will use all these variables to allow our Strava application we created to do certain actions on behalve or on your account. Which actions are possible is defined by the scope and is managed by Strava. Later in this article you will see how this application will show up when it asks for your authorization.

The most important and fun step is to define which actions your connection will be able to do. You start out on this screen:

Let’s look on how to get the information of the current logged in athlete. Documentation learns us that this call is done to following endpoint: “https://www.strava.com/api/v3/athlete”. No parameters are needed. To add this action, just press import from action and fill in following parameters:

However, when you want to get the summary of the athlete, you need to provide the id of the athlete in the url path. This is done as follows: ” https://www.strava.com/api/v3/athletes/{id}/stats?page=&per_page=”. The wizard of the custom connector will automatically detect additional parameters in the segment as in the querystring. How cool is that!

Now it’s time to test! Press Update Connector in the ribbon and advance to the last step in the wizard. It will need a connection first, so get your Strava account to login into the application.

When you authenticated successfully, you will be able to test all your actions defined in the previous step to check the actual behaviour if it is as expected. Did you already created your own custom connector? Let me know!