{"product_id":"bank-to-ledger-matching-workflow-openai-embeddings-slack-postgres","title":"Bank-to-Ledger Matching Workflow: OpenAI Embeddings, Slack, Postgres","description":"\u003ch3\u003eBank-to-Ledger Matching with OpenAI Embeddings + Slack Human Approval\u003c\/h3\u003e\n\u003cp\u003eAutomatically match bank transactions to ledger entries using fuzzy scoring and optional OpenAI-compatible embeddings—then route ambiguous cases to \u003cstrong\u003eSlack\u003c\/strong\u003e for HMAC-signed, expiring human approval. Results, review queues, and embedding cache are stored in \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e as the workflow runs.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers:\u003c\/strong\u003e Run manually, on a \u003cstrong\u003e4-hour schedule\u003c\/strong\u003e, or via a \u003cstrong\u003ePOST webhook\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eState + security:\u003c\/strong\u003e Loads prior matching state and an approval secret from \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetch \u0026amp; normalize:\u003c\/strong\u003e Pulls two record sets from configured \u003cstrong\u003eHTTP APIs\u003c\/strong\u003e, normalizes and de-duplicates them, and stops if either source fails.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCandidate pairing:\u003c\/strong\u003e Builds candidate pairs using \u003cstrong\u003eamount\/date blocking\u003c\/strong\u003e, then computes fuzzy similarity features across amount, date, counterparty, description, references, and learned aliases.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptional embeddings:\u003c\/strong\u003e Loads cached vectors from \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e and calls an \u003cstrong\u003eOpenAI-compatible embeddings endpoint\u003c\/strong\u003e only for missing texts. Semantic similarity is fused into the text score without overriding numeric mismatches.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOne-to-one matching:\u003c\/strong\u003e Automatically matches only high-confidence, non-ambiguous pairs; creates a \u003cstrong\u003ereview queue\u003c\/strong\u003e for the rest with top candidates and reasons.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSlack approval:\u003c\/strong\u003e Saves run summaries, auto-matches, review items, and any new embedding vectors to \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e, then posts review requests to \u003cstrong\u003eSlack\u003c\/strong\u003e with \u003cstrong\u003eHMAC-signed, expiring approval links\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eDecision handling:\u003c\/strong\u003e Serves a GET review page and a POST decision endpoint to apply reviewer approval\/rejection in \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e and update learned aliases.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eReduce manual reconciliation by linking bank transactions to ledger entries with a confidence-based review loop.\u003c\/li\u003e\n  \u003cli\u003eImprove matching quality over time using learned aliases and cached embeddings.\u003c\/li\u003e\n  \u003cli\u003eOperationalize human-in-the-loop approvals for ambiguous matches in Slack.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e \u003cstrong\u003eSlack\u003c\/strong\u003e, \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e, configurable \u003cstrong\u003eHTTP APIs\u003c\/strong\u003e, and an \u003cstrong\u003eOpenAI-compatible embeddings\u003c\/strong\u003e endpoint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes used:\u003c\/strong\u003e if, code, no op, merge, webhook, postgres.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46326518710451,"sku":"N8N-21843","price":3.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/4NmDSxDRvMbG-8zrpyA3C_ibSo6IzD.png?v=1793351034","url":"https:\/\/buyflowscripts.com\/products\/bank-to-ledger-matching-workflow-openai-embeddings-slack-postgres","provider":"N8N Commerce","version":"1.0","type":"link"}