Quick overview
This workflow runs daily to fetch tender listings from central eProcure plus the Madhya Pradesh and Uttar Pradesh portals, dedupes and tracks deadline changes in Google Sheets, uses OpenAI to summarize and score fit, and sends per-state digests and closing reminders to Telegram and Slack.
How it works
- Runs every day at 9 AM (cron schedule) and loads a configuration that defines portal URLs, watched states, routing targets, keywords, and reminder rules.
- Fetches tender pages from the central eProcure portal and the MP and UP tender portals, then parses and limits each source to the most recent listings.
- Classifies central eProcure tenders to watched states based on the tender title, merges all sources, deduplicates the combined list, and posts a Slack warning if any portal fails or its layout appears to have changed.
- Reads the existing State Tenders Log from Google Sheets, filters out already-alerted or closed tenders, detects and re-alerts deadline changes, and scores remaining tenders by keyword matches and time-to-close.
- Sends each tender to OpenAI (gpt-4o-mini) to generate a short summary, category, fit score, and a bid/watch/skip recommendation, then ranks items using both the rule-based score and AI fit.
- Builds one digest per state and sends it to the configured Telegram chat and Slack channel (with fallbacks), then appends or updates the processed tenders in the Google Sheets log.
- Separately scans the Google Sheets log for tenders closing within the configured reminder window that have not been reminded, sends per-state reminder messages to Telegram and Slack, and marks those tenders as reminded in Google Sheets.
Setup
- Add credentials for Google Sheets, Slack, Telegram, and OpenAI (ChatGPT), or remove the Telegram steps if you only want Slack notifications.
- Update the Config values with your three portal listing URLs, watched states, keywords/business profile, and the default Slack channel ID and Telegram chat ID.
- Create a Google Sheet with a tab named “State Tenders Log” using the expected columns (including a unique
key column), and replace REPLACE_WITH_GOOGLE_SHEET_ID in all Google Sheets steps.
- In Slack, ensure the bot has access to the target channels and set valid channel IDs for each state (or rely on the default channel).
- In Telegram, obtain the chat IDs for each state and the default chat, and ensure the bot is added to those chats with permission to post.