Skip to main content
Back to Experience

A hands-off loan-enquiry intake for a commercial lender. n8n listens to the inbox, a NestJS service reads the email with an LLM, and a fully associated deal lands in HubSpot.

Role
Systems and automation design
Platform
HubSpot Sales Hub Enterprise
Stack
n8n, NestJS with Fastify, an LLM

Anonymised case study. CRM automation and systems design.

Every enquiry arrived as free-form prose with PDFs attached, and someone re-typed all of it into HubSpot. The brief was to remove that step without removing anyone's ability to see what happened.

Trigger
One inbound broker email
Output
Linked deal, company, contacts, securities and more
Enrichment
Google Geocoding and Cotality (CoreLogic AU)
Guarantee
Partial failure never aborts the run

Select a step to see what it does, what it is built on and how it fails safely.

9 steps, in order

  1. step 1 of 9

    The inbox is the front door

    A trigger watches for new mail and filters on subject: loan, mortgage, enquiry, application. Matching mail is re-fetched in full so raw MIME and every payload part survive.

    Where
    Gmail trigger in n8n
    Component
    n8n
    Output
    Full email, attachments included
    subject ~ /loan|mortgage|enquiry|application/i
    → Get Full Email · raw MIME
    • Loan enquiryContinues to enrichment
    • Anything elseSkipped, logged, no writes
    • Rate matrixDerives LVR and max loan
    • Product line itemCore, Core Plus, Dynamic or XL
    • File numberNumbered, SharePoint folder built

Every line on the settlement checklist is worked backwards to the stage where it must first be green. A file can only leave a stage when that stage's lines are green, not applicable or waived by a senior approver. The gates are the HubSpot pipeline stages.

  • Being worked onThe line is checked from here, but open is fine. The file keeps moving.
  • Must be green to leaveThe gate. The file can't move to the next stage until this line is green.
  • Must stay greenEvery line re-runs on each new piece of information. If a passed line turns red, the file stops.
  • Stops if redA red here stops the file and goes to a senior approver at any stage, even before the line is due.

  • Lines switch on

    Many lines only apply when a fact is found: an older guarantor, a trust, a lease, a registration to release. The system switches the line on the moment it reads the fact, at any stage.

  • Catch-up

    If a line switches on after its gate has passed, it is due now. The file can't move forward until it is green.

  • Terms versus conditions

    New work such as advice, releases, leases or insurance is a new line, not a new approval. Only a change to the terms needs the approval updated: product or lender, amount, rates, fees, term, securities, borrower or guarantors.

  • One reissue at most

    Term changes are collected through valuation and due diligence and credit review. One updated approval goes out at the credit review gate, only if a term changed. After loan documents, a term change goes to a senior approver.

Three examples

4 steps, in order

  1. step 1 of 4

    A fact is found

    A guarantor's age is read from their identity documents.

    Where
    At loan documents
    Stage
    Loan documents

  • n8n orchestrates, NestJS decides

    Keeping the logic in a typed service, not in workflow nodes, made extraction, enrichment and CRM writes testable and reviewable in code.

  • One extraction call, one schema

    Everything the CRM needs comes back in a single structured object, so cost, latency and failure modes stay predictable per email.

  • Custom objects for the lending story

    Securities, encumbrances and trusts are first-class records instead of deal fields, so multi-property enquiries model correctly from day one.

  • Automation that stays inspectable

    Skips, unmatched addresses and failed creates all surface in the response. The team trusts the pipeline because they can see where it stopped.

CRM automation

Have a process worth automating?

If a human is still re-typing something a system could read, we have built the pipeline that stops that: end to end, auditable and built to fail safely.

What are you looking for?
Messages are reviewed personally. We typically reply within 1–2 business days.
2
IdeaScopeShipped