Pages

Friday, October 5, 2012

Strava's little helper - Use Apple's Automator to auto-upload Strava files

I have been bothered by the fact that my Garmin 910 will effortlessly upload it's data to the Garmin Connect website, yet I still have to manually add them to Strava. 
So today I decided to come up with a solution - welcome Apple's Automator to the scene. With an Automator script any file dropped into a specified folder can be sent via email to Strava and then appears on your dashboard. You then just have to manually modify the activity type if not the default type. Kind-a-like magic. So here is how you do it if you have a MAC.

Step 1: Locate your Garmin Activities folder: 
  • should be here: /Users/YOURNAME/Library/Application Support/Garmin/Devices/SOMENUMBER/Activities
Step 2:
  • Launch Automator (Spotlight for Automator)
  • Select "Folder Action" from the opening screen. Hit "Choose"


at the top "Folder action receives files and folder added to" select your Garmin activities folder from Step 1 



  • From the "Utility" Library select "Launch Application" and drag it to the right side of the screen and then select "Mail" as the application. This action will launch Mail if not already open. Note that you must have your Apple Mail account configured with the same eMail that you use for Strava (Strava recognizes which user to add the data to based on your eMail).

  • next select "Mail" from the library and drag the "New Mail message" to the right and configure as follows.
  • "To" field: upload@strava.com
  • "Subject": upload
  • "Message": upload (I just added upload to avoid having mail ask me later if I want to send an empty message)
  • next select "Mail" from the library and drag the "Add Attachments to Front Message" to the right.
  • next select "Mail" from the library and drag the "Send Outgoing Messages" to the right.
  • your script will look like this:

  • Now do Automator-->File-->Save (name it whatever you like)
  • you can quit Automator now
  • next time your Garmin uploads a new file to the activities folder via Ant+ Automator will create a message attaching the .fit file and mailing it to Strava. A few minutes later you will receive a confirmation from Strava via eMail and shortly thereafter your activities will be online.
  • Voila - let me know if it works. Haven't tested multiple workouts yet.
  • Strava folks, hope you don't mind.