Merge branch 'harshil1712-docs/strava'
28
docs/nodes/credentials/Strava/README.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
permalink: /credentials/strava
|
||||
description: Learn to configure credentials for the Strava node and the Strava Trigger node in n8n
|
||||
---
|
||||
|
||||
# Strava
|
||||
|
||||
You can use these credentials to authenticate the following nodes with Strava.
|
||||
- [Strava](../../nodes-library/nodes/Strava/README.md)
|
||||
- [Strava Trigger](../../nodes-library/trigger-nodes/StravaTrigger/README.md)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Create a [Strava](https://Strava.com) account.
|
||||
|
||||
## Using OAuth
|
||||
|
||||
1. Access the [My API Application page](https://www.strava.com/settings/api).
|
||||
2. Enter the application name in the ***Application Name*** field.
|
||||
3. Enter the website URL in the ***Website*** field.
|
||||
4. Copy the 'OAuth Callback URL' from n8n and paste it in the ***Authorization Callback Domain*** field.
|
||||
5. Read 'Strava's API Agreement', and if you agree, check the checkbox.
|
||||
6. Click on the ***Create*** button.
|
||||
7. Click on ***App Icon*** and select an image from the browser window.
|
||||
8. Click on the ***Save*** button.
|
||||
9. Use this ***Client ID*** and ***Client Secret*** with your Strava node credentials in n8n.
|
||||
|
||||

|
||||
BIN
docs/nodes/credentials/Strava/using-oauth.gif
Normal file
|
After Width: | Height: | Size: 33 MiB |
@ -14,7 +14,7 @@ You can find authentication information for this node [here](../../../credential
|
||||
## Basic Operations
|
||||
|
||||
::: details Language
|
||||
- Translate
|
||||
- Translate data
|
||||
:::
|
||||
|
||||
## Example Usage
|
||||
|
||||
93
docs/nodes/nodes-library/nodes/Strava/README.md
Normal file
@ -0,0 +1,93 @@
|
||||
---
|
||||
permalink: /nodes/n8n-nodes-base.strava
|
||||
description: Learn how to use the Strava node in n8n
|
||||
---
|
||||
|
||||
# Strava
|
||||
|
||||
[Strava](https://www.strava.com/) is an internet service for tracking human exercise which incorporates social network features.
|
||||
|
||||
::: tip 🔑 Credentials
|
||||
You can find authentication information for this node [here](../../../credentials/Strava/README.md).
|
||||
:::
|
||||
|
||||
## Basic Operations
|
||||
|
||||
::: details 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](https://n8n.io/workflows/744) on n8n.io. This example usage workflow would use the following nodes.
|
||||
- [Start](../../core-nodes/Start/README.md)
|
||||
- [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.
|
||||
|
||||
1. First of all, you'll have to enter credentials for the Strava node. You can find out how to do that [here](../../../credentials/Strava/README.md).
|
||||
2. Enter `Morning Run` in the ***Name*** field.
|
||||
3. Enter `Run` in the ***Type*** field.
|
||||
4. Select the date and time in the ***Start Date*** field.
|
||||
5. Set ***Elapsed Time (Seconds)*** to `3600`.
|
||||
6. Click on the ***Add Field*** button and select 'Distance' from the dropdown list.
|
||||
7. Set ***Distance*** to `1000`. Strava measures distance in meters.
|
||||
8. 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`.
|
||||
|
||||

|
||||
|
||||
|
||||
::: v-pre
|
||||
### 3. Strava1 node (update: activity)
|
||||
|
||||
This node will update the activity that we created in the previous node.
|
||||
|
||||
1. Select the credentials that you entered in the previous node.
|
||||
2. Select 'Update' from the ***Operation*** dropdown list.
|
||||
3. Click on the gears icon next to the ***Activity ID*** field and click on ***Add Expression***.
|
||||
4. 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"]}}`.
|
||||
5. Click on the ***Add Field*** button and select 'Description' from the dropdown list.
|
||||
6. Enter the description of the activity in the ***Description*** field.
|
||||
7. 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.
|
||||
|
||||

|
||||
|
||||
|
||||
::: v-pre
|
||||
### 4. Strava2 node (get: activity)
|
||||
|
||||
This node returns the information of the activity that we created using the Strava node.
|
||||
|
||||
1. Select the credentials that you entered in the previous node.
|
||||
2. Select 'Get' from the ***Operation*** dropdown list.
|
||||
3. Click on the gears icon next to the ***Activity ID*** field and click on ***Add Expression***.
|
||||
4. 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"]}}`.
|
||||
5. 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.
|
||||
|
||||

|
||||
BIN
docs/nodes/nodes-library/nodes/Strava/Strava1_node.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
docs/nodes/nodes-library/nodes/Strava/Strava2_node.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
docs/nodes/nodes-library/nodes/Strava/Strava_node.png
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
docs/nodes/nodes-library/nodes/Strava/workflow.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
@ -0,0 +1,72 @@
|
||||
---
|
||||
permalink: /nodes/n8n-nodes-base.stravaTrigger
|
||||
description: Learn how to use the Strava Trigger node in n8n
|
||||
---
|
||||
|
||||
# Strava Trigger
|
||||
|
||||
[Strava](https://www.strava.com/) is an internet service for tracking human exercise which incorporates social network features.
|
||||
|
||||
::: tip 🔑 Credentials
|
||||
You can find authentication information for this node [here](../../../credentials/Strava/README.md).
|
||||
:::
|
||||
|
||||
## Events
|
||||
|
||||
:::details *
|
||||
- `*`
|
||||
- Created
|
||||
- Deleted
|
||||
- Updated
|
||||
:::
|
||||
|
||||
:::details Activity
|
||||
- `*`
|
||||
- Created
|
||||
- Deleted
|
||||
- Updated
|
||||
:::
|
||||
|
||||
:::details Athlete
|
||||
- `*`
|
||||
- Created
|
||||
- Deleted
|
||||
- Updated
|
||||
:::
|
||||
|
||||
## Example Usage
|
||||
|
||||
This workflow allows you to receive updates when a new activity gets created in Strava using the Strava Trigger node. It also allows you to tweet about the activity that was created in Strava using the Twitter node. You can also find the [workflow](https://n8n.io/workflows/745) on n8n.io. This example usage workflow would use the following node.
|
||||
- [Strava Trigger]()
|
||||
- [Twitter](../../nodes/Twitter/README.md)
|
||||
|
||||
The final workflow should look like the following image.
|
||||
|
||||

|
||||
|
||||
### 1. Strava Trigger node
|
||||
|
||||
This node will trigger the workflow when a new activity gets created in Strava.
|
||||
|
||||
1. First of all, you'll have to enter credentials for the Strava Trigger node. You can find out how to do that [here](../../../credentials/Strava/README.md).
|
||||
2. Select 'Activity' from the ***Object*** dropdown list.
|
||||
3. Select 'created' from the ***Event*** dropdown list.
|
||||
4. Click on ***Execute Node*** to run the node.
|
||||
|
||||
In the screenshot below, you will notice that the node triggers the workflow when a new activity gets created in Strava.
|
||||
|
||||

|
||||
|
||||
### 2. Twitter node (create: tweet)
|
||||
|
||||
This node will tweet about the activity that gets created in Strava.
|
||||
|
||||
1. First of all, you'll have to enter credentials for the Twitter node. You can find out how to do that [here](../../../credentials/Twitter/README.md).
|
||||
2. Click on the gears icon next to the ***Text*** field and click on ***Add Expression***.
|
||||
::: v-pre
|
||||
3. Enter the following text in the ***Expression*** field: `I ran {{$node["Strava Trigger"].json["object_data"]["distance"]}} meters and completed my {{$node["Strava Trigger"].json["object_data"]["name"]}}!`
|
||||
4. Click on ***Execute Node*** to run the node.
|
||||
:::
|
||||
In the screenshot below, you will notice that this node gets the information of the activity in Strava from the previous node and tweets about it.
|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 130 KiB |