ReceitaWS
Analytics & DataReceitaWS returns Brazilian company registration data for a CNPJ straight from the Receita Federal. Agents validate a CNPJ and pull the registered name, address, activities, partners and status, with an optional freshness limit on cached results.
What This Integration Enables
ReceitaWS is the smallest connector in this catalog that still changes how a finance team works, and its two operations are the whole point. One is a free lookup against the Receita Federal that may hand back a cached copy of unknown age. The other takes an argument that no other register API in this catalog exposes: how stale a copy you are willing to accept. Set it to zero and you force a live query. Set it higher and you get a fast, cheap answer. Freshness stops being a property of the API and becomes a decision the workflow makes, one call at a time.
That matters because Brazilian registration data is not static. A company's status moves, its partners change, its address changes, and the CNAE activity codes on the register are what a tax determination often turns on. FlowRunner agents can afford to check on every document rather than once at onboarding, because the cheap route costs nothing per call. When the cheap answer looks wrong, the agent spends a live query to be sure, and then stops, because deciding what to do about a supplier whose registration has moved is not a lookup.
Without FlowRunner
With FlowRunner
Use Case Scenarios
-
The CNPJ on the invoice is checked before the invoice is
An invoice lands in the AP inbox and an extraction step pulls the CNPJ. The agent calls Get Company, reads back the legal name, trading name, registration status, address, and the primary and secondary CNAE codes, and compares them against the vendor record in NetSuite or Odoo. A clean match routes the invoice onward. A name that does not match, or an address that has moved, becomes an exception carrying both records rather than a blocked queue with no explanation. Nothing about this is a new process. It is the same check a careful AP clerk does, running on every document instead of on the ones somebody happened to doubt.
-
A vendor master sweep that is honest about its own age
On a schedule, the agent walks the active vendor list and calls Get Company for each CNPJ. Because the free route is rate limited per IP address and may serve a cached copy, the sweep is treated as a screen rather than as evidence: it produces a shortlist of records that appear to have changed. Only that shortlist goes through Get Company With Max Age at Maximum Age 0, which spends from the account allowance to get a live answer from the Receita Federal. The result is a monthly hygiene pass on the whole vendor file at a fraction of the cost of querying it live, with the expensive calls aimed only at the rows that earned them.
-
Onboarding that refuses to invent a supplier
A new supplier submits a form. The agent normalizes the CNPJ, calls Get Company, and finds a response that is shaped like a record but carries an error status, which is how ReceitaWS reports both an invalid number and one that is simply not on the register. Rather than creating a vendor with a blank legal name, the agent sends the submitter back a specific message naming the field. If the number resolves but the registered name differs materially from what was typed on the form, the agent gathers both, attaches the register address, and posts the pair to the buyer in Slack with a single question about which one is the real counterparty.
Human-in-Loop Highlight
Putting a supplier on payment hold stops real money reaching a real business, and it is the kind of act that gets reversed slowly and apologetically. So when a sweep finds a vendor whose registration status is no longer active, the agent does not act on it. It first spends a live query with Get Company With Max Age at Maximum Age 0, because the free route may have handed it a cached record and a stale status is a bad reason to freeze a payment. Then it stops and asks: "Vendor 41.234.567/0001-89, Comercial Sul Ltda, has open invoices totaling R$ 84,000. The Receita Federal record now shows status BAIXADA, dated 12 March, confirmed by a live query. A status change can be a filing lapse rather than a closure. Hold payment, request documents, or continue?" The buyer answers. FlowRunner's human-in-the-loop step is what keeps a register lookup from turning into a unilateral decision about somebody's cash flow.
Agent Capabilities
2 actionsCompany Lookup
2- Get Company Looks up a Brazilian company by CNPJ and returns its Receita Federal registration record: legal and trading name, status and status date, incorporation date, legal nature, size, share capital, address, contact details, the primary and secondary CNAE activity codes, and the registered partners. This is the free route, rate limited per IP address, and it may serve a cached copy. Use it for screening sweeps and for the first check on an inbound document.
- Get Company With Max Age Looks up a company by CNPJ while stating how old a cached copy the workflow will accept. ReceitaWS serves cached data when it is younger than Maximum Age and queries the Receita Federal afresh when it is not, so zero forces a live answer and a larger number is faster and cheaper. This route requires an API token and each fresh query draws on the account allowance, which makes it the call to aim at the records that already look wrong.
Frequently Asked Questions
What can FlowRunner do with ReceitaWS?
FlowRunner agents can run Get Company and Get Company With Max Age in ReceitaWS.
Does connecting ReceitaWS to FlowRunner require OAuth?
No. ReceitaWS connects to FlowRunner with an API key, no OAuth flow required.
Can ReceitaWS trigger a FlowRunner workflow automatically?
ReceitaWS doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.
Start building with ReceitaWS
Free plan, no card required. Connect in minutes.