This document describes the automated system for refreshing the plugin catalog data from the XrmToolBox OData feed.
The plugin data is sourced from the public XrmToolBox Power Pages OData endpoint:
https://www.xrmtoolbox.com/_odata/plugins
This endpoint requires no authentication and returns plugin information in OData JSON format.
Note: The endpoint uses pagination (typically 200 plugins per page). The refresh script automatically fetches all pages to ensure complete data.
A Node.js script that:
- Fetches the latest plugin data from the OData endpoint
- Handles OData pagination to fetch all plugins across multiple pages
- Validates the response structure
- Updates
src/data/plugins.jsonwith proper formatting - Displays statistics about the plugins and pages fetched
Usage:
npm run refresh-pluginsA convenient bash script for administrators that:
- Runs the refresh script
- Detects changes in the plugin data
- Optionally commits changes to git
Usage:
# Refresh only (no commit)
./scripts/refresh.sh
# Refresh and commit changes
./scripts/refresh.sh --commitAutomated workflow that:
- Runs daily at 2 AM UTC (scheduled via cron)
- Can be triggered manually from the GitHub Actions tab
- Automatically commits and pushes changes if plugin data is updated
- Only creates commits when actual changes are detected
- Has write permissions to commit changes back to the repository
Manual Trigger:
- Go to your GitHub repository
- Click on the "Actions" tab
- Select "Refresh Plugin Data" workflow
- Click "Run workflow"
- Optionally provide a reason for the refresh
- Click the green "Run workflow" button
For on-demand refresh during local development:
# Quick refresh
npm run refresh-plugins
# Or use the admin script
./scripts/refresh.sh --commit
git pushThe recommended deployment approach uses GitHub Pages with automatic plugin data refresh via GitHub Actions (already configured). No additional setup needed - the workflow runs daily and deploys automatically.
- Trigger the workflow manually from GitHub Actions
- Changes are automatically deployed via your CI/CD pipeline
The GitHub Action runs automatically every day at 2 AM UTC. No additional setup needed.
If you want to run the refresh directly on the VPS:
# SSH into your VPS
ssh user@your-vps-ip
# Navigate to your project directory
cd /path/to/xrmtoolbox-plugin-catalog
# Run the refresh
npm run refresh-plugins
# Or use the admin script
./scripts/refresh.sh --commit
# Push changes (if not auto-deploying from git)
git pushIf you prefer to run the refresh directly on your VPS, add a cron job:
# Edit crontab
crontab -e
# Add this line to run daily at 2 AM local time:
0 2 * * * cd /path/to/xrmtoolbox-plugin-catalog && npm run refresh-plugins && git add src/data/plugins.json && git commit -m "chore: daily plugin refresh" && git push
# Or use the admin script:
0 2 * * * cd /path/to/xrmtoolbox-plugin-catalog && ./scripts/refresh.sh --commit && git push- GitHub Action triggers at 2 AM UTC daily
- Script fetches data from OData endpoint
- Data is validated and formatted
- If changes detected:
- File is updated
- Changes are committed
- Commit is pushed to repository
- If no changes: Workflow completes with no commit
- Admin triggers refresh (via GitHub Actions UI or local script)
- Same process as automated updates
- Option to review changes before committing (when using
./scripts/refresh.sh)
- View workflow runs in the "Actions" tab of your repository
- Each run shows:
- Success/failure status
- Whether changes were detected
- Number of plugins fetched
- Commit details (if changes were made)
Test the refresh script locally:
# Dry run (no commit)
npm run refresh-plugins
# Check for changes
git status
# Review changes
git diff src/data/plugins.jsonPossible causes:
- Network connectivity issues
- OData endpoint is temporarily down
- Rate limiting or access restrictions
Solutions:
- Check network connectivity:
curl https://www.xrmtoolbox.com/_odata/plugins - Wait a few minutes and try again
- Check GitHub Actions logs for detailed error messages
Possible causes:
- The OData feed itself hasn't been updated
- The data is already current
Solutions:
- Verify the OData endpoint directly in a browser
- Check the
mctools_latestreleasedatefields in the JSON - Compare with the XrmToolBox official website
Possible causes:
- Local changes conflict with automated commits
- Multiple refresh operations running simultaneously
Solutions:
# Pull latest changes
git pull
# Re-run refresh
npm run refresh-plugins- Always Up-to-Date: Plugin catalog automatically stays current
- No Manual Work: Scheduled daily updates require no intervention
- Flexible: On-demand refresh when you need it
- Transparent: All updates are tracked in git history
- Reliable: Redundant options (GitHub Actions + VPS cron if needed)
- Efficient: Only commits when actual changes occur
- Plugin Data:
src/data/plugins.json - Refresh Script:
scripts/refresh-plugins.js - Admin Script:
scripts/refresh.sh - GitHub Workflow:
.github/workflows/refresh-plugins.yml - Documentation:
PLUGIN_REFRESH.md(this file)