Automating finance is reducing repetitive tasks and increasing cash precision. With Open Finance, bank APIs, and tools like n8n and a CRM, you integrate statements, classify expenses, and schedule payments via Pix. In this article, we show, step by step, how to set up a simple, secure, and intelligent flow to control expenses and standardize daily routines, without errors.
Automation plan
Look: the idea is to stop firefighting and let the financial basics run on their own. Let's get practical, no fluff. Goal: capture data, classify, reconcile, and pay with minimal human touch — and measure each stage.
- Measurable goals: reduce manual tasks by 70%; reconciliation > 99% accuracy; daily closing in D+1; approval time < 4h; processing cost ≤ R$0.10/transaction.
- Financial inventory: bank accounts, corporate cards, digital wallets; cost centers; categories: fixed, variable, CAPEX/OPEX.
- Prerequisites: consents from Open Finance; access to ERP/spreadsheet; category naming policy (short, unique, and stable).
- Flow map: data input → classification → reconciliation → payments → reports/alerts.
- Checklist: map access; define 30–50 categories; create limits and authorities; configure 20 initial classification rules; run pilot with 30 days of data; weekly review routine (30 min).
- Lean RACI: create rules (R: FinOps; A: Owner/CFO; C: Accountant; I: Operations) • approve payments (R: Finance; A: Owner/CFO; C: Requesting area; I: Accountant) • monitor (R: FinOps; A: CFO; C: Auditor/accountant; I: Teams).
- Examples: micro services — 1 account + 1 card, 5 categories, rules by client CNPJ, taxes via scheduled Pix; e-commerce — gateway + marketplace, reconciliation by order/txid, receivables advance with ceiling rule.
- Start small: week 1 inventory/consents; week 2 10 rules; week 3 Pix/card reconciliation; week 4 payment pilot and alerts. That's it: run, measure, adjust, and scale.
Connect banks and wallets
Look: centralizing statements, balances, and transactions via Open Finance is an execution game. Start with secure consent of the client/company, with read scope and periodic renewal (up to 12 months, okay?). No “patchwork”: continuous and traceable sync.
- Step by step: choose a connector (e.g., Belvo, Pluggy) and activate only necessary scopes.
- Create API credentials of least privilege and configure webhooks for new transactions.
- Connect accounts and wallets via consent flow; import initial history (e.g., 90 days).
- Integrate to ERP/spreadsheet to sync statements in near real-time.
- Normalization: standardize descriptions, banks, dates, and currencies before saving.
- Register Pix and scheduled Pix with txid/e2eid to cross with collections and write-offs.
No fluff: validate collection before automating the reconciliation of the next chapter.
- Validation (30 days): compare daily balances by account; check reconciliations; treat divergences and duplicates (dedupe rule by bank+date+value+id).
- Metrics: sync latency (min), failures by bank (%), coverage rate of accounts (% active connected).
- Security: key rotation (e.g., 90 days), environment segregation, encryption at rest and in transit, monthly access review.
That's it. Clean data, webhooks stable and well-guarded Pix IDs. From there, let's reconcile and categorize without friction.
Reconcile and categorize
Look: with statements centralized, now it's time to automate classification and close the account without friction. Let's get practical, no fluff.
- Categorization rules: by description (“meta ads”, “uber”), by MCC (e.g., 7311 → Marketing; 7399 → Operational), by value (≤ R$50 → Operational petty), by payee (“City Hall” → Taxes), and by periodicity (same day/value every month → fixed; large variation → variable). Examples: “Description contains Meta and MCC 7311 → Marketing”; “Payee ‘Accountant’ and fixed monthly value → Taxes”.
- Automatic reconciliation: pair by value+date+Pix txid, with tolerance of ±1 day and cent rounding. Tie-breaker rule: prioritize txid; without txid, use value+payee.
- Exceptions: send 1–5% to manual review queue with 24h SLA and standardized reasons (duplicate, R$0.01–0.05 divergence, holiday date).
- Budgets: limit by category/cost center; trigger alerts when reaching 80% and 100%. Block new expenses of Marketing above ceiling without approval.
- Reports: simplified managerial P&L (Revenue – Costs – Expenses) and weekly/monthly variations by tag (Marketing, Operational, Taxes).
- Quality: classification precision (>95%), average time until reconciliation (< 24h), pending items per day.
- Anti-error mini-playbook: adjust rule and reprocess in batch; create “synonym list” of payees; treat cents with ranges; mark recurring as fixed; audit 5% random/week; document exceptions and promote rule when it repeats 3x.
That's it: fewer clicks, more reliable closing. Let's go.
Collections and scheduled Pix
Let's get practical: automate input and output, without friction. Collections via Pix/boletos come in; recurring go out with scheduled Pix and simple approval. Integrate with CRM/ERP, no spreadsheet, okay?
- Collections via Pix (dynamic QR, copy and paste) and boleto: automatic generation, sending, and resending with defined validity/interest.
- scheduled Pix for rent/SaaS: monthly schedule and double approval (app + email/SMS) by finance.
- Automatic write-off: pair by txid/e2eid and update ERP/spreadsheet in seconds.
- Kommo CRM: financial pipeline, WhatsApp templates, 9am–6pm windows, and T-3, T+1, T+7 contact schedule.
- Metrics: DSO, delinquency, and average receipt time by wallet/client.
- Best practices: cordial language, clear renegotiation, and automatic confirmation.
- Example 1: Hi, {name}! Invoice {no} {value} is due today. Pix copy and paste: {code}. If already paid, reply “paid”.
- Example 2: T-3 Reminder: due in 3 days. Want the updated boleto?
- Pause if it falls on weekend/holiday (local/national); reschedule to next business day at 9am.
- If there is an open negotiation in CRM, pause 72h and resume with summary of what was agreed.
- After 3 attempts without response, reduce frequency and alternate channel (email).
n8n, CRM, and monitoring
Look: n8n orchestrates financial routines without drama and lets the CRM (Kommo) show what matters, okay? Let's get practical, no fluff.
- Key flows: transaction arrived (webhook) → classify → reconcile → mark invoice paid → notify client in CRM.
- Nodes typical: Webhook, IF, Function, HTTP Request, Cron, and integrations with ERP, connector of Open Finance and Kommo.
- Hosting on VPS: daily backup, centralized logs, retries, queues, and DLQ; up to ~100k exec/month = simple plan; mission critical/high volume = advanced with dedicated queues.
- Security: secret tokens, IP allowlist, key rotation, principle of least privilege.
- Observability: failure alerts, execution time, cost per transaction, rule change audit.
- Scaling and testing: canary (5–10%), dev/stage/prod environments, quick rollback by version.
Flow example (pseudo-steps):
- Webhook receives transaction from Open Finance.
- IF validates value, status, duplicate, and source.
- Function classifies by product/cost center.
- HTTP Request reconciles in ERP and registers write-off.
- HTTP Request updates Kommo (deal, task, note) and marks invoice paid.
- IF opt-in: triggers WhatsApp via Kommo with receipt.
- Records metrics and sends event to DLQ if it fails.
Go-live checklist:
- Variables and tokens rotated and protected.
- Retries, queue, and DLQ configured by flow.
- Failure/latency alerts and SLA defined.
- Backup and restoration tested.
- Canary active and 1-click rollback.
- Change audit enabled and reviewed.
Conclusion
You saw how to design the flow, connect banks with Open Finance, reconcile and categorize expenses, automate collections and payments via Pix and orchestrate everything in n8n and CRM. Start small, measure results, and evolve the rules. This way, expense control becomes predictable, auditable, and scalable, freeing up time for strategic decisions and growth, with fewer errors and more financial visibility.