How to integrate Strava into Slack
If like me you use Strava and want to brag about your latest PR with your coworkers here's the best way I found to automatically post my results in Slack. Thanks Zapier!
4 min read
February 4, 2021
I could answer with Why not? but there are valid reasons do to so!
- Why not automate mundane tasks?
- I love to share my physical activity. I've found out it helps everyone to stay motivated.
- When you're working remotely any chance you get to bond with your team should be taken!
So let's get started.
I'm not going to explain what's Zapier, they do it well enough by themselves. If you're not familiar with them go check it out, it's pretty useful to automate mundane tasks.
If you're too lazy to read this post and only want the Zap, I got something for you. Zapier now allows us to share Zaps. That's a super cool feature I wasn't aware of (until now). You probably will have to change one or two things but here is the end product I created for this post.
If you don't have an account go ahead and create it, we're going to need it :)
Make a Zap
First, you're going to need to create your Zap.
You need to select the trigger. A trigger is the app + event combo that will start the Zap.
In our case, we'll select Strava.
Then you can choose what event should start the Zap. We want to use
You will be asked to log into your Strava account. Mine was already linked!
Then, you can test the trigger. Zapier will pull the last event of this type and display the payload content. All those information will be available in the next step.
Now that we have a trigger, we need to choose what we want to do with it. I found that I always end up posting to Slack. This might be because my use cases are a bit trivial but you can come up with much more complex flows.
Here, you're asked to select which app will react to the trigger. You could push your data into a spreadsheet to compile your results and maybe even pull the weather and find some sort of correlation between the temperature and your pace 🙃. Sky's the limit!
For now, let's just show off to our colleagues. So I'll pick Slack.
For the event, we want to submit to a channel. I suggest selecting
Direct message to debug the Zap before sending it to a channel.
⚠️ I don't recomment sending your results to any a public channel such as #general ⚠️
As before, you will be asked to log into your Slack account. Mine was already linked (again)!
Here comes the fun part. This is also the part where you can go off-script if you'd like. These are just my personal preferences.
The message builder is quite intuitive. Try it! If you're too lazy you can always use the zap sharing link I've put at the top of the article.
I picked the name of the activity, the distance, the duration, the pace and the URL (so people can go five me kudos 😍). Also, I picked
Send as a bot. But feel free to do otherwise.
Also, I didn't like having the Zap link at the end of the message. Plus, we get the event emoji from Zapier. Let's use it.
If you want to tag someone you will have to enable
Link Usernames and Channel Names feature. Also, check this if you want to learn why @username doesn't work. You will have to dig a bit for that 🙃.
I highly suggest that you tag yourself so people know who's the activity owner
In my case, I could do that by adding
<@UB7L6HMUL> to my message.
Woops, don't forget to activate it 🙈.
Zapier only collect/submit event in a while (unless you're on a paid plan). So don't worry if it takes a few minutes for the event to appear in Slack.
Here you go, you did it! Congrats :) Feel free to try out other triggers and action combinations.