workflows.fit
Back to n8n workflows
n8n templateFreeBy Vinay Gangidi

Automate loan document analysis with Mistral OCR and GPT for underwriting decisions

LOB Underwriting with AI This template ingests borrower documents from OneDrive, extracts text with OCR, classifies each file (ID, paystub, bank statement, utilities, tax forms, etc.), aggregates everything per borrow...

Data & StorageDevelopmentCore NodesAILangchainUtilityMicrosoft One DriveMistral Ai
Loading interactive preview...

Template notes

LOB Underwriting with AI

This template ingests borrower documents from OneDrive, extracts text with OCR, classifies each file (ID, paystub, bank statement, utilities, tax forms, etc.), aggregates everything per borrower, and asks an LLM to produce a clear underwriting summary and decision (plus next steps).

Good to know

1. AI and OCR usage consume credits (OpenAI + your OCR provider). 2. Folder lookups by name can be ambiguous—use a fixed folderId in production. 3. Scanned image quality drives OCR accuracy; bad scans yield weak text. 4. This flow handles PII—mask sensitive data in logs and control access. 5. Start small: batch size and pagination keep costs/memory sane.

How it works

1. Import & locate docs: Manual trigger kicks off a OneDrive folder search (e.g., “LOBs”) and lists files inside. 2. Per-file loop: Download each file → run OCR → classify the document type using filename + extracted text. 3. Aggregate: Combine per-file results into a borrower payload (make BorrowerName dynamic). 4. LLM analysis: Feed the payload to an AI Agent (OpenAI model) to extract underwriting-relevant facts and produce a decision + next steps. 5. Output: Return a human-readable summary (and optionally structured JSON for systems).

How to use

1. Start with the Manual Trigger to validate end-to-end on a tiny test folder. 2. Once stable, swap in a Schedule/Cron or Webhook trigger. 3. Review the generated underwriting summary; handle only flagged exceptions (unknown/unreadable docs, low confidence).