๐ฑ Generate live cricket score commentary using SerpAPI, GPT-4o-mini, and Telegram
โก 135 views ยท ๐ฑ Social Media & Email Marketing
Description
๐ Description
This workflow is a real-time AI-powered cricket commentary bot that continuously monitors live match data and converts it into short, expert-style insights. It fetches live cricket scores every few seconds, extracts key match details, generates commentary using AI, and delivers updates instantly to Telegram. It also includes fail-safe mechanisms via email and Slack alerts to ensure reliability.
โ๏ธ Step-by-Step Flow
- Every 10 Seconds Trigger (Schedule)
- Runs continuously at a 10-second interval to keep match updates near real-time.
- Fetch Live Cricket Score (SerpAPI Node)
- Queries Google for live India cricket match data using SerpAPI.
- Extract Latest Match Data (Function Node)
- Pulls structured match details:
- Team names
- Scores
- Match result/status
- Tournament
- Skip If No Match Result (IF Node)
- Prevents unnecessary processing when no valid match data is available.
- Generate AI Match Commentary (OpenAI GPT-4o-mini)
- Transforms raw match data into structured insights:
- Match summary
- Key turning point
- Best performance
- Tactical insight
- Maintains expert tone and concise commentary style.
- Send Commentary to Telegram (Telegram Node)
- Delivers formatted commentary instantly to a Telegram chat using Markdown.
- Email Alert on AI Failure (Gmail Node)
- If AI generation fails:
- Sends an email alert
- Ensures manual follow-up
- Error Trigger โ Slack Alert
- Catches any workflow-level failures and sends alerts to a Slack channel for monitoring.
๐งฉ Prerequisites
โข SerpAPI credential (for live scores) โข OpenAI API (GPT-4o-mini) โข Telegram Bot + chat ID โข Gmail OAuth2 (for failure alerts) โข Slack API (optional for error monitoring)
๐ก Key Benefits
โ Near real-time cricket updates (10s interval) โ AI-generated expert commentary (not raw scores) โ Automated delivery to Telegram โ Failure-safe alerts via email + Slack โ Fully hands-off live match tracking
๐ฅ Perfect For
- Cricket Telegram channels and communities
- Sports commentary automation systems
- Live score notification bots
- Fan engagement platforms for real-time updates
๐ Nodes Used
Function, Slack, Telegram, Gmail, Schedule Trigger, AI Agent
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File