Daily MLB pitcher vs. batter matchup analysis with Google Sheets and Telegram
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs on a schedule (every day at 09:00) (plus 1 other trigger). Along the way it connects Google Sheets and Telegram. It also calls statsapi.mlb.com over HTTP.
How it runs
Trigger: On a schedule (every day at 09:00) (plus 1 other trigger).
- Clear your Sheet (Google Sheets): clear
- 2. Get Daily Games (HTTP Request): calls statsapi.mlb.com
- 3. Extract All Player IDs (Code): runs custom JavaScript code
- 4. Get Batched Player Stats (HTTP Request): calls statsapi.mlb.com
- 5. Create Final Matchup Rows (Code): runs custom JavaScript code
- 6. Filter for Top Matchups (Code): runs custom JavaScript code
- Column Order (Code): runs custom JavaScript code
- 7. Update Your Sheet (Google Sheets): append or update
- 8. 21 Hitters (Code): runs custom JavaScript code
- 9. sendToTelegramChatbot (Telegram): uses Telegram
Services it uses
HTTP calls to: statsapi.mlb.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (5)
- Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Telegram
n8n-nodes-base.telegram
From the author
MLB "Hits" Workflow — Overview • Pulls today's MLB schedule incl. probablePitcher + lineups (statsapi.mlb.com) • Batches season stats for all involved players • Builds pitcher vs. batter matchup rows Setup Steps: 1) Google Sheets OAuth2 → point to your Google…