Strava#
Strava is an internet service for tracking human exercise which incorporates social network features.
Credentials
You can find authentication information for this node here.
Basic Operations#
- Activity
- Create a new activity
- Get an activity
- Get all activities
- Get all activity comments
- Get all activity kudos
- Get all activity laps
- Get all activity zones
- Update an activity
Example Usage#
This workflow allows you to create, update, and get an activity in Strava. You can also find the workflow on n8n.io. This example usage workflow would use the following nodes. - Start - Strava
The final workflow should look like the following image.
1. Start node#
The start node exists by default when you create a new workflow.
2. Strava node (create: activity)#
This node will create an activity with the name Morning Run
in Strava. To create an activity with a different name, you can enter the name of your activity instead.
- First of all, you'll have to enter credentials for the Strava node. You can find out how to do that here.
- Enter
Morning Run
in the Name field. - Enter
Run
in the Type field. - Select the date and time in the Start Date field.
- Set Elapsed Time (Seconds) to
3600
. - Click on the Add Field button and select 'Distance' from the dropdown list.
- Set Distance to
1000
. Strava measures distance in meters. - Click on Execute Node to run the node.
In the screenshot below, you will notice that the node creates an activity with the name Morning Run
and type Run
.
3. Strava1 node (update: activity)#
This node will update the activity that we created in the previous node.
- Select the credentials that you entered in the previous node.
- Select 'Update' from the Operation dropdown list.
- Click on the gears icon next to the Activity ID field and click on Add Expression.
- Select the following in the Variable Selector section: Nodes > Strava > Output Data > JSON > id. You can also add the following expression:
{{$node["Strava"].json["id"]}}
. - Click on the Add Field button and select 'Description' from the dropdown list.
- Enter the description of the activity in the Description field.
- Click on Execute Node to run the node.
In the screenshot below, you will notice that the node adds a description to the activity that we created using the Strava node.
4. Strava2 node (get: activity)#
This node returns the information of the activity that we created using the Strava node.
- Select the credentials that you entered in the previous node.
- Select 'Get' from the Operation dropdown list.
- Click on the gears icon next to the Activity ID field and click on Add Expression.
- Select the following in the Variable Selector section: Nodes > Strava > Output Data > JSON > id. You can also add the following expression:
{{$node["Strava"].json["id"]}}
. - Click on Execute Node to run the node.
In the screenshot below, you will notice that the node returns the information of the activity that we specified in this node.