Global AI Network

Advanced Lead Enrichment AI Agent

Automatically qualify, enrich, and route leads with AI-powered scoring, LinkedIn data enrichment, and intelligent follow-up via Slack, Gmail, and HubSpot.

8,734+
Total Deployments
5 min
Setup Time
v1.0
Version

Need Help Getting Started? Our AI Specialists Will Set It Up For Free

1-Click Deployment 5-Min Setup Free Expert Support
Technology Partners

Required Integrations

This agent works seamlessly with these platforms to deliver powerful automation.

Gmail

Gmail

Send, receive, and manage Gmail messages with full email automation capabilities

Google Sheets

Google Sheets

Read / Write data from / to Google Sheets

HubSpot

HubSpot

Comprehensive CRM and marketing automation platform with contacts, companies, de...

OpenAI

OpenAI

Leverage OpenAI's powerful language models to generate text, answer questions, a...

Slack

Slack

Send messages, manage channels, and automate workflows in Slack workspaces

Step by Step

Setup Tutorial

mission-briefing.md

What This Agent Does

This intelligent lead qualification workflow transforms raw form submissions into actionable sales opportunities through automated enrichment, AI-powered scoring, and smart routing. When a prospect fills out your lead capture form, the system instantly validates their information, enriches it with company data from LinkedIn, uses GPT-4o to assess lead quality, and automatically routes hot leads to your sales team with personalized outreach emails—all within seconds.

Key benefits include:

  • 90% time savings on manual lead research and qualification
  • Instant response to prospects while data enrichment happens in the background
  • Zero missed opportunities with automated hot lead alerts to Slack
  • Consistent qualification using AI-powered scoring criteria
  • Personalized outreach at scale with AI-generated emails tailored to each lead

This workflow is perfect for B2B sales teams handling inbound leads, marketing teams running demand generation campaigns, and sales development representatives who need to prioritize their outreach efforts based on lead quality and company fit.

Who Is It For

This automation is designed for:

  • Sales Development Representatives (SDRs) who need to quickly qualify and prioritize incoming leads without spending hours on manual research
  • Marketing teams running paid advertising, content marketing, or event campaigns that generate high volumes of inbound leads
  • Business development professionals who want to ensure every lead receives appropriate follow-up based on their qualification score
  • Small to mid-sized B2B companies looking to compete with enterprise sales processes without hiring a large team
  • Founders and solopreneurs who need to automate lead management while maintaining a personalized touch

If you're currently spending more than 15 minutes per lead on research, qualification, and initial outreach, this workflow will dramatically accelerate your sales process.

Required Integrations

OpenAI

Why it's needed: Powers the intelligent lead qualification analysis and generates personalized outreach emails for hot leads. The workflow uses GPT-4o to assess lead fit based on company size, industry, role, and other factors you define.

Setup steps:

  1. Create an account at platform.openai.com
  2. Navigate to API Keys section in your account settings
  3. Click "Create new secret key" and copy the key immediately (it won't be shown again)
  4. Add billing information to your OpenAI account to enable API access
  5. In TaskAGI, go to Integrations → OpenAI
  6. Paste your API key and click "Connect"
  7. Test the connection to verify authentication

Cost consideration: GPT-4o costs approximately $0.01-0.03 per lead qualification, making this extremely cost-effective for most use cases.

Google Sheets

Why it's needed: Creates a centralized database of all qualified leads with their enrichment data and qualification scores. This serves as your single source of truth and enables easy reporting and analysis.

Setup steps:

  1. Create a new Google Sheet for your lead database
  2. Add column headers: Timestamp, Name, Email, Company, Role, Phone, LinkedIn URL, Company Size, Industry, Qualification Score, Lead Temperature, Notes
  3. Copy the full URL of your Google Sheet
  4. In TaskAGI, go to Integrations → Google Sheets
  5. Click "Connect with Google" and authorize TaskAGI to access your sheets
  6. Paste your sheet URL in the Log to Google Sheets node configuration
  7. Map the data fields to match your column headers

Pro tip: Use Google Sheets' built-in filtering and conditional formatting to create visual dashboards of your lead pipeline.

Slack

Why it's needed: Delivers real-time notifications to your sales team when hot leads come in, ensuring immediate follow-up. Also logs warm and cold leads for visibility without overwhelming your team.

Setup steps:

  1. Go to api.slack.com/apps and click "Create New App"
  2. Choose "From scratch" and name it "TaskAGI Lead Alerts"
  3. Select your workspace and create the app
  4. Navigate to "OAuth & Permissions" and add these scopes: chat:write, channels:read
  5. Install the app to your workspace
  6. Copy the "Bot User OAuth Token" (starts with xoxb-)
  7. In TaskAGI, go to Integrations → Slack and paste your token
  8. Create dedicated channels: #hot-leads, #warm-leads, #cold-leads
  9. Invite the TaskAGI bot to each channel using /invite @TaskAGI Lead Alerts

Gmail

Why it's needed: Sends personalized outreach emails to hot leads automatically, ensuring they receive timely, relevant communication while the lead is still warm.

Setup steps:

  1. In TaskAGI, navigate to Integrations → Gmail
  2. Click "Connect with Google"
  3. Select the Gmail account you want to send emails from
  4. Grant permissions for sending emails on your behalf
  5. Configure your email signature in the Send Personalized Email node
  6. Set up email tracking (optional) by enabling read receipts

Important: Use a professional email address, not a personal one. Consider setting up a dedicated sales email like sales@yourcompany.com for better deliverability.

HubSpot

Why it's needed: Automatically creates or updates contact records in your CRM, ensuring your sales pipeline stays synchronized without manual data entry.

Setup steps:

  1. Log into your HubSpot account
  2. Navigate to Settings → Integrations → API Key
  3. Click "Create API Key" or copy your existing key
  4. In TaskAGI, go to Integrations → HubSpot
  5. Paste your API key and click "Connect"
  6. Map custom properties if you use them (company size, lead score, etc.)
  7. Configure duplicate handling preferences (update existing vs. create new)

Alternative: If you use a different CRM (Salesforce, Pipedrive, etc.), you can replace this node with your preferred CRM integration.

Configuration Steps

Step 1: Set Up Lead Capture Form

Configure the Lead Capture Form trigger node with these fields:

  • name (required, text)
  • email (required, email validation)
  • company (required, text)
  • role (required, text)
  • phone (optional, text)
  • message (optional, textarea)

Copy the webhook URL provided and embed it in your website, landing pages, or advertising campaigns.

Step 2: Configure Immediate Response

The Send Form Response node immediately acknowledges the submission. Customize the message:

Thanks for your submission! We'll be in touch soon with information tailored to your needs.

This runs in parallel with enrichment, so prospects receive instant feedback.

Step 3: Normalize Lead Data

The Normalize Lead Data function standardizes input formats:

  • Trims whitespace from all fields
  • Converts email to lowercase
  • Extracts first and last name from full name
  • Formats phone numbers consistently

No configuration needed—this runs automatically.

Step 4: Lead Validation Logic

The Valid Lead? condition checks:

  • Email format is valid
  • Name is at least 2 characters
  • Company name is provided

Invalid leads route to Handle Invalid Lead (no operation) to prevent errors downstream.

Step 5: Business Email Detection

The Business Email? condition filters out generic email providers:

  • Rejects: gmail.com, yahoo.com, hotmail.com, outlook.com
  • Accepts: company domains

Business emails proceed to enrichment; personal emails skip to Skip Enrichment (Fallback).

Step 6: LinkedIn Company Search

The Google Search node finds the company's LinkedIn page:

  • Uses Google Custom Search API
  • Search query: "[Company Name]" site:linkedin.com/company
  • Returns top 5 results

The Extract LinkedIn URL function parses the results and extracts the first valid LinkedIn company URL.

Step 7: LinkedIn Data Enrichment

If a LinkedIn URL is found, the LinkedIn Company Scraper retrieves:

  • Company size (employee count)
  • Industry classification
  • Company description
  • Location/headquarters

The Merge LinkedIn Data function combines this with form data to create a complete lead profile.

Step 8: AI Lead Qualification

The AI Lead Qualification node uses GPT-4o with this prompt structure:

Analyze this lead and provide qualification assessment:

Lead Data:
- Name: [[name]]
- Company: [[company]]
- Role: [[role]]
- Company Size: [[companySize]]
- Industry: [[industry]]

Evaluate based on:
1. Decision-making authority (C-level, VP, Director = high)
2. Company size fit (50-500 employees = ideal)
3. Industry relevance (SaaS, Technology, Professional Services = high)
4. Engagement quality (detailed message = positive signal)

Return JSON:
{
  "score": 0-100,
  "temperature": "hot|warm|cold",
  "reasoning": "brief explanation",
  "nextSteps": "recommended action"
}

Customize the criteria to match your ideal customer profile (ICP).

Step 9: Build Lead Profile

The Build Qualified Lead Profile function structures all data for downstream actions:

  • Combines form data, enrichment data, and AI qualification
  • Formats for Google Sheets logging
  • Prepares variables for conditional routing

Step 10: Log to Google Sheets

Every qualified lead is logged with all available data. Ensure your sheet URL is configured in the node settings.

Step 11: Lead Temperature Routing

Three conditional branches route leads based on AI qualification:

Hot Lead Path (score ≥ 75):

  • Slack Hot Lead Alert notifies #hot-leads channel with full lead details
  • AI Generate Personalized Email creates custom outreach mentioning specific pain points
  • Send Personalized Email delivers the message from your Gmail
  • Create HubSpot Contact with "Hot Lead" tag and high priority

Warm Lead Path (score 50-74):

  • Slack Warm Lead Notification logs to #warm-leads for follow-up within 24 hours
  • Create HubSpot Contact with "Warm Lead" tag

Cold Lead Path (score < 50):

  • Slack Cold Lead Log records in #cold-leads for nurture campaigns
  • Create HubSpot Contact with "Cold Lead" tag for drip campaigns

Testing Your Agent

Initial Test Run

  1. Click "Test Workflow" in the TaskAGI editor
  2. Fill out the form with sample data:
    • Name: John Smith
    • Email: john.smith@acmecorp.com
    • Company: Acme Corporation
    • Role: VP of Sales
    • Phone: 555-123-4567
  3. Submit and watch the execution flow in real-time

Verification Checklist

Immediate response received (check webhook response)
Data normalization completed (verify in execution log)
Business email detected correctly
LinkedIn URL found and extracted
Company data enriched (check employee count, industry)
AI qualification returned valid JSON with score
Google Sheet updated with new row
Slack notification appeared in appropriate channel
Email sent (check Gmail sent folder)
HubSpot contact created with correct properties

Expected Results

  • Total execution time: 15-30 seconds
  • Hot lead (score 75+): All 5 actions trigger
  • Warm lead (score 50-74): Slack notification + HubSpot only
  • Cold lead (score <50): Logging only

Troubleshooting

"LinkedIn URL Not Found"

Cause: Company name doesn't match LinkedIn listing exactly
Solution: The workflow gracefully handles this with the Skip Enrichment (Fallback) path. Qualification still proceeds with form data only. To improve matching, add company domain field to your form.

"OpenAI API Error: Rate Limit"

Cause: Exceeded OpenAI API quota
Solution: Check your OpenAI billing dashboard and increase limits. Consider adding a delay node if processing high volumes.

"Google Sheets Permission Denied"

Cause: TaskAGI doesn't have edit access to your sheet
Solution: Share your Google Sheet with the service account email shown in TaskAGI's Google Sheets integration settings, granting "Editor" permissions.

"Slack Message Failed"

Cause: Bot not invited to channel or insufficient permissions
Solution: Type /invite @TaskAGI Lead Alerts in each Slack channel. Verify bot has chat:write scope in Slack app settings.

"Email Not Sending"

Cause: Gmail daily sending limit reached (500/day for free accounts)
Solution: Upgrade to Google Workspace for higher limits, or add a condition to only email hot leads (score 80+).

"HubSpot Duplicate Contact Error"

Cause: Contact with email already exists
Solution: Change the Create HubSpot Contact node to "Create or Update" mode in advanced settings.

Next Steps

Immediate Actions

  1. Customize qualification criteria in the AI prompt to match your ICP
  2. Update email templates with your brand voice and value proposition
  3. Set up Slack channel workflows to assign leads to specific sales reps
  4. Create Google Sheets dashboard with charts showing lead volume by temperature

Optimization Opportunities

  • Add lead scoring decay: Implement time-based score reduction for leads not contacted within 48 hours
  • A/B test email templates: Create variants and track response rates
  • Implement lead assignment: Use round-robin logic to distribute hot leads across your team
  • Add SMS notifications: For ultra-hot leads (score 90+), send SMS alerts to sales reps
  • Create nurture sequences: Build automated email drip campaigns for warm and cold leads

Advanced Enhancements

  • Connect to your calendar: Automatically include booking links in hot lead emails
  • Add sentiment analysis: Analyze the message field for urgency indicators
  • Implement lead scoring models: Train custom ML models based on your conversion data
  • Create feedback loops: Track which leads convert and refine qualification criteria

Congratulations! You now have an enterprise-grade lead qualification system that works 24/7 to ensure no opportunity slips through the cracks. Monitor your Google Sheet dashboard weekly to track performance and continuously refine your qualification criteria based on actual conversion data.