Library / Finance, Invoices & Accounting
Finance, Invoices & Accounting
Reconcile bank payments to invoices and ERP using Postgres and Claude
When an API call/webhook arrives, it processes financial data with Claude using Postgres, Slack.
What it does
## Intelligent Payment Reconciliation Engine Matches bank transactions against open invoices and ERP cash-application records using a layered rules engine, escalates borderline cases to Claude for review, writes every decision to Postgres, and optionally posts confirmed matches back to the ERP. Re-runnable and idempotent: matches are keyed by bank transaction id, human-approved rows are never overwritten, and already-reconciled items are skipped on the next run. ### How it works - Pulls invoices, bank transactions and ERP payments in parallel. - Scores each candidate on reference, amount (exact / tolerance), fuzzy customer name and payment timing. - Handles multi-invoice payments, partial/over-payments, duplicates and ERP conflicts. - Score ≥ 0.90 auto-matches; 0.55–0.90 goes to AI + human review; below is unmatched. - Borderline cases are reviewed by Claude with strict guard rails. - Results are written atomically to Postgres; optional ERP write-back for auto-matches. - Slack alert only when something needs attention. ### Setup 1. Attach a Postgres credential to the three Postgres nodes. 2. Edit the CONFIG object inside Code - Load Config & Rules (source URLs, tokens, field maps, matching thresholds, AI key, Slack webhook). 3. Keep erpWriteBack.enabled = false for the first dry runs. 4. Source APIs are read with a single page (limit 1000). Narrow lookbackDays or add pagination for larger volumes. ### Customization tips - Tune scoring weights, autoMatchScore, reviewScore and amount tolerances. - Disable AI (ai.enabled: false) or change the model. - Adjust legal-suffix list and high-value threshold for exceptions.
The steps
- Webhook Trigger
- Schedule Trigger
- Manual Trigger
- Postgres - Ensure Tables
- Postgres - Load Reconciled IDs
- Code - Load Config & Rules
- HTTP - Fetch Invoices
- HTTP - Fetch Bank Transactions
- HTTP - Fetch ERP Payments
- Code - Normalize Invoices
- Code - Normalize Bank Transactions
- Code - Normalize ERP Payments
- Merge - Combine Sources
- Code - Combine & Check Sources
33 steps in total.
Similar automations
Finance, Invoices & AccountingReconcile Rent Payments with an Excel Sheet and OpenAI11 stepsFinance, Invoices & AccountingReconcile Rent Payments from Bank Statements with OpenAI11 stepsRAG & Knowledge BasesForward Bank SMS Alerts to Telegram with Claude RAG11 stepsData Sync & ETLMatch bank transactions to ledger entries with OpenAI embeddings, Slack, and Postgres41 steps