Skip to content

8.2: Building an Automated Lead Qualification System ​

Ever wish your leads would qualify themselves? You're about to build a system that does exactly that. From the moment someone fills out your form to the moment your sales team receives a perfectly qualified, enriched lead with a personalized email ready to sendβ€”all happening automatically in seconds.

This isn't science fiction. Companies are using systems like this right now to respond to leads faster than their competitors, assign leads to the right people every time, and never let a hot prospect grow cold. And you're about to build one yourself.


What We're Building ​

Picture this automated workflow running 24/7:

  1. Someone fills out your website form
  2. System creates a new lead automatically
  3. Looks up their company data (size, industry, revenue)
  4. AI analyzes everything and assigns a quality score (0-100)
  5. Routes automatically to the right salesperson based on score
  6. AI writes a personalized outreach email mentioning their company
  7. High-value leads (score > 80) wait for your review
  8. Everything else sends automatically

The result? No leads slip through cracks. Right rep, every time. Response within minutes, not hours or days.

Lead Enrichment Pipeline Flow

1

Email Validation

Free β€’ Always runs

8,000 valid 2,000 invalid
2

Basic Info (Free API)

Condition: email_valid = true

7,000 enriched 1,000 failed
3

Lead Scoring

Custom logic β€’ Free

Score > 70: 2,000Score < 70: 5,000
πŸ’° Quality Gate
4

Premium Enrichment

$5/call

Condition: lead_score > 70

Only 2,000 calls

80% of leads skipped

$10,000

$50,000

Monthly Cost Savings

$40,000

80% reduction by using conditions

πŸ’‘ What You'll Learn

By the end of this section, you'll have:

  • βœ… Automated lead capture from web forms
  • βœ… Company data enrichment for every lead
  • βœ… AI-powered lead scoring (0-100 scale)
  • βœ… Smart assignment rules by score
  • βœ… Personalized AI-written outreach emails
  • βœ… Conditional approval for high-value leads

Time to complete: 45-60 minutes


8.2.1: Create Your Leads Table ​

Every lead needs a home. Let's create your lead management hub.

Let's do it:

  1. Click "+ Create New Table" in your dashboard
  2. Name it: "Leads"
  3. Add description: "Inbound leads with automatic qualification and routing"
  4. Click "Create Table"

Create New Table

Set up your workspace

Each row in this table will represent one customer conversation.

What just happened? You created your lead command center. Each row will be one potential customerβ€”from the moment they express interest until they're in your CRM as a qualified opportunity.

πŸ’‘ πŸ’‘ Think of It Like This

Your Leads table is like a smart assembly line for prospects. Raw leads come in one end, and perfectly qualified, enriched leads with personalized outreach come out the other endβ€”all automatically.

It's like having a tireless team working 24/7 to make sure every lead gets the attention it deserves.


8.2.2: Connect Your Web Form ​

Time to catch those leads! We'll connect a web form so every submission automatically creates a row in your table.

Here's how:

  1. Click "Add Trigger" button in the toolbar
  2. Search for your form platform:
    • Typeform - Popular for beautiful forms
    • Google Forms - Free and simple
    • Webhook - Works with any form
  3. Select your form platform
  4. The configuration sidebar opens

Add Trigger

Choose a service to automatically create rows when events occur

Categories

For Typeform:

  • Click "Connect Account"
  • Authorize Uniki to access your Typeform
  • Select which form to monitor
  • Column to store data: Create new column form_data

For Google Forms:

  • Similar processβ€”connect your Google account
  • Choose your form from the list
  • Data goes into form_data column

For any other form (Webhook method):

  • Your trigger configuration shows a unique webhook URL
  • Copy this URL
  • In your form builder, find "Webhook" or "Integration" settings
  • Paste the webhook URL
  • Test it by submitting your form

πŸ’‘ ⚠️ Test Your Connection

Always test immediately! Submit a test entry to your form. Within seconds, you should see a new row appear in your Leads table with the form data.

If nothing appears, double-check:

  • Trigger is enabled (toggle should be ON)
  • Webhook URL copied correctly
  • Form settings saved

8.2.3: Extract Form Fields ​

Right now, all form data is bundled in one column. Let's pull out the useful pieces: name, email, company, etc.

Let's extract the data:

Step 1: Extract Email ​

  1. Click "+ Add Column"
  2. Choose "Custom Code" type
  3. Name it: email
  4. Label: "Email Address"
  5. Set dependency: Wait for form_data to be filled
  6. Use this code:
groovy
return form_data.email

πŸ’‘ πŸ’‘ What's Happening?

The form_data column contains everything from the form. We're just grabbing the email field. Adjust the field name (email) to match whatever your form calls itβ€”might be email_address, Email, etc.

Step 2: Extract Name and Company ​

Repeat the same process:

Name column:

  • Name: contact_name
  • Label: "Contact Name"
  • Depends on: form_data
  • Code: return form_data.name (or form_data.full_name)

Company column:

  • Name: company_name
  • Label: "Company"
  • Depends on: form_data
  • Code: return form_data.company

Test it: Submit another test form entry and watch the columns populate automatically!


8.2.4: Enrich with Company Data ​

Now the magic begins! Let's automatically look up company information for every lead.

Here's how:

  1. Click "+ Add Column"
  2. Search for "Company Enrichment" or browse Data Enrichment category
  3. Select the enrichment service (depends on what you're usingβ€”Clearbit, Apollo, etc.)
  4. Configuration:
πŸ”

Configure Clearbit Enrichment

Basic Settings

Integration Settings

Select which operation to perform

Data from: [Email Address]

πŸ’‘ The system automatically inserts data from the Email Address column

Run Configuration

Run once when the email address is available

Depends on: Email Address

This column will run once the Email Address column has data

Maximum 100 enrichments per hour (respects API limits)

Configuration details:

  • Column Name: company_data
  • Label: "Company Info"
  • Input: Use the email or company_name column
  • Depends on: Wait for email to be filled
  • What to enrich: Company size, industry, revenue, location
  • API Key: Enter your enrichment service API key

πŸ’‘ πŸ’‘ Enrichment Services

Popular options:

  • Clearbit: Great data, premium pricing
  • Apollo.io: Good for B2B, has free tier
  • Hunter.io: Good for contact verification
  • Or use Webhook: Connect to your own company database

Most services offer free trials or limited free tiers to get started!

What you'll get: For each lead, the system automatically looks up and fills in company size, industry, revenue, employee count, and more. All the context your sales team needs!


8.2.5: AI Scoring for Lead Quality ​

Time to let AI analyze which leads are worth your time. We'll score every lead from 0-100 based on how good a fit they are.

Here's how:

  1. Click "+ Add Column"
  2. Choose "AI Assistant" (in the AI category)
  3. Name it: lead_score
  4. Label: "Lead Score"
  5. Output Type: Number
  6. Set dependencies: Wait for company_data and email to be filled

AI Instructions:

Analyze this lead and assign a quality score from 0-100.

Consider:
- Company size (larger = higher score)
- Industry fit (are they in our target industries?)
- Job title (are they a decision maker?)
- Email domain (corporate email vs. free email providers)

Return ONLY a number between 0 and 100.

Examples:
- Fortune 500 VP with corporate email: 95
- Small business owner in target industry: 70
- Student with Gmail: 20

Configure AI Assistant

Set up how your AI will respond

Customer Question(customer_message)

AI will wait until the customer asks a question before responding

πŸ’‘ Tip: Be specific about tone, style, and what information to include

Ready to generate AI responses!

When a customer asks a question, your AI will automatically generate a helpful answer.

πŸ’‘ 🎯 Customize Your Scoring

Adjust the scoring criteria for YOUR business:

  • B2B SaaS? Prioritize company size and industry
  • E-commerce? Focus on purchase intent signals
  • Services? Weight location and urgency higher

The AI will learn your preferences from the instructions you give it!


8.2.6: Smart Assignment Rules ​

Now let's route leads to the right salesperson based on their score. High-value leads go to senior reps, mid-range to regular sales, and low-scores to marketing for nurturing.

Here's how:

  1. Click "+ Add Column"
  2. Choose "Custom Code" type
  3. Name it: assigned_to
  4. Label: "Assigned To"
  5. Depends on: lead_score
  6. Code:
groovy
// Assignment rules based on score
if (lead_score > 80) {
  return "Mike Chen (Senior Sales)"
} else if (lead_score >= 50) {
  return "Lisa Wang (Sales)"
} else {
  return "Marketing Team (Nurture)"
}

πŸ’‘ πŸ’‘ Customize This!

Replace the names with your actual team members. You can make this as sophisticated as you want:

  • Round-robin assignment within each tier
  • Geographic assignment based on company location
  • Industry-specific assignment
  • Workload balancing

Start simple, then enhance as needed!

Test it: Check your table. Leads should now show who they're assigned to based on their score!

Leads Dashboard

ContactCompanyScoreAssigned ToStatus
Sarah Johnson
VP of Marketing
Acme Corp
500 employees
92
High
Mike Chen (Senior Sales) βœ“ Email Sent
David Martinez
CEO
TechStart Inc
1,200 employees
67
Medium
Lisa Wang (Sales) ⟳ Processing
Emma Wilson
Marketing Manager
Small Biz Co
12 employees
34
Low
Marketing (Nurture) β—‹ Queued
Showing 3 of 47 leads from todayAverage score: 68 | Avg response time: 3 minutes

8.2.7: Personalized AI Outreach ​

Let's have AI write a custom outreach email for each lead that mentions their company, industry, and pain points. This isn't a templateβ€”every email is unique.

Here's how:

  1. Click "+ Add Column"
  2. Choose "AI Assistant"
  3. Name it: outreach_email
  4. Label: "Personalized Email"
  5. Output Type: Text
  6. Depends on: contact_name, company_data, lead_score

AI Instructions:

Write a personalized outreach email to this lead.

Lead info:
- Name: [contact_name]
- Company: [company_name]
- Industry: [company_data.industry]
- Company size: [company_data.employee_count]
- Score: [lead_score]

Instructions:
- Keep it friendly and conversational, not salesy
- Mention their company name and industry specifically
- Reference a pain point relevant to their industry
- Be concise (3-4 short paragraphs)
- Include a clear call to action
- Sign it from [assigned_to]

DO NOT use a generic template. Make this feel personal and relevant to THEIR company and situation.

πŸ’‘ 🎨 See the Magic

The AI will write something like:

"Hi Sarah,

I noticed Acme Corp is in the manufacturing industry with around 500 employees. Companies your size often struggle with coordinating multiple systems and teamsβ€”it can feel like everyone's working in silos.

We help manufacturing companies like yours break down those silos with automated workflows that connect your systems. Teams get the information they need exactly when they need it.

Would you be open to a 15-minute conversation about how this might work for Acme Corp?

Best, Mike Chen"

Every email is unique, mentioning their specific company and industry!


8.2.8: Add Approval for High-Value Leads ​

For your best leads (score > 80), you probably want to review the email before it sends. Let's add a human review stepβ€”but ONLY for high-value leads.

Step 1: Add Approval Column

  1. Click "+ Add Column"
  2. Choose "Manual" type
  3. Name it: approved_to_send
  4. Label: "Ready to Send?"
  5. Add a condition: lead_score > 80

πŸ’‘ πŸ’‘ Smart Conditions

This column will ONLY execute (and wait for your input) if the lead score is above 80.

Lower-scoring leads? This column is skipped automatically. They go straight to the next step without waiting for approval.

This is how you balance automation with control!

Step 2: Add Notification Column

Add another column to notify you when a high-value lead needs review:

  1. Click "+ Add Column"
  2. Choose "Send Email" (or "Send Slack")
  3. Name it: notify_for_review
  4. Label: "Notify Sales"
  5. Depends on: outreach_email
  6. Add condition: lead_score > 80
  7. Configure:
    • To: your-email@company.com (or Slack channel)
    • Subject: "High-value lead needs review: [contact_name] from [company_name]"
    • Body: Include the lead score and drafted email

8.2.9: Send the Email ​

Final step! Let's actually send the personalized email to the lead.

Here's how:

  1. Click "+ Add Column"
  2. Choose "Send Email" type
  3. Name it: send_outreach
  4. Label: "Send Email"
  5. Set dependencies:
    • Wait for outreach_email to be filled
    • Wait for approved_to_send (for high-value leads)
  6. Configure:

Email Configuration:

  • To: Use data from email column
  • From: your-sales-email@company.com
  • Subject: "Quick question about [company_name]"
  • Body: Use data from outreach_email column

πŸ’‘ πŸŽ‰ The Complete Flow

Here's what happens now for EVERY lead:

High-value leads (score > 80):

  1. Form submitted β†’ Lead created
  2. Company data enriched automatically
  3. AI scores the lead β†’ 85
  4. Assigned to senior sales rep
  5. AI writes personalized email
  6. You get notified to review
  7. You check "Ready to Send"
  8. Email sends automatically

Regular leads (score 50-80): 1-5. Same as above 6. Email sends automatically (no review needed)

Low-value leads (score < 50): 1-5. Same as above 6. Routed to marketing for nurturing 7. Different workflow (email drip campaign, etc.)


8.2.10: Test the Complete System ​

Time to see your creation in action!

Complete test:

  1. Submit a test form entry with a strong profile:

    • Use a corporate email domain
    • Include a recognizable company name
    • Use a decision-maker title (VP, Director, etc.)
  2. Watch your table:

    • New row appears immediately
    • Company data fills in within seconds
    • AI assigns a score
    • Lead routes to appropriate person
    • Personalized email drafts
  3. If it's high-value:

    • Check your inbox for the review notification
    • Review the drafted email
    • Check "Ready to Send" if it looks good
    • Email sends automatically
  4. Submit a low-value test (personal email, small company):

    • Watch it get a lower score
    • Routes to marketing instead
    • Different workflow engages

Real-World Example: Lead Qualification Pipeline

$37,000 Saved
1
βœ‰οΈ

Basic Validation

Free

Condition:

Always (no condition)

Purpose:

Validate email format, check domain

Total rows:10,000
Processed:10,000
Skipped:0
↓8,000 rows continue
2
🏒

Company Enrichment

$1.00 per call

Condition:

email_valid == true

Purpose:

Look up company data

Total rows:10,000
Processed:8,000
Skipped:2,000
Savings: $2,000
↓1,000 rows continue
3
πŸ”

Premium Enrichment

$5.00 per call

Condition:

company_size > 100 && industry in [Tech, Finance, Healthcare]

Purpose:

Deep company research

Total rows:8,000
Processed:1,000
Skipped:7,000
Savings: $35,000
↓1,500 rows continue
4
πŸ“€

Send to Sales

Free

Condition:

premium_enrichment completed && decision_maker_found == true

Purpose:

Add to sales CRM

Total rows:1,000
Processed:1,500
Skipped:8,500

πŸ’° Total Savings Breakdown:

Company Enrichment (2,000 skipped Γ— $1.00):$2,000
Premium Enrichment (7,000 skipped Γ— $5.00):$35,000
Total Saved: $37,000

⚑ Speed Benefits:

  • β€’ Skipped 9,000 unnecessary API calls
  • β€’ Processed only qualified leads
  • β€’ Pipeline runs much faster

🎯 Quality Benefits:

  • β€’ Only 1,500 qualified leads to sales
  • β€’ Sales team focuses on best leads
  • β€’ Higher conversion rate
πŸŽ‰

Smart Conditions = Massive ROI

By intelligently skipping inappropriate leads at each stage, you saved $37,000 on 10,000 leads while maintaining quality. This is the power of conditional execution!


What You've Built ​

Take a step back and appreciate what you just created. This system:

Captures every lead - No more lost form submissions or forgotten follow-ups

Enriches automatically - Company size, industry, revenueβ€”all looked up instantly

Scores intelligently - AI analyzes fit and prioritizes your best opportunities

Routes perfectly - Right lead, right person, every single time

Personalizes at scale - Every email mentions their specific company and situation

Balances automation with control - High-value leads get human review, others move fast

Companies pay $10,000/month for systems that do exactly this. You just built it in under an hour.

πŸ’‘ πŸŽ‰ Real Results You Can Expect

Teams using systems like this report:

  • 5x faster lead response time (minutes instead of days)
  • 40% higher conversion rates (personalization works!)
  • Zero leads falling through the cracks
  • 90% time savings for sales team (they focus on closing, not qualifying)
  • Better matches between leads and reps

And the best part? Your system runs 24/7, even when your team is asleep.


Going Further ​

This is a great foundation, but you can make it even better:

Add more enrichment:

  • Social media profiles
  • Recent company news
  • Technology stack
  • Funding information

Smarter scoring:

  • Website visits and engagement data
  • Content downloads
  • Time on site
  • Pages viewed

Better assignment:

  • Round-robin within score tiers
  • Workload balancing
  • Geographic routing
  • Industry specialization matching

Follow-up sequences:

  • Auto-follow-up if no response in 3 days
  • Escalation paths for high-value no-responses
  • Automated nurture sequences for mid-range leads

Analytics:

  • Conversion rates by score range
  • Response time tracking
  • Rep performance comparison
  • ROI calculation

Start with what you've built. Let it run for a week. Then enhance based on what you learn!


Common Questions ​

Q: What if the enrichment service doesn't find data?

A: Add a condition to your scoring: company_data exists. If enrichment fails, either skip scoring or assign a default mid-range score. You can also set up alerts for leads that need manual research.

Q: How do I prevent duplicate leads?

A: Add a "Check for Duplicate" column before the enrichment step. Use custom code to search for existing rows with the same email address. If found, update the existing row instead of creating a new one.

Q: Can I test without sending real emails?

A: Absolutely! Use your own email address for testing. Or create a test column that "simulates" sending without actually sending. Once you're confident, switch to the real send column.

Q: What if my form has different fields?

A: Just adjust the field names in your extraction code. Instead of form_data.email, use whatever field name your form provides. Submit a test entry and look at the form_data column to see the exact structure.

Q: How much do enrichment services cost?

A: Varies widely. Many offer:

  • Free trials (usually 50-100 lookups)
  • Pay-per-lookup ($0.50-$5 per lead)
  • Monthly plans (typically $50-500/month)

Start with a free trial to validate the system, then scale up!


Previous: 8.1 Customer Support System | Next: 8.3 Order Processing Automation

Built with VitePress