add_event_from_library
Schedule a library workout on a chosen day in Intervals.icu, copying its steps and load while refusing duplicate entries unless duplicates are allowed.
Instructions
Use only when the athlete asks to schedule a workout from the library on a day. Writes a new WORKOUT event to Intervals.icu.
Copies the library workout's name, steps, type, duration, distance, tags and planned load; a duplicate of that day is refused (allow_duplicate). A workout imported from a file (.zwo, .mrc, .erg, .fit) without workout steps in its text is created without steps; the answer says so. dry_run shows the request; the answer reads back what was stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Day YYYY-MM-DD | |
| dry_run | No | true = check and return the exact request, write nothing | |
| athlete_id | No | Default: the configured athlete | |
| workout_id | Yes | Library workout id (get_workout_library); small numbers such as 1 are normal | |
| allow_duplicate | No | Create even if that day has the same event (name or workout) |