See llms.txt for all machine-readable content.

Back to Templates

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

Quick overview

This workflow runs daily to scrape defence tenders from the Mazagon Dock and MoD/DRDO/OFB portals, deduplicates and logs them in Google Sheets, uses OpenAI to summarize and score fit, then sends a ranked digest via Telegram, Slack, and Gmail with separate closing-soon reminders and portal health warnings.

How it works

  1. Runs every day at 9 AM (cron) and loads your portal URLs, keywords, reminder window, and notification targets from a config block.
  2. Fetches the Mazagon Dock and Defence Procurement (MoD/DRDO/OFB) tender listing pages, parses the “Latest Tenders” tables, and keeps only the newest items from each source.
  3. Merges both sources, removes duplicates within the run, and loads the existing “Defence Tenders Log” from Google Sheets to identify previously sent tenders.
  4. Filters out closed tenders, skips already-logged tenders unless the closing date changed, and scores remaining tenders by keyword matches and time-to-close.
  5. Sends each tender to OpenAI (gpt-4o-mini) to generate a short summary, category, fit score (1–5), and a recommended action (bid/watch/skip), then ranks results.
  6. Builds a single digest (with Slack/Telegram-sized chunks plus a styled HTML version) and sends it to Telegram, Slack, and Gmail.
  7. Appends or updates the tender records in Google Sheets so the next run can dedupe and detect deadline changes, and separately reads the log to send Telegram/Slack reminders for tenders closing within the configured window and marks them as reminded.
  8. Posts a Slack warning if either portal fetch/parse fails (for example due to a layout change) so broken scrapers don’t go unnoticed.

Setup

  1. Add credentials for Google Sheets, Slack, Telegram, Gmail, and OpenAI (Chat Completions) in n8n.
  2. Update the Config values with the two portal URLs, your Telegram chat ID, Slack channel ID, recipient email address, keywords/exclusions, and business profile.
  3. Create a Google Sheets document with a tab named “Defence Tenders Log” and columns: key, source, referenceNo, title, closingDate, bidOpeningDate, link, score, category, fit, action, dateAdded, reminded.
  4. Replace the placeholder Google Sheet ID (REPLACE_WITH_GOOGLE_SHEET_ID) in all Google Sheets nodes.
  5. (Optional) Remove the Telegram, Slack, or Gmail send steps if you don’t want that delivery channel, then run once manually to verify parsing and message formatting.