Automation library · Chat assistants

Score mortgage loan risk from Google Drive PDFs with OpenAI

Started by an event in a connected app, and works across Gmail, Google Drive and Slack. It hands the judgement calls to OpenAI. 20 steps: a working afternoon to understand properly.

MediumCalls a model: OpenAI

20 stepsMedium: a working afternoon
0Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 2Model 11Logic 1Service 6

The steps in the order they run, from what starts it.

  1. 1Watch Loan Applications FolderGoogle Drive triggerStarts it
  2. 2GPT-4o-mini: Data ExtractionLm Chat Open AiModel
  3. 3Parse Applicant Data SchemaOutput Parser StructuredModel
  4. 4GPT-4o-mini: Risk ScoringLm Chat Open AiModel
  5. 5Parse Risk Score SchemaOutput Parser StructuredModel
  6. 6GPT-4o-mini: Lending SummaryLm Chat Open AiModel
  7. 7GPT-4o-mini: Final DecisionLm Chat Open AiModel
  8. 8Parse Decision SchemaOutput Parser StructuredModel
  9. 9On Workflow ErrorError triggerStarts it
  10. 10Download Application PDFGoogle DriveService
  11. 11Extract Applicant Data (AI)AgentModel
  12. 12Score Applicant Risk (AI)AgentModel
  13. 13Generate Lending Summary (AI)AgentModel
  14. 14Issue Underwriting Decision (AI)AgentModel
  15. 15Slack: Error AlertSlackService
  16. 16Extract PDF TextExtract From FileService
  17. 17Slack Alert: Extraction FailedSlackService
  18. 18Slack Alert: Risk Scoring FailedSlackService
  19. 19Assemble Final ReportCodeLogic
  20. 20Email Report to Loan OfficerGmailService

How it's built

Starts on
An event in a connected app
Steps
20
Size
Medium: a working afternoon
Connects to
Gmail, Google Drive, Slack
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive and Slack accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 20 steps before you point it at anything that matters.