r/n8n • u/Mastersam04 • 5m ago
Workflow - Github Included 5 nasty quirks I hit wiring official French government APIs into n8n (and 3 MIT JSON blueprints I open-sourced)
Whenever someone builds a French or European B2B workflow in n8n (credit risk, public tenders, energy renovation leads), the default move is Playwright + residential proxies against commercial directories. It breaks every few weeks and eats proxy credits.
Over the last couple of months I switched to querying France's official Etalab Open Licence 2.0 public APIs directly (bodacc-datadila, boamp-datadila, Ministry of Economy decp-2022-marches-valides, recherche-entreprises.api.gouv.fr for SIRENE/RNE, and data.ademe.fr DPE). They're legal, updated daily, and require zero proxies — but calling them straight from n8n HTTP Request nodes has 5 real gotchas that cost me days to sort out:
- BODACC embeds nested JSON as escaped strings inside JSON fields. Both
jugementandlistepersonnescome back stringified. Pulling the 9-digit SIREN fromregistre, regex-extracting the court-appointed liquidator/mandataire fromcomplementJugement, excluding closed liquidations (NOT search(jugement,"clôture")), and computing the statutory +2-month creditor claim deadline (art. L.622-24) turns a single Code node into a maintenance headache. - DECP 2022+ (
decp-2022-marches-valides) doesn't expose an expiration date. You getdatenotificationanddureemois, plus SIRETs that sometimes drop leading zeros (13 digits instead of 14) and missingbuyerNamestrings that need SIREN fallback. Catching contracts 6–12 months before renewal means normalizing IDs, computingestimatedEndDate+daysUntilExpiration, and over-scanning paginated batches client-side. - SIRENE (
recherche-entreprises.api.gouv.fr) enforces a strict 7 req/s limit. Firing 50 items from an n8n loop without pacing triggers429immediately. You need ~180 ms spacing, backoff on429/5xx, and constantper_pagepagination (plus respecting INSEE RGPD diffusion statusOvsP, sinceNwas retired in 2023). - ADEME DPE (
dpe03existant) uses Lucene-styleqssyntax + cursor pagination (nextURL) instead of offsets, and splits floor area acrosssurface_habitable_logementvssurface_habitable_immeuble. - BOAMP mixes active RFPs and contract awards in the same stream unless you explicitly filter
nature="APPEL_OFFRE"anddatelimitereponse >= today.
Even if you build everything in raw n8n HTTP + Code nodes, keeping those 5 quirks in mind will save you a weekend.
Because I needed clean, repeatable pipelines across n8n and MCP agents, I open-sourced 3 ready-to-import n8n JSON blueprints (MIT license) with full sticky-note documentation and native Header Auth credentials:
Open-source repo: https://github.com/Mastersam04/govdata-api-starter
What's in n8n-workflows/:
- BODACC + SIRENE Insolvency Radar -> Slack / Email digest (deduplicates SIRENs before batch enrichment, flags open L.622-24 deadlines & staffed SMEs).
- DECP 2022+ Public IT Contract Renewals (6–12m pre-RFP) + SIRENE -> Google Sheets / Notion (idempotent upsert on
contractId). - ADEME DPE F/G Houses (Oil/Gas >= 90 m²) -> Airtable + HOT lead webhook (parses GPS geopoints + deterministic urgency scoring).
Full transparency: the HTTP nodes in those blueprints call lightweight zero-proxy Pay-Per-Event Apify Actors I published under GovData API (https://govdata-api.com — 10 France/EU public APIs, $2–$5/1k, hard maxTotalChargeUsd caps baked into every workflow). If you want to inspect the live data first with zero account and zero API key, there's also a free remote MCP endpoint (https://govdata-api.com/mcp) that runs live previews on 5 French registries straight from Claude/Cursor.
Happy to share the raw OpenDataSoft / Data Fair query parameters in the comments if you'd rather skip Apify and wire the upstream government endpoints directly in n8n.