How to Import TCX Files from Fitbit to Garmin Connect

Anyone who has tried to export a tcx file from Fitbit and subsequently import into Garmin Connect has probably experienced the "An error occurred with your upload. Please try again." error.
For example: https://forums.garmin.com/showthread.php?369561-Error-uploading-TCX-from-Fitbit

I've found that you can get it to import successfully if you make the following changes to the .tcx file (which can be opened in a text editor)...

1. The first line will look something like this...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Remove the standalone="yes" part so it looks like this...
<?xml version="1.0" encoding="UTF-8"?>

2. The end of the file will look something like this...
</Trackpoint>
</Track>
</Lap>
<Creator xsi:type="Device_t" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
<Name>Fitbit Charge 2</Name>
<UnitId>0</UnitId>
<ProductID>0</ProductID>
</Creator>

</Activity>
</Activities>
</TrainingCenterDatabase>

Remove the following section of the above block...
<Creator xsi:type="Device_t" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
<Name>Fitbit Charge 2</Name>
<UnitId>0</UnitId>
<ProductID>0</ProductID>
</Creator>

It should now look like this...
</Trackpoint>
</Track>
</Lap>
</Activity>
</Activities>
</TrainingCenterDatabase>


If you make these two simple changes, the file should import just fine.

Unfortunately, the total calories burned value gets lost in the import... so you'll have to add that manually. I couldn't figure out how to fix that.
Parents
  • Fitbit TCX to Garmin Converter

    Hey demarcmj,

    Thanks for figuring out what it takes to make this work! I used the info you gathered and wrote up a quick powershell to help others convert fitbit TCXs to a Garmin acceptable format.

    I added in a function to convert the -04:00 timezone format to the UTC zulu format the Garmin uses. Hopefully this will preserve accurate run times



    Here are some basic instructions for the non powershell saavy.

    Author: Michael Abair
    Date: 2017-05-04
    Usage:
    1.) Save ConvertFitbitTCXFilesToGarmin.ps1 file from the zip above to your C:\ folder (for simplicity's sake)
    2.) Click Start->Run->Powershell
    3.) Type CD C:\ into the powershell window and hit enter (this changes the directory to the C:\ where you saved the ConvertFitbitTCXFilesToGarmin.ps1 File)
    4.) Type . .\ConvertFitbitTCXFilesToGarmin.ps1 and hit enter (this is how powershell loads the functions from the ps1 file)
    ### Notice that the above is period space period slash filename;
    5.) Type Convert-AllTCXFilesInFolder("C:\tcx") and hit enter.. Replace C:\tcx\ with the folder that has all of your unconverted tcx files or create a c:\tcx and put all your files there
    6.) Your files will all be converted and saved to C:\ConvertedTCXFiles. When you go to import on garmin connect just look for them there.

    I hope this will help someone else throw out their fitbit and enjoy their new Garmin! :)
Reply
  • Fitbit TCX to Garmin Converter

    Hey demarcmj,

    Thanks for figuring out what it takes to make this work! I used the info you gathered and wrote up a quick powershell to help others convert fitbit TCXs to a Garmin acceptable format.

    I added in a function to convert the -04:00 timezone format to the UTC zulu format the Garmin uses. Hopefully this will preserve accurate run times



    Here are some basic instructions for the non powershell saavy.

    Author: Michael Abair
    Date: 2017-05-04
    Usage:
    1.) Save ConvertFitbitTCXFilesToGarmin.ps1 file from the zip above to your C:\ folder (for simplicity's sake)
    2.) Click Start->Run->Powershell
    3.) Type CD C:\ into the powershell window and hit enter (this changes the directory to the C:\ where you saved the ConvertFitbitTCXFilesToGarmin.ps1 File)
    4.) Type . .\ConvertFitbitTCXFilesToGarmin.ps1 and hit enter (this is how powershell loads the functions from the ps1 file)
    ### Notice that the above is period space period slash filename;
    5.) Type Convert-AllTCXFilesInFolder("C:\tcx") and hit enter.. Replace C:\tcx\ with the folder that has all of your unconverted tcx files or create a c:\tcx and put all your files there
    6.) Your files will all be converted and saved to C:\ConvertedTCXFiles. When you go to import on garmin connect just look for them there.

    I hope this will help someone else throw out their fitbit and enjoy their new Garmin! :)
Children
No Data