Templates / Qualify and route client leads with OpenAI, Supabase, and Gmail

Qualify and route client leads with OpenAI, Supabase, and Gmail

Ready for 3.0

by Muhammad Bilal ✓ · 8 views · created 2026-08-27 · Lead Generation, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 29 nodes and runs when someone submits an n8n form (“AI Agency — Client Project Intake”). Along the way it connects Supabase, OpenAI and Gmail.

How it runs

Trigger: When someone submits an n8n form (“AI Agency — Client Project Intake”).

  1. Normalize Client Data (Edit Fields (Set)): sets 10 fields: full_name, email, company_name…
  2. Validate Required Information (If): checks a condition and branches into true / false
  3. Create Lead in Supabase (Supabase): uses Supabase
  4. Build Validation Issues List (Code): runs custom JavaScript code
  5. AI Requirement Analyzer (OpenAI): uses OpenAI
  6. Generate Clarification Email (Edit Fields (Set)): sets 3 fields: email_subject, email_body, lead_status
  7. Structure AI Analysis (Code): runs custom JavaScript code
  8. Send Clarification Email (Gmail): uses Gmail
  9. Calculate Qualification Score (Code): runs custom JavaScript code
  10. Qualification Router (Switch): routes items into 3 branches

…plus 18 more steps. See the full node list below.

Services it uses

SupabaseOpenAIGmail

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

Quick overview This workflow captures client requests via an n8n Form, validates and stores leads in Supabase, uses OpenAI to generate a structured requirements analysis, then calculates a rule-based qualification score and sends the appropriate client and…

Excerpt from Muhammad Bilal's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.