跳到正文
DEV Community· Mr. Wolf·· 3 小時前AI 評分58

TED 每日歐盟招標提醒:如何在 n8n 加入投標/不投標評分

Daily EU tender alerts from TED with a bid/no-bid score in n8n

AI 導讀

作者在 n8n 建立每日 TED 歐盟招標提醒工作流,按已讀記錄、剩餘準備時間及自訂規則評分,再把高分通知送往 Slack。在 2026-11-29 的測試中,26 條公告經篩選後剩 22 條,12 條達到 60 分門檻並列入 HotTenders,另外 10 條列入 Watchlist。

正文

I built the Actor used in this post (mr.wolf/eu-tenders-mcp-server). Numbers come from a run on 29 November 2026.

TED publishes thousands of EU procurement notices every week. The alert emails TED sends match on CPV codes and nothing else. They do not know that a 6-day deadline is useless to your team, that you only win contracts between 80k and 1.5M EUR, or that you already saw the notice yesterday. You end up reading the list by hand.

This post builds a small n8n workflow that does the filtering: fetch the last two days of notices, drop the ones already seen, drop the ones with too little time left, score the rest from 0 to 100 and send only the high scores to Slack.

Where the data comes from

The Actor calls the official TED search API (v3) over plain HTTP. No browser, no proxy, 256 MB of memory. It returns one normalized record per notice. If the notice has no global estimated value, it sums the lot values, which is where most of the missing budgets hide.

The input for this workflow, with the dates of my test run:

{
  "countries": ["IT", "DE", "FR", "ES", "AT"],
  "cpvCodes": ["72000000", "48000000"],
  "minBudget": 40000,
  "publishedFrom": "2026-11-26",
  "minDeadline": "2026-11-28",
  "maxItems": 100
}

It returned 26 notices. These are 3 of them, trimmed (I left out documentUrl and shortened the long Italian titles):

{
  "tenderId": "827485-2026",
  "title": "Italy – IT software package – PROCEDURA APERTA ... LICENZE MASTER DATA MANAGEMENT 360 E NUOVE SUBSCRIPTIONS PER CDP",
  "buyerName": "Cassa Depositi e Prestiti S.p.A.",
  "country": "IT",
  "cpvCodes": ["48517000", "48000000"],
  "estimatedValue": 268000,
  "currency": "EUR",
  "publicationDate": "2026-11-27",
  "submissionDeadline": "2026-12-29"
}
{
  "tenderId": "820490-2026",
  "title": "Germany – Software package and information systems – ITDZ Berlin: OV RV Datenschleuse",
  "buyerName": "IT-Dienstleistungszentrum Berlin (AöR)",
  "country": "DE",
  "cpvCodes": ["48000000", "48732000", "72318000"],
  "estimatedValue": 723800,
  "currency": "EUR",
  "publicationDate": "2026-11-26",
  "submissionDeadline": "2026-12-04"
}
{
  "tenderId": "820948-2026",
  "title": "Austria – Software package and information systems – Microsoft Enterprise & Select",
  "country": "AT",
  "estimatedValue": 1700000000,
  "currency": "EUR",
  "publicationDate": "2026-11-26",
  "submissionDeadline": "2026-11-30"
}

The last one is a framework for the whole Austrian federal administration. It is worth 1.7 billion EUR and closes in two days. It shows why a deadline filter matters. (The CPV filter is hierarchical: 72000000 also matches child codes such as 72267100, and short prefixes are padded to 8 digits.)

The workflow

Eleven nodes, one schedule trigger at 07:00:

  1. Profile node. A Set node holding countries, CPV codes, keywords, the budget sweet spot, minDaysToPrepare (10) and hotThreshold (60). All the tuning happens here.
  2. HTTP Request to run-sync-get-dataset-items, with publishedFrom set to two days ago and minDeadline set to today:
curl -X POST "https://api.apify.com/v2/acts/mr.wolf~eu-tenders-mcp-server/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"countries":["IT","DE"],"cpvCodes":["72000000"],"minBudget":40000,"publishedFrom":"2026-11-26","maxItems":100}'
  1. Code node: dedupe and deadline. It keeps the IDs already seen in the workflow static data and drops anything with fewer days left than minDaysToPrepare:
const store = $getWorkflowStaticData('global');
store.seenTenderIds = store.seenTenderIds || {};
const out = [];
for (const { json: t } of $input.all()) {
  if (!t.tenderId || store.seenTenderIds[t.tenderId]) continue;
  store.seenTenderIds[t.tenderId] = Date.now();
  const daysLeft = Math.ceil((Date.parse(t.submissionDeadline) - Date.now()) / 86400000);
  if (daysLeft < cfg.minDaysToPrepare) continue;
  out.push({ json: { ...t, daysLeft } });
}
  1. Code node: score. 35 points at most for keyword hits in the title or buyer name, 25 if the value is in your sweet spot (10 if it is only known), 20 if there are at least 21 days left (10 otherwise), 20 for a preferred country.
  2. IF node on bidScore >= hotThreshold. Hot notices go to Slack and a HotTenders sheet, the rest to a Watchlist sheet.

Static data persists only when the workflow runs on its schedule. In a manual test execution the seen list is not saved, so the dedupe looks broken until you activate the workflow.

What came out

I ran the dedupe, deadline and scoring code on the 26 real records, with the clock set to 29 November and these keywords: software, cloud, data, cybersecurity, platform. Preferred country: IT.

  • Dropped by the deadline rule (fewer than 10 days left): 825120-2026 (FR, 4 days), 820832-2026 (FR, 8), 820490-2026 (DE, 5) and 820948-2026 (AT, 1).
  • 22 notices left. 12 scored 60 or more (hot), 10 went to the watchlist. The top of the list:
95  827485-2026  IT  268,000 EUR      keywords: software, data; budget in sweet spot; 30 days; preferred country
95  824816-2026  IT  580,000 EUR      keywords: software, data; budget in sweet spot; 29 days; preferred country
90  826662-2026  IT  599,320 EUR      keywords: software; budget in sweet spot; 30 days; preferred country
70  826961-2026  IT  1,725,000 EUR    keywords: software, data; budget known; only 16 days; preferred country
70  827786-2026  DE  600,000 EUR      keywords: software; budget in sweet spot; 53 days
...
50  824231-2026  IT  1,653,942.91 EUR budget known; 29 days; preferred country
  • A second pass over the same data returned 0 new notices, which is the dedupe doing its job.

The last row is the weakness of keyword scoring. It is a 36-month Azure credit purchase. The title says "Azure" and "computer equipment", never "cloud", so it scored 50 and went to the watchlist. Add vendor names to your keyword list, or read the watchlist once a week. I would rather see this in the output than hide it: the score is a sort order, not a decision.

A second weakness: 827766-2026 (Comune di Matera, 1,275,685 EUR, 47 days) has no keyword hit but still scores 65 on budget, time and country. With a wider CPV filter you get more notices like it, so tune hotThreshold after a week of real data.

Ask questions with MCP

The same Actor runs as a Streamable HTTP MCP server. Config for Cursor:

{
  "mcpServers": {
    "eu-tenders": {
      "url": "https://mr-wolf-1--eu-tenders-mcp-server.apify.actor/mcp",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}

Two tools: search_eu_tenders (same filters as the batch input) and get_tender_details (one tenderId, searches all notices, not only active ones). After a Slack alert, I use prompts like "Show other notices from Cassa Depositi e Prestiti published in the last 6 months" or "Open 827485-2026 and list its CPV codes".

Cost

Pay-per-event prices on the Store at the time of writing, free tier: $0.003 per notice returned, $0.00005 per run start, $0.005 per MCP tool call.

  • My test run: 26 notices, 26 × 0.003 + 0.00005 = about $0.078.
  • Daily workflow returning 20 notices: about $0.06 a day, $1.80 a month.

You pay for every notice the Actor returns, including the ones your dedupe node then throws away. A 2-day window means you pay twice for each notice. Use a 1-day window if you run reliably every day.

Limits

  • Source is the TED search API. It covers notices published on TED, so it has no national portals below the EU thresholds.
  • With minBudget or maxBudget set, notices without any estimated value are dropped. Many notices have none. Leave the filter out if you also want those.
  • Currency is as published. The Actor does not convert to EUR.
  • Deadlines are dates. The time of day and time zone are not in the record, so "2 days left" can be off by one.
  • The score is my own simple heuristic, not a probability of winning.

The Actor is on the Apify Store: https://apify.com/mr.wolf/eu-tenders-mcp-server. Source (MIT): https://github.com/Mr-Wolf-Dev/eu-tenders-mcp-server. The TED API documentation is at https://docs.ted.europa.eu/api/latest/index.html.


This post was drafted with AI assistance and checked against live runs of the Actor before publishing.

來源:DEV Community · dev.to