Automation library · Lead generation

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.

LargeCalls a model: Gemini

24 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 2Model 1Logic 7Service 14

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

  1. 1On form submissionForm triggerStarts it
  2. 2Upload portal triggerForm triggerStarts it
  3. 3Normalize lead nameCodeLogic
  4. 4Validate InputIfLogic
  5. 5Check income thresholdIfLogic
  6. 6Upload ID1Google DriveService
  7. 7Send Validation ErrorTelegramService
  8. 8Request Email Approval1TelegramService
  9. 9Upload Payslip1Google DriveService
  10. 10Check approval responseIfLogic
  11. 11Upload Bank Statement1Google DriveService
  12. 12Generate Personalized EmailGoogle GeminiModel
  13. 13Log declined leadSupabaseService
  14. 14Evaluate upload resultsCodeLogic
  15. 15Create Drive FolderGoogle DriveService
  16. 16Check all uploads successfulIfLogic
  17. 17Update upload error logSupabaseService
  18. 18Share Drive FolderGoogle DriveService
  19. 19Send Success NotificationTelegramService
  20. 20Send Partial Failure NotificationTelegramService
  21. 21Create Gmail DraftGmailService
  22. 22Send Email Created ConfirmationTelegramService
  23. 23Aggregate Log DataCodeLogic
  24. 24Store in DatabaseSupabaseService

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.