Global AI Network

Enrich & Qualify Leads with AI for HubSpot CRM

Automatically enrich, score, and qualify leads in HubSpot using AI—then route qualified prospects to your team via Slack while updating CRM records in real-time.

526+
Total Deployments
15 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.

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 automatically captures, enriches, scores, and routes incoming leads based on their potential value to your business. When a prospect submits their information through your lead form, the system instantly enriches their data with additional company and contact information, assigns a qualification score using AI, and then automatically updates your CRM and notifies your team—all without manual intervention.

Key benefits include:

  • Save 15-20 minutes per lead by eliminating manual research and data entry
  • Improve lead response time from hours to seconds with instant qualification
  • Increase conversion rates by ensuring high-value leads receive immediate attention
  • Maintain data consistency across your CRM with automated enrichment and updates

This workflow is perfect for B2B sales teams handling inbound leads, marketing teams managing lead generation campaigns, and growth teams looking to scale their lead qualification process without adding headcount.

Who Is It For

This automation is designed for:

  • Sales Development Representatives (SDRs) who need to quickly identify and prioritize high-quality leads
  • Marketing Operations teams managing lead flow from campaigns to sales
  • Small to mid-size B2B companies (10-500 employees) looking to automate their lead qualification process
  • Sales managers who want consistent, objective lead scoring across their team
  • Revenue operations professionals focused on optimizing the lead-to-opportunity conversion funnel

You'll get the most value from this workflow if you're currently spending significant time manually researching leads, struggling with inconsistent lead qualification, or missing opportunities due to slow response times.

Required Integrations

OpenAI

Why it's needed: OpenAI powers the intelligent lead enrichment and scoring agents that analyze your leads and assign qualification scores based on your criteria.

Setup steps:

  1. Visit platform.openai.com and create an account or sign in
  2. Navigate to the API section in your account dashboard
  3. Click "Create new secret key" and give it a descriptive name like "TaskAGI Lead Qualification"
  4. Important: Copy the API key immediately—you won't be able to see it again
  5. Set up billing in your OpenAI account (the workflow uses GPT-4o, which requires a paid account)

Configuration in TaskAGI:

  1. Go to Integrations in your TaskAGI dashboard
  2. Click Add Integration and select OpenAI
  3. Paste your API key in the authentication field
  4. Click Test Connection to verify
  5. Save the integration

Cost estimate: Approximately $0.02-0.05 per lead processed, depending on data complexity.

HubSpot

Why it's needed: HubSpot serves as your central CRM where contact and company records are created, updated, and maintained with enriched lead data.

Setup steps:

  1. Log into your HubSpot account (works with Free, Starter, Professional, or Enterprise tiers)
  2. Click your account name in the top-right corner and select Integrations
  3. Navigate to Private Apps (or search for it in settings)
  4. Click Create a private app
  5. Name it "TaskAGI Lead Workflow" and add a description
  6. Under the Scopes tab, enable these permissions:
    • crm.objects.contacts.read
    • crm.objects.contacts.write
    • crm.objects.companies.read
    • crm.objects.companies.write
  7. Click Create app and copy the access token

Configuration in TaskAGI:

  1. Navigate to Integrations in TaskAGI
  2. Select Add IntegrationHubSpot
  3. Paste your private app access token
  4. Click Test Connection to verify access
  5. Save the integration

Note: Ensure your HubSpot account has custom properties set up for lead scores if you want to track historical scoring data.

Slack

Why it's needed: Slack enables real-time notifications to your sales team when qualified leads are identified, ensuring immediate follow-up on hot prospects.

Setup steps:

  1. Go to api.slack.com/apps and click Create New App
  2. Select From scratch and name it "TaskAGI Lead Alerts"
  3. Choose the workspace where you want notifications
  4. Navigate to OAuth & Permissions in the sidebar
  5. Scroll to Scopes and add these Bot Token Scopes:
    • chat:write
    • chat:write.public
  6. Click Install to Workspace at the top of the page
  7. Authorize the app and copy the Bot User OAuth Token (starts with xoxb-)

Configuration in TaskAGI:

  1. Go to Integrations in TaskAGI
  2. Click Add IntegrationSlack
  3. Paste your Bot User OAuth Token
  4. Test by selecting a channel from the dropdown
  5. Save the integration

Pro tip: Create a dedicated channel like #qualified-leads for these notifications to keep them organized.

Configuration Steps

Step 1: Configure the Lead Form Trigger

The Lead Form node is your workflow's entry point. Configure it to capture:

  • Email (required) - Primary identifier for lead matching
  • First Name and Last Name - For personalization
  • Company Name - Used for enrichment
  • Phone (optional) - Additional contact method
  • Website - Critical for company domain matching

Set the form URL to your landing page or embed it directly on your website. The trigger activates instantly when a form is submitted.

Step 2: Set Up Lead Enricher Agent

The Lead Enricher Agent uses GPT-4o to enhance your lead data with additional information:

  1. Select gpt-4o as the model (required for optimal enrichment)
  2. Configure the system prompt to define what data to enrich (company size, industry, technologies used, etc.)
  3. Map the form fields as input: {{trigger.email}}, {{trigger.company}}, {{trigger.website}}
  4. Set temperature to 0.3 for consistent, factual responses

Example prompt structure:

Enrich this lead with company information including employee count, 
industry, annual revenue estimate, and technology stack. 
Return as structured JSON.

Step 3: Parse Enrichment Data

The Parse Enrichment Data node converts the AI response into structured data:

  1. Set the input to {{lead_enricher_agent.output}}
  2. Define the expected JSON schema with fields like:
    • company_size
    • industry
    • estimated_revenue
    • technologies
  3. Enable strict parsing to catch formatting errors

Step 4: Configure Lead Scoring Agent

The Lead Scoring Agent evaluates lead quality using your criteria:

  1. Model: gpt-4o (already configured)
  2. Input the enriched data: {{parse_enrichment_data.output}}
  3. Customize the scoring prompt based on your ideal customer profile (ICP)
  4. Request a score from 0-100 with reasoning

Example scoring criteria:

  • Company size: 50-500 employees (+30 points)
  • Industry match: SaaS, Technology (+25 points)
  • Revenue: $5M-$50M (+25 points)
  • Technology stack alignment (+20 points)

Set temperature to 0.2 for consistent scoring.

Step 5: Set Up the Lead Score Condition

The Check Lead Score node routes leads to qualified or not-qualified paths:

  1. Condition type: Number comparison
  2. Value to check: {{lead_scoring_agent.score}}
  3. Operator: Greater than or equal to
  4. Threshold: 70 (adjust based on your qualification criteria)

Leads scoring 70+ follow the "qualified" path; others follow the "not qualified" path.

Step 6: Configure Qualified Lead Path

For qualified leads, three actions occur in sequence:

Create/Update Contact (Qualified):

  • Email: {{trigger.email}}
  • First name: {{trigger.first_name}}
  • Last name: {{trigger.last_name}}
  • Lead score: {{lead_scoring_agent.score}}
  • Lead status: Set to "Qualified"

Search Company (Qualified):

  • Search by domain extracted from {{trigger.website}}
  • This finds existing company records to avoid duplicates

Update Company (Qualified):

  • Company ID: {{search_company.company_id}}
  • Update fields with enriched data from parsing step
  • Add tags like "AI-Qualified" for segmentation

Notify Team (Qualified Lead):

  • Channel: Your designated qualified leads channel
  • Message template:
🔥 New Qualified Lead! Score: {{lead_scoring_agent.score}}
Name: {{trigger.first_name}} {{trigger.last_name}}
Company: {{trigger.company}}
Email: {{trigger.email}}
Reasoning: {{lead_scoring_agent.reasoning}}

Step 7: Configure Not Qualified Lead Path

For leads below the threshold, follow similar steps but with different handling:

Create/Update Contact (Not Qualified):

  • Same fields as qualified, but set lead status to "Nurture"

Search Company (Not Qualified):

  • Identical search process

Update Company (Not Qualified):

  • Update with enriched data
  • Add tags like "Needs-Nurturing"

These leads skip the Slack notification but are still captured in your CRM for future nurturing campaigns.

Testing Your Agent

Running Your First Test

  1. Click Test Workflow in the top-right corner of the workflow editor
  2. Fill out the test form with realistic data:
    • Use a real company website for accurate enrichment
    • Try both a high-quality lead (matches your ICP) and a low-quality lead
  3. Click Submit and watch the execution in real-time

Verification Checklist

After Lead Enricher Agent:

  • ✅ Verify enriched data includes company size, industry, and relevant details
  • ✅ Check that the data format is consistent and complete

After Lead Scoring:

  • ✅ Confirm the score is between 0-100
  • ✅ Review the reasoning to ensure it aligns with your criteria
  • ✅ Test edge cases (missing data, unclear company info)

After Condition Split:

  • ✅ Verify high-scoring leads (70+) follow the qualified path
  • ✅ Confirm low-scoring leads take the not-qualified path

In HubSpot:

  • ✅ Check that the contact was created/updated with correct information
  • ✅ Verify the company record exists and is properly linked
  • ✅ Confirm enriched data populated the right fields

In Slack:

  • ✅ Ensure qualified lead notifications appear in the correct channel
  • ✅ Verify all data fields display properly in the message
  • ✅ Confirm no notifications sent for unqualified leads

Expected Results

A successful execution should complete in 15-30 seconds with all nodes showing green checkmarks. You should see:

  • One new/updated contact in HubSpot
  • One new/updated company record
  • One Slack notification (if qualified)
  • Complete enrichment data in all fields

Troubleshooting

"OpenAI API Error: Insufficient Quota"

Problem: Your OpenAI account doesn't have credits or billing isn't set up.

Solution:

  1. Visit platform.openai.com/account/billing
  2. Add a payment method and purchase credits
  3. Wait 5-10 minutes for activation
  4. Retry the workflow

"HubSpot: Contact Already Exists" Error

Problem: The workflow is trying to create a contact that already exists, and you haven't enabled the update option.

Solution:

  1. Open the HubSpot contact creation node
  2. Enable "Create or Update" mode instead of "Create only"
  3. Set the unique identifier to email address
  4. Save and retest

Enrichment Returns Incomplete Data

Problem: The Lead Enricher Agent returns partial or missing information.

Solution:

  • Ensure the website URL is valid and accessible
  • Check that the company has a public web presence
  • Adjust the enrichment prompt to be more flexible with missing data
  • Add fallback values in the parsing step for optional fields

Lead Score Always Returns Same Value

Problem: All leads receive similar scores regardless of quality.

Solution:

  1. Review your scoring prompt for specificity
  2. Ensure you're passing all enriched data to the scoring agent
  3. Lower the temperature setting to 0.1 for more deterministic results
  4. Add more distinct scoring criteria that differentiate your ICP

Slack Notifications Not Appearing

Problem: Qualified leads aren't triggering Slack messages.

Solution:

  • Verify the Slack bot is added to the target channel (type /invite @TaskAGI Lead Alerts)
  • Check that the bot has chat:write permissions
  • Confirm the channel name is spelled correctly
  • Test the Slack integration independently using the Test button

Company Search Returns No Results

Problem: The workflow can't find the company in HubSpot.

Solution:

  1. Verify the domain extraction is working correctly
  2. Check if the company exists in HubSpot with that exact domain
  3. Add a fallback to create a new company if search returns empty
  4. Ensure the domain format is clean (no http://, www., or trailing slashes)

Next Steps

Immediate Actions After Setup

  1. Run 10-20 test leads with varying quality levels to calibrate your scoring threshold
  2. Monitor the first 50 real leads closely and adjust scoring criteria based on sales feedback
  3. Set up a weekly review of qualified vs. not-qualified leads to refine your ICP definition
  4. Create a nurture campaign in HubSpot for leads that didn't qualify initially

Optimization Suggestions

Refine Your Scoring Model:

  • After 100 leads, analyze which scored leads actually converted
  • Adjust point values for different criteria based on conversion data
  • Consider adding negative scoring for disqualifying factors (competitors, students, etc.)

Enhance Enrichment:

  • Add social media profile enrichment (LinkedIn, Twitter)
  • Include recent company news or funding information
  • Integrate with additional data providers like Clearbit or ZoomInfo

Improve Team Workflow:

  • Add automatic task creation in HubSpot for qualified leads
  • Set up round-robin assignment to distribute leads fairly
  • Create custom Slack buttons for "Contacted" or "Not Interested" quick actions

Scale Your Process:

  • Duplicate this workflow for different lead sources (webinars, content downloads, demo requests)
  • Create source-specific scoring models
  • Build a dashboard to track qualification rates and conversion metrics

Advanced Usage Tips

A/B Test Your Scoring: Create two versions of the workflow with different scoring thresholds (e.g., 70 vs. 80) and compare conversion rates after 30 days.

Add Lead Routing: Extend the qualified path to assign leads to specific sales reps based on territory, industry, or company size.

Implement Lead Decay: Set up a follow-up workflow that reduces lead scores over time if there's no engagement, automatically moving them to nurture status.

Create Feedback Loops: Add a monthly workflow that asks sales reps to rate lead quality, then use that data to retrain your scoring criteria.

Build a Lead Intelligence Dashboard: Export scoring data and enrichment results to a BI tool to identify patterns in your highest-converting leads.

Congratulations! You've now set up an intelligent lead qualification system that will save your team hours of manual work while ensuring no high-value opportunity slips through the cracks. As you gather more data, continuously refine your criteria to make the system even more accurate and valuable.