Skip to content
OQuark

Platform: n8n · Made by OQuark

Incoming NF-e and boleto check

Reads the NF-e (XML) and boleto (PDF) suppliers email you, checks access key, CNPJ, authorization, totals, boleto check digits and whether the payee is the supplier, and logs everything in a sheet.

Checks are fixed rules, no AI: check digits of the access key, CNPJ and boleto line, invoice addressed to your CNPJ, SEFAZ authorization protocol, items and installments adding up, boleto amount and due date against the NF-e in the same email, and the supplier's CNPJ on the boleto (the simplest defense against swapped-boleto fraud). The AI only suggests the expense category from your chart of accounts. Any mismatch alerts your finance team.

What's in the package

  • n8n workflow (workflow.n8n.json) with XML and PDF reading, check-digit validation and invoice × boleto matching
  • Category prompt in PT and EN with the JSON response schema
  • Sample NF-e and boleto (fictitious, valid check digits) and the expected result
  • README with sheet template, limits and what to check by hand

Files:

  • README.md
  • prompt.md
  • workflow.n8n.json
  • examples/nfe.xml
  • examples/boleto.txt
  • examples/output.json

What you need

  • n8n (Cloud or self-hosted, version 1.80 or newer)
  • Gmail inbox that receives the invoices, with an OAuth credential in n8n
  • Google Sheet with NF-e and Boletos tabs (template in the README)
  • Anthropic or OpenAI API key (category only; cents per month)

Works with

See the Productivity ranking

Templates are OQuark products and are kept apart from the ranking: selling a template never changes a tool's position, and the tools named here did not pay to appear.