Skip to main content

Export and import calendar events

You can export and import calendar events with their associated data (i.e. workouts) in JSON format.

When to use:

  • Backup data, i.e before deleting an athlete.

  • Moving calendar information between Trayn environments.

When not to use this feature:

  • When you want to re-use a workout regimen you have created for one athlete in their calendar for another athlete. In this case it's usually more advisable to create a micro template from the calendar and assign this template to the other athlete.

Which data is included in the export?

  • The base properties of the calendar event: title, description, location, date, start and end time.

  • For competition events: opponent and home/away info.

  • For workouts: the full workout details with all referenced data sets. The exported data is actually a super-set of the workout export and can also be used on the "Import Workouts" page to import only the workouts without the calendar events.

Export

In a calendar, click the menu icon (≡) to open the sidebar menu. Here you can configure which calendars to show. The selection will also be used in the export.

Then click the button "Print/Export Workouts" to open the dialog. In the "Export" section click the "JSON" button and finally the "Download JSON" button.

The export is only available if you have selected exactly one athlete calendar. Injuries are not included in the export.

If you select the option "JSON with Workouts" the calendar events are omitted in the export. The resulting JSON file can still be used to import the workouts back into Trayn.

Import into calendar

Go to the team or athlete calendar you want the events import into and open its sidebar menu. Then click the "Import Events" link.

On the import page, open a JSON file with calendar events. A preview will list the events from the file. If the file contains exercises or presets not present in your environment, you have to resolve all missing mappings. See the "Import Workouts" article for details.

Start the import by clicking the button at the bottom of the page and wait while the button remains active. Once the import is finished, a summary will be presented to you.

If the target calendar is a team calendar, tracked workouts will be imported as normal planned workouts. In a personal calendar tracked workouts will keep their tracking status.

Recurring events

If there are recurring events in your JSON file, there are two options how to handle them:

  • Import as recurring event: An event with recurrence rule will be created, the same as in the exported calendar. If the recurrence rule has a wider date range than the export, this will result in more events than visible in the import preview.
    If it is a workout event, all recurring events will reference the same workout.

  • Import as shown in the preview: Will create separate events without recurrence rule for each of the recurring events from the export.
    This will also create a separate copy of the workout for each event.

Already imported events

The web browser remembers which events have already been imported into which calendar. If a selected file contains events that have already been imported, you will see a warning and have the option to skip already imported events.

This is useful when importing multiple files with overlapping events.

Did this answer your question?