[Community Node] Brasil Hub — 9 resources, 22 providers, automatic fallback for all Brazilian public data

Hey everyone!

I built Brasil Hub — a single n8n community node that replaces 5+ separate nodes for querying Brazilian public data. One node, 9 resources, 22 providers, zero credentials.

Why I built this

If you work with Brazilian data in n8n, you’ve probably hit these problems:

  • APIs go down randomly — BrasilAPI is great until it’s not. Your workflow breaks at 2am
  • No fallback — when one API fails, your entire automation stops
  • Multiple nodes for simple tasks — one HTTP Request for CNPJ, another for CEP, another for banks…
  • Different response formats — every API returns data differently, so you need a Code node to normalize

Brasil Hub solves all of this with automatic multi-provider fallback and normalized output.

What it does

Resource Operations Providers
CNPJ Query, Validate BrasilAPI → CNPJ.ws → ReceitaWS → MinhaReceita → OpenCNPJ.orgOpenCNPJ.com → CNPJA (7!)
CEP Query, Validate BrasilAPI → ViaCEP → OpenCEP → ApiCEP
CPF Validate Local checksum (no API call)
Bank Query, List BrasilAPI → BancosBrasileiros
DDD Query BrasilAPI → municipios-brasileiros
Holiday Query BrasilAPI → Nager.Date
FIPE Brands, Models, Years, Price parallelum
IBGE States, Cities BrasilAPI → IBGE API
NCM Query, Search BrasilAPI

How fallback works

Your query → Provider 1 (BrasilAPI)
                ├─ Success → Return normalized data ✅
                └─ Fail → Provider 2 (ViaCEP / CNPJ.ws)
                             ├─ Success → Return normalized data ✅
                             └─ Fail → Provider 3...
                                          └─ ... up to 7 providers for CNPJ

Every provider returns the same normalized schema. Your workflow doesn’t care which provider answered — the output is always consistent.

Power user features (v1.1.0)

  • Configurable Timeout — set 1s to 60s per node (with runtime clamping for safety)
  • Choose your provider — “Primary Provider” dropdown lets you pick which API to try first
  • Rate Limit Awareness — detects HTTP 429, skips to next provider, shows rate_limited: true in metadata
  • CNPJ Output Mode — Simplified (6 fields), Full (20+ fields), or AI Summary (8 flat English fields optimized for AI Agents)
  • AI Agent readyusableAsTool: true, works as a tool in n8n AI Agent workflows

AI Summary mode (for Agent workflows)

When you use Brasil Hub as an AI Agent tool, the AI Summary output gives your agent exactly what it needs:

{
  "cnpj": "00000000000191",
  "company": "BANCO DO BRASIL SA",
  "trade_name": "DIRECAO GERAL",
  "status": "ATIVA",
  "since": "1966-08-01",
  "size": "DEMAIS",
  "activity": "Bancos múltiplos (6422100)",
  "city": "BRASILIA/DF"
}

No nested objects, no Portuguese field names, no noise. Just what the agent needs to make decisions.

Quick comparison

Task Without Brasil Hub With Brasil Hub
Query CNPJ with fallback 7 HTTP Request nodes + IF/Switch for fallback + Code node to normalize 1 node, auto-fallback across 7 providers
Validate CNPJ/CPF/CEP Code node with checksum logic 1 node, built-in validation
Query CEP with fallback 4 HTTP Request nodes + error handling 1 node, 4 providers
List all Brazilian banks HTTP Request + Code node to parse 1 node, normalized output
Get FIPE vehicle price 4 sequential HTTP Requests (brand→model→year→price) 4 operations in the same node
Holiday calendar HTTP Request + Code node for date parsing 1 node, structured output
IBGE states + cities 2 HTTP Requests + normalization 1 node, 2 operations
NCM tax codes HTTP Request + Code node 1 node, query or search
All 9 resources ~20 HTTP Request nodes + ~10 Code nodes + error handling everywhere 1 node

Install

In n8n: Settings → Community Nodes → Install → n8n-nodes-brasil-hub

Use cases

  1. Lead enrichment — Get company data (CNPJ), validate address (CEP), check if CPF is valid
  2. Financial workflows — List all Brazilian banks, get COMPE codes
  3. Insurance/automotive — FIPE table prices for vehicle valuation
  4. Logistics — Validate addresses, get city/state from DDD area codes
  5. Government/compliance — NCM tax codes, public holiday calendars
  6. AI Agents — Let your agent look up any Brazilian public data as a tool

Workflow Templates

Try these ready-to-use workflows (search “Brasil Hub” in the n8n template gallery):

  • Enrich Leads with CNPJ Data — Read CNPJs from Google Sheets → validate → query company data → write enriched leads back
  • Validate Brazilian Addresses in Bulk — Read CEPs → validate format → query full address (street, city, state) → export
  • FIPE Vehicle Price Lookup — Webhook receives brand/model/year → returns FIPE table price (great for insurance quoting)

Stats

  • npm: n8n-nodes-brasil-hub
  • GitHub: luisbarcia/n8n-nodes-brasil-hub
  • 1,180 tests, 99%+ code coverage
  • npm provenance + build attestation
  • MIT license, zero runtime dependencies

I’d love your feedback! If you’re working with Brazilian data in n8n, give it a try and let me know what you think.

Links: