Extract workouts from activity FIT files

Intervals.icu can now extract workouts encoded in activity fit files. If you run a workout using a Garmin device on an indoor trainer it includes the workout steps in the fit file for the recorded activity. Other platforms might also do this. If you know of any others please reply on this thread.

Choose Actions → Extract Workout under the activity timeline chart:

Note that this only works with fit files and not for activities from Strava because Strava doesn’t provide the original fit files.

Tick the checkbox if you want this to happen automatically for new activities for this sport:

If all goes well the workout is added to your calendar and paired with the activity:

This probably isn’t something you want to use if your workouts are already on your Intervals.icu calendar. You will get dups.

Note that you can also upload activity fit files containing workouts into a folder in your workout library and they will be imported:

You can also generate a workout from the intervals for an activity by dragging and dropping the activity onto a folder in your library. This works for any kind of activity, not just ones from fit files.

21 Likes

Hi David. I can send you a Zwift fit file if you want, to see if if the workout is embedded in there also.

Cheers

John

Yes pls. Tx.

No way! This is an amazing feature.
Many closed systems (like TP + Garmin, TP + Wahoo), which has restrictions for downloading workouts, are now “broken”.
Just tested it on my activities recorded on Wahoo BOLT with workout from TrainingPeaks, it works perfectly.

1 Like

I’m sure this is probably obvious, but worth pointing out that this works when you run (and assume cycle) to a Garmin “Suggested Workout” also :slight_smile:

1 Like

You said that you wanted to hear of other apps that do this. With fitfilerepair you can import a fit file either as an activity or a workout. If you import as a workout a similar result to what you are describing here.

Hi @david ,

I’ve downloaded a workout created with Intervals as .Fit and copy via cable to my Garmin watch.
I’ve noticed that steps messages are not showed like when synchronized throughout the calendar.
Who’s stripping them out?

Thank you

The “Recover” message is not mine
It was supposed to say “Water” in that step.

Could you please send me that file and also the same thing but transferred via Garmin Connect. Then I can see what is different. Intervals.icu does set the workout step name which is where I think the text is supposed to go.

When Intervals.icu uploads a workout to Garmin Connect it sends JSON data not a fit file and Garmin generate the fit file.

sure.
They are exactly the same only that instead of placing it on Intervals calendar I downloaded it as .fit and copied it to Garmin/Workouts folder.

Tks,

Hi,

I’m running with a Power Running Plan on Final Surge + Garmin Epix & Stryd.
Workouts gets exported from Final Surge to Garmin Connect and then to Stryd. Executed and loaded back to Garmin Connect where I can see the different Intervalls, also in Final Surge and in Stryd Powercenter later.

Eg this run Intervals.icu
Unfortunately I can’t upload .fit files.

Unfortunately when I try the Extract Workout Feature it tells me “File does not contain any workout steps”. I was really hoping for this feature but it seems I understand something wrong?

Best and thanks for this great piece of software
Oliver

Edit - it almost works with Garmin “Suggested Workouts”!

Watch gave me a 30minute easy run @127bpm to do this morning, so decided to follow that at a nice relaxed parkrun.

Extracting the workout with intervals.icu gives “- 30m 10-25% LTHR (15-38bpm)” ?!

https://intervals.icu/activities/i12052835

Tx. It’s up to the device running the workout to include the steps in the activity fit file. If Intervals.icu says “no workout steps” then that wasn’t done. How are you doing the workouts?

I had a look at the steps in that file on fitfileviewer.com and from what I can tell the HR target data hasn’t been correctly encoded.

custom_target_value_low = 115
custom_target_value_high = 138

To convert those numbers to bpm you subtract 100 … so 15 - 38 bpm in this case. Intervals.icu converts those to % LTHR for the workout.

Custom power and heart rate values can be given as absolute or relative values. Absolute values are provided as integer values representing beats per minute (BPM) for heart rate, or watts for power. Relative values are provided as an integer value ranging from 0 to 100% of the user’s maximum heart rate or 0 – 1000% functional threshold power (FTP). Since the ranges 0 to 100 (heart rate) and 0 to 1000 (power) are reserved for relative values, absolute heart rate and power values must be offset by 100 bpm or 1000 watts respectively.

https://developer.garmin.com/fit/cookbook/encoding-workout-files/

1 Like

So it looks like Garmin aren’t adhering to their own standards!?

This was a simple ‘Garmin Daily Suggested Workout’ (I’ve started relying on it over last half year, only using my own plan if I’ve got a marathon or more in the calendar, it seems to adapt quite sensibly around upcoming races etc)…it gave me a target of 127bpm for 30mins - which probably matches with the 115-138.

Ah well, not much you can do about that, I’ll report it as a bug to Garmin.

Hi David,

thanks for your response! Why do you subtract 100? It looks like this is the absolute value so the raw BPM?

Cheers
Oliver

Because that is what the protocol describes…
A HR value below 100 is to be considered a % of HRmax. A value above 100 is to be considered an absolute value augmented with 100.
All this is happening behind the screens and an end-user should not have to worry about it. But if either side is not respecting the protocol, things go wrong.

1 Like

Hi again,

I’m using Final Surge for my workouts and I had a further look at several .fit files.
It looks like the original fit file from Final Surge includes the workout steps, while the garmin fit
file after execution only contains laps. Final Surge joins then both together.

For me it would be helpfull if intervalls.icu would use the laps as “intervalls” - is there probably already
an option to use these as intervall markers?

Best
Oliver

yes there is… its in SETTINGS tab IIRC

1 Like

Found it - thanks! Works absolutely brilliant!

1 Like

Hi David,

Have you got the file?

Tks

Hi, I tried extracting today’s Garmin Daily Suggested Workout which had repeating steps.

It was a warmup followed by 3 sets of 4x10s on/2m off with 5m recovery between the sets followed by a cool down.

The extracted workout ends up as one set. Here’s the text:

- Warmup 20m 53-72% power=3s

4x

3x
- 0m10s 239-261% power=3s
- 2m 0-63% power=3s

- 5m 43-63% power=3s

- Cooldown 15m 43-63% power=3s

Here’s the activity I extracted the workout from: https://intervals.icu/activities/i13466426

I believe nested repeating isn’t currently supported, but was wondering stacking the current syntax might work? (ex: 3x4x) Also, I don’t know how it’s described in the FIT file (or if it’s not), but they omit the last recovery step in a set of intervals and likewise the recovery between sets after the last. It would be cool if there was a way to express that as well.