See llms.txt for all machine-readable content.

Back to Templates

Send CPSU tender digests with GPT-4o-mini, Google Sheets, Slack and Telegram

Quick overview

This workflow runs daily and weekly to pull new tenders and corrigenda from Coal India, BHEL, and NTPC portals, enriches them with OpenAI fit scoring and summaries, logs everything to Google Sheets, and sends digests, reminders, and portal-health alerts to Telegram, Slack, and Gmail.

How it works

  1. Runs on two schedules (daily at 9 AM and Mondays at 9 AM) and loads portal URLs, keywords, scoring settings, and delivery targets from a configuration step.
  2. On the daily run, fetches the latest tenders from the Coal India, BHEL, and NTPC websites, keeps only the newest entries per source, and deduplicates them for the day.
  3. Reads an existing Google Sheets tender log to drop already-sent tenders, re-include tenders whose closing date changed, and score remaining tenders based on keyword matches and time-to-close.
  4. Uses OpenAI (gpt-4o-mini) to classify each tender into a sector, generate a short summary, and assign a fit score and recommended action (bid/watch/skip).
  5. Builds a ranked digest and sends it to Slack and Telegram (splitting into Telegram-sized chunks) and emails a formatted HTML version via Gmail, then appends or updates each tender record in Google Sheets.
  6. Separately on the daily run, scans the Google Sheets log for tenders closing within the reminder window, sends one reminder message to Slack and Telegram, and marks them as reminded in the sheet.
  7. Also on the daily run, checks each portal for “Latest Corrigendum” items that reference previously-sent tenders, alerts Slack and Telegram once per new corrigendum, and updates the log to mark those corrigenda as seen.
  8. On every daily fetch, posts a Slack warning if any portal parsing fails so you can fix broken source pages before digests go missing.

Setup

  1. Add credentials for Google Sheets, Slack, Telegram, Gmail, and OpenAI (Chat Model) in n8n.
  2. Update the Config values with your Coal India/BHEL/NTPC portal URLs, Telegram chat ID, Slack channel ID, recipient email, keywords, and business profile.
  3. Create a Google Sheet with a “CPSU Tenders Log” tab and ensure it includes the columns used for matching and updates (at minimum: key, source, referenceNo, title, closingDate, bidOpeningDate, link, sector, score, fit, action, dateAdded, reminded, corrigenda).
  4. Replace the placeholder Google Sheet document ID (REPLACE_WITH_GOOGLE_SHEET_ID) everywhere it appears in the Google Sheets nodes.
  5. Optional: set a real https URL for the Tender OS ingest endpoint and configure HTTP Header Auth for the outbound request if you want to forward new tenders to your own system.