I’ve created a Python script to automate uploading training schedules created by ChatGPT to your Intervals.icu calendar. It reads a trainings.json file with your planned workouts and sends them directly to the calendar using the API. This works for cycling, running, and swimming workouts with detailed steps like intervals, durations, and power zones.
Why Automate?
Saves time compared to manual entry.
Ensures consistency in formatting.
Easily adaptable for different training schedules.
You can find the script, detailed instructions, and examples on GitHub:
Let me know if it helps or if you have suggestions for improvements!
Thanks I’ll have a play. From my first attempt with ChatGPT the JSON file workouts are not fully correct so might need some model training. But then I asked him to create me a python script to send the data to Intervals.icu and it has given me a basic script.
UPDATE: I made a custom GPT that you can use to build trainingplans and upload them to Interval.icu: Coach GPT for Intervals.icu
I would love the have some feedback!
I conducted a test and submitted a pull request on GitHub. It appears quite promising. Would you prefer receive feedback on the forum or on GitHub? (such as duplicate, bulk handling, placing the plan within a Plan instead of directly in the calendar…) Keep up the good work!
I’m looking if there’s a video tutorial somewhere how to interact with Intervals.icu through API using Python? I have VSC on my computer and basic Python skills. I have some sample JSON files for some workouts I created using ChatGPT so my next step is to test API.
Hi Radvocaat,
Thanks for spending some time on it and for your pull request!
I think we can keep the forum for the overall discussion and on Github the more technical stuff? I know they’re way more possibilities whit the Python script and API calls, but I started this project because I’m doing my first 1/4 triathlon this year with some friends and wanted to provide them something to build a training schema. So I made it as simple as possible
I don’t have any video tutorial, but there’s a guideline on the Github repo. You can find any step you need to achive the upload of the events.
Let me know if anything isn’t clear!
Thanks for creating the script! Been trying it out and it seems that it doesn’t accept distances (km or mi) and that there’s no option for repetitions (e.g. “6x”). It also gave me an error when submitting a duration with hours. Are these features that could be added?
Hi, indeed the script is pretty short and simple, but normally works well with the output from the ChatGPT coach. You can also ask the GPT to change hours to minutes and write-out the repetitions? The distances need to be added to the script. Feel free to add the features true a pull request or you can suggest them in an Issue on GitHub and I’ll try to add them when I find some time.
Thanks - It definitely works well when asking ChatGPT to adapt to the current format, only mentioned some ease of use updates. Not familiar with GitHub, but I’ll try and submit my suggestions there.
I’m having mixed results with this with a running plan. CoachGPT is outputting the json in chucks (which is expected), however when importing (using the PowerShell script) some workouts are imported as swims & others without any load. Potential bug, or is there a way to specify the workout type?
Ass mentioned in the other post, the name of the workout needs to have the type of wourkout
"type": "Ride" if "Bike" in training["name"] else "Run" if "Run" in training["name"] else "Swim",
Normaly the GPT should make the Name like: “Bike - VO2 Intervals”.
Another problem I see is that you use k instead of km, the scripts only works with km.
I need to check and debug the Powershell script. The only problem here is that I only have Linux, so need to spin up a VM for that. I asked ChatGPT to convert the Python script to Powershell Just putted the latest version to Github, maybe this brings any solution.