AI agents & automation

Building a Government Tender Intelligence Bot

How I approach building a government tender intelligence bot: collecting tenders from .gov.in portals, normalizing them, classifying relevance with an LLM and alerting the team before deadlines.

By Devang GandhiUpdated Nov 3, 20267 min read

Companies that sell to government spend hours every week checking procurement portals, scanning long lists of notices, and still miss relevant tenders. Tender scraping automation replaces that routine with a bot that collects notices, reads them and surfaces only the opportunities worth a bid team's attention.

I built a government tender intelligence bot as part of the work around Antoc at Passdn Technologies. It scrapes .gov.in portals with Playwright on a GCP VM running Xvfb, stores tenders in MongoDB and uses a Gemini classifier to decide relevance. This post walks through how I would design one end to end.

TL;DR

Write one Playwright scraper per portal, normalize every notice into a shared tender schema, and deduplicate by a stable key. Give an LLM a written business profile and have it label each tender with a relevance category and a reason. Deliver a deadline-ordered digest to the team, and monitor each portal for silent failures.

key takeaways

  • Tender scraping automation is valuable only when it filters thousands of notices down to the handful your business can actually bid on.
  • A clean tender schema with a reliable unique key is what makes deduplication across portals and re-runs possible.
  • An LLM classifier works best with a written business profile, clear relevance labels and a reason field for every decision.
  • Deadlines drive everything, so alerts and digests should be ordered by bid submission date, not by when a tender was found.

The pipeline at a glance

A tender bot has four stages, and keeping them separate makes each easier to fix.

Stage Job Tools I use
Collect Search portals, open notices, extract fields Playwright on a GCP VM with Xvfb
Store Normalize and deduplicate tenders MongoDB
Classify Label relevance with a reason Gemini
Deliver Send digests and deadline reminders Scheduled jobs to email or chat

Separation means a portal layout change only breaks collection for that portal, and you can re-run classification with an improved prompt without re-scraping anything.

Collecting from government portals

Government portals are a good case for browser automation. Many use search forms with dropdowns, session state and paginated result tables that only render after interaction. I cover general Playwright techniques in the companion post on web scraping; here are the tender-specific points.

  • One scraper per portal. Layouts differ enough that a generic scraper becomes a mess of special cases. Each scraper outputs the same normalized shape.
  • Headed browser under Xvfb. On the .gov.in portals I worked with, headed Chromium inside a virtual display was more dependable than headless mode on a server.
  • Search by recency. Pull tenders published or updated since the last successful run, with a small overlap window to catch late postings.
  • Respect manual gates. If a portal requires a captcha or login step for certain pages, treat that as a boundary. Collect what is publicly listed and link the team to the portal for the rest.
  • Low frequency. Tenders are not stock prices. One to a few runs a day is enough and keeps load on public infrastructure low.

A tender schema that survives reality

Notices vary wildly between portals, so I define the target schema first and map each portal into it.

  1. source and sourceTenderId: together form the unique key for deduplication.
  2. title and organization: the issuing department or body.
  3. category and location as published.
  4. estimatedValue where available, normalized to a number.
  5. publishedAt, bidSubmissionDeadline and bidOpeningDate as proper dates in IST.
  6. documentLinks for the notice and attachments.
  7. rawText: the extracted text used for classification.
  8. classification: label, reason, model and timestamp.

Upserting on source + sourceTenderId means re-runs update existing tenders, for example when a deadline is extended, instead of creating duplicates. A MongoDB unique compound index enforces that at the database level; the MongoDB unique index docs explain the setup.

Classifying relevance with an LLM

Keyword filters miss tenders that describe your service in different words and flood you with false matches on common terms. An LLM reading the actual scope does much better, if you set it up carefully.

Write a business profile

The classifier prompt includes a short profile: what the company does, what it does not do, typical project size, regions it serves and eligibility constraints it cannot meet. This is the single most important input. Vague profiles produce vague labels.

Use fixed labels and a reason

I ask for one of three labels, relevant, maybe or irrelevant, plus a one-sentence reason and the key matching phrases. Structured output makes this easy to store and filter. The reason field is what earns the team's trust, because they can see why a tender was flagged and correct the profile when it gets something wrong.

Keep it cheap

Classification runs on every new tender, so it should use a fast, inexpensive model and only the text needed: title, organization, category and the scope section. There is no need to send every attachment for a first-pass decision.

Delivering intelligence, not noise

The output is a short, actionable list. A good digest shows relevant tenders first, then maybe tenders, each with organization, value, deadline, reason and a link. Order by bid submission deadline so the most urgent items are on top. Add reminders a few days before deadlines for tenders the team marked as interested.

Monitoring matters as much as scraping. If a portal that normally yields dozens of notices returns zero, alert the developer, because the layout probably changed.

How I built this in practice

The tender bot runs Playwright scrapers on a GCP VM with Xvfb, writes tenders into MongoDB and passes new ones through a Gemini classifier for relevance. It sits alongside other automation built in the same environment, including an automated SEO blog pipeline running on a GitHub Actions self-hosted runner and the Antoc CRM itself, which shares the same GCP, PM2 and Nginx operational setup. You can see the wider platform in the Antoc case study. If you are in India and want a similar bot for your bid team, my India hiring page explains how I take on projects.

Common mistakes

  • Trying to build one universal scraper for every portal instead of one per source.
  • No unique key, so the same tender appears several times after re-runs or extensions.
  • Relying on keyword filters that miss relevant tenders and flag irrelevant ones.
  • Classifier prompts with no business profile, producing labels nobody trusts.
  • Sorting results by scrape time instead of bid deadline.
  • No alert when a portal silently returns zero results.

keep reading

FAQ

What is tender scraping automation?+

It is software that regularly collects tender notices from government and public procurement portals, stores them in a structured format and filters them for relevance. The team then gets a short list of opportunities instead of checking many portals by hand.

Can AI decide which tenders are relevant to my company?+

Yes, with a well-defined business profile. A language model can read a tender's title, scope and eligibility text and label it relevant, maybe or irrelevant with a reason. A human should still make the final bid decision.

Which portals can a tender bot monitor?+

Most public tender portals that display notices on the web can be monitored, including many .gov.in sites. Each portal needs its own scraper because layouts and search forms differ, and some portals require manual steps that should not be bypassed.

How much does a tender intelligence bot cost to run?+

Running costs are usually modest: a small cloud VM for the browser, a database and model calls for classification. Development effort depends mostly on how many portals you need and how different their layouts are.

Devang Gandhi

AI & full stack developer at Passdn, building CRMs, SaaS, AI agents and Flutter apps for clients in the US, UK, Australia, UAE and India. More about me

Read next

More in AI agents & automation