On-Demand Sync
Trigger a fresh Intervals.icu sync from your phone or browser, then download the data files. No local Python, no scheduled runs. You sync when you want to.
Want automatic sync on a schedule? See json-auto-sync instead.
Running an agentic platform locally? See json-local-sync. No GitHub needed.
Overview
Uses the same GitHub Actions workflow as auto-sync, but without the cron schedule. You tap a link in your repo's README to trigger a sync, and download the resulting files as a ZIP artifact from the completed run.
Flow: Tap Sync Now → Run workflow → Download artifact ZIP → Attach to AI chat.
GitHub connector users: If your AI platform has a GitHub connector, you can skip the download, but refresh, sync, or re-import after the workflow commits, since not all connectors pick up changes automatically. See the connector table.
Prerequisites
- Intervals.icu account with training data
- GitHub account
- 10 minutes for setup
Step 1: Get Your Intervals.icu Credentials
- Athlete ID: Intervals.icu → Settings → bottom of page (e.g.,
i123456) - API Key: Intervals.icu → Settings → Developer Settings → API Key
Step 2: Set Up GitHub Repository
- Go to github.com/new
- Name it something like
training-data - Set to Private (recommended)
- Check Add a README file
- Click Create repository
Then add these files:
| File | Location | Source |
|---|---|---|
sync.py |
Root | examples/sync.py |
auto-sync.yml |
.github/workflows/ |
examples/json-auto-sync/auto-sync.yml |
README.md |
Root (replace default) | DATA_REPO_README_TEMPLATE.md |
Important: Edit auto-sync.yml after copying. Remove the schedule block so only workflow_dispatch remains:
on:
workflow_dispatch: # Allow manual trigger
This prevents automatic runs. The workflow only runs when you trigger it.
To create the workflow folder:
- Click "Add file" → "Create new file"
- Name it:
.github/workflows/auto-sync.yml - Paste the workflow content, remove the
scheduleblock - Commit
Step 3: Add Repository Secrets
- Go to your repo → Settings → Secrets and variables → Actions
- Click New repository secret
- Add these secrets:
| Secret Name | Value |
|---|---|
ATHLETE_ID |
Your Intervals.icu athlete ID (e.g., i123456) |
INTERVALS_KEY |
Your Intervals.icu API key |
Optional secrets: see auto-sync SETUP for WEEK_START and ZONE_PREFERENCE.
Step 4: Enable Workflow Permissions
- In Settings → Actions → General
- Scroll to "Workflow permissions"
- Select "Read and write permissions"
- Click Save
Step 5: Update README Template
Replace YOUR_GITHUB_USER and YOUR_REPO_NAME in README.md with your actual GitHub username and repo name.
Step 6: First Run
- Go to your repo → Actions tab
- If prompted, enable workflows
- Click on "Auto-Sync Intervals.icu Data"
- Click Run workflow → Run workflow
- Wait 30–60 seconds for the run to complete
After the run completes:
- Connector users: Refresh, sync, or re-import so your AI picks up the new files. See the connector table.
- Download users: Click the completed run → scroll to Artifacts → download training-data ZIP.
From now on, just tap 🔄 Sync Now in your repo's README.
Usage
From your phone
Open your repo in a browser → tap 🔄 Sync Now → Run workflow. When the run completes, download the artifact or refresh, sync, or re-import through your connector as required.
With an AI connector
AI platforms with GitHub connectors can read the repo directly, but refresh behavior varies; some need a manual sync or re-import before they see the new files. Check the connector table for your platform, then refresh accordingly. No download needed once the connector has the current files.
Without a connector
Download the training-data artifact ZIP from the completed run, then attach the JSON files to your AI chat.
Security
Downloading the artifact ZIP and attaching the JSON to a chat takes your data outside GitHub authentication. A connector reads the repository directly, so processing and retention there are governed by that AI platform's terms rather than by Section 11. Where the files go from there depends on what you configure and which AI you point them at. This workflow publishes no GitHub Pages site. Private repos remain private. The workflow and required-secret handling are identical to auto-sync apart from the manual trigger. See Privacy & Security for the full policy.
Updating an Existing Repository
When the workflow template changes, follow Updating an Existing Repository in the auto-sync guide, with these differences. Skip its step 2 (Choose a schedule) and step 8 (Watch the next scheduled run). The current auto-sync.yml includes a schedule block, so in its step 4, remove the schedule: block again before you commit and keep workflow_dispatch:, as in Step 2 of this guide; otherwise the workflow starts running on a schedule. Reapply any other changes you still want as usual.
Troubleshooting
See the auto-sync troubleshooting guide. The same workflow runs in both paths.