๐Ÿ“ฑ 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

  1. Every 10 Seconds Trigger (Schedule)
  2. Runs continuously at a 10-second interval to keep match updates near real-time.
  3. Fetch Live Cricket Score (SerpAPI Node)
  4. Queries Google for live India cricket match data using SerpAPI.
  5. Extract Latest Match Data (Function Node)
  6. Pulls structured match details:
  1. Skip If No Match Result (IF Node)
  2. Prevents unnecessary processing when no valid match data is available.
  3. Generate AI Match Commentary (OpenAI GPT-4o-mini)
  4. Transforms raw match data into structured insights:
  1. Send Commentary to Telegram (Telegram Node)
  2. Delivers formatted commentary instantly to a Telegram chat using Markdown.
  3. Email Alert on AI Failure (Gmail Node)
  4. If AI generation fails:
  1. Error Trigger โ†’ Slack Alert
  2. 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

๐Ÿ”— Nodes Used

Function, Slack, Telegram, Gmail, Schedule Trigger, AI Agent

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup