# Qualify mortgage leads and collect documents with Gemini: n8n workflow

> Started by someone submitting a form, and works across Gmail, Google Drive, Supabase and Telegram. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/qualify-mortgage-leads-and-collect-documents-with-gemini (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Lead generation](https://millionrounds.com/workflows?category=Lead+generation#library)

# Qualify mortgage leads and collect documents with Gemini

Started by someone submitting a form, and works across Gmail, Google Drive, Supabase and Telegram. It hands the judgement calls to Gemini. 24 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fqualify-mortgage-leads-and-collect-documents-with-gemini)

**24 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 2 Model 1 Logic 7 Service 14

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

- 1 **On form submission** Form trigger *Starts it*
- 2 **Upload portal trigger** Form trigger *Starts it*
- 3 **Normalize lead name** Code *Logic*
- 4 **Validate Input** If *Logic*
- 5 **Check income threshold** If *Logic*
- 6 **Upload ID1** Google Drive *Service*
- 7 **Send Validation Error** Telegram *Service*
- 8 **Request Email Approval1** Telegram *Service*
- 9 **Upload Payslip1** Google Drive *Service*
- 10 **Check approval response** If *Logic*
- 11 **Upload Bank Statement1** Google Drive *Service*
- 12 **Generate Personalized Email** Google Gemini *Model*
- 13 **Log declined lead** Supabase *Service*
- 14 **Evaluate upload results** Code *Logic*
- 15 **Create Drive Folder** Google Drive *Service*
- 16 **Check all uploads successful** If *Logic*
- 17 **Update upload error log** Supabase *Service*
- 18 **Share Drive Folder** Google Drive *Service*
- 19 **Send Success Notification** Telegram *Service*
- 20 **Send Partial Failure Notification** Telegram *Service*
- 21 **Create Gmail Draft** Gmail *Service*
- 22 **Send Email Created Confirmation** Telegram *Service*
- 23 **Aggregate Log Data** Code *Logic*
- 24 **Store in Database** Supabase *Service*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 24, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Supabase, Telegram
- **Model:** Gemini

## Questions

What does it need to run?

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

What starts it?

It starts on someone submitting a form.

Does it use AI?

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

How long does it take to set up?

Take your time. At 24 steps it is large: read it before trusting it with anything live.

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 24 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fqualify-mortgage-leads-and-collect-documents-with-gemini)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Supabase](https://millionrounds.com/workflows?service=Supabase#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also lead generation, with the same services where possible, closest in size first.

- [**Automate lead enrichment & personalized outreach with HubSpot** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-lead-enrichment-and-personalized-outreach-with-hubs)
- [**Digitize business cards with Thai OCR** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/digitize-business-cards-with-thai-ocr)
- [**Lead automation with OpenAI and Gmail** 24 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/lead-automation-with-openai-and-gmail)
- [**Qualify real estate leads and answer EMI queries with Telegram** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/qualify-real-estate-leads-and-answer-emi-queries-with-telegr)
- [**Score, route, and reply to inbound leads with OpenAI and Gmail** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/score-route-and-reply-to-inbound-leads-with-openai-and-gmail)
- [**Send daily AI competitor change digests with ScraperAPI** 24 steps · calls a model · Email, Gmail](https://millionrounds.com/workflow/send-daily-ai-competitor-change-digests-with-scraperapi)
