What This Agent Does
This intelligent lead qualification workflow automatically captures, evaluates, and routes incoming leads based on their potential value to your business. When a prospect submits their information through your lead capture form, the workflow uses AI to analyze and score the lead, logs all data to Google Sheets for tracking, creates contacts in your CRM, and sends targeted Slack notifications to your sales team based on lead temperature (hot, warm, or cold).
Key benefits include:
-
Save 15-20 hours per week on manual lead qualification and data entry
-
Respond to hot leads 10x faster with instant Slack alerts to your sales team
-
Never lose a lead with automatic logging and CRM integration
-
Make data-driven decisions with AI-powered lead scoring that's consistent and unbiased
-
Eliminate human error in data transfer between systems
Perfect for: Sales teams, marketing agencies, SaaS companies, real estate professionals, and any business that needs to quickly identify and act on high-value leads while maintaining comprehensive records of all prospects.
Who Is It For
This workflow is designed for sales and marketing teams who receive leads through online forms and need an intelligent system to prioritize follow-up actions. It's particularly valuable if you:
- Receive more than 20 leads per week and struggle to respond quickly to the most promising ones
- Have a sales team that needs real-time notifications about hot prospects
- Want to eliminate manual data entry between your lead forms, spreadsheets, and CRM
- Need consistent lead qualification criteria applied to every prospect
- Manage leads across multiple tools (forms, spreadsheets, Slack, CRM) and want seamless integration
- Are looking to scale your lead management without hiring additional staff
Whether you're a startup founder handling leads yourself or a sales manager coordinating a team, this workflow ensures no opportunity slips through the cracks while focusing human attention where it matters most.
Required Integrations
OpenAI
Why it's needed: OpenAI's GPT-4 model powers the intelligent lead qualification, analyzing prospect information to determine if they're a hot, warm, or cold lead based on criteria you define.
Setup steps:
- Visit platform.openai.com and create an account or sign in
- Navigate to API Keys in your account settings
- Click "Create new secret key" and give it a descriptive name like "TaskAGI Lead Qualification"
- Copy the API key immediately (it won't be shown again)
- In TaskAGI, go to Integrations → OpenAI
- Click "Add Integration" and paste your API key
- Test the connection to verify it's working
Configuration notes: The workflow uses the gpt-4o model for optimal balance between speed and accuracy. You'll need an OpenAI account with API credits available (typically $5-20/month for moderate lead volumes).
Google Sheets
Why it's needed: Google Sheets serves as your central lead database, automatically logging every submission with qualification scores and timestamps for easy tracking and reporting.
Setup steps:
- Create a new Google Sheet or use an existing one for lead tracking
- Set up column headers in the first row:
Timestamp, First Name, Last Name, Email, Company, Phone, Lead Score, Qualification
- Copy the full URL of your Google Sheet
- In TaskAGI, go to Integrations → Google Sheets
- Click "Add Integration" and choose "Connect with Google"
- Authorize TaskAGI to access your Google Sheets
- Grant permissions for reading and writing spreadsheets
Configuration notes: Make sure the Google account you connect has edit access to the sheet. The workflow will append new rows automatically, so don't worry about overwriting existing data.
Slack
Why it's needed: Slack delivers instant notifications to your sales team when leads come in, with different channels or messages based on lead temperature to ensure hot prospects get immediate attention.
Setup steps:
- Open your Slack workspace where you want to receive notifications
- Create dedicated channels like
#hot-leads, #warm-leads, and #cold-leads (or use existing channels)
- In TaskAGI, go to Integrations → Slack
- Click "Add Integration" and select "Connect with Slack"
- Choose your workspace and authorize TaskAGI
- Grant permissions to post messages and access channels
- Note the channel IDs or names you'll use for notifications
Configuration notes: You can send all notifications to one channel or route them to different channels based on lead temperature. Consider using @mentions for hot leads to ensure immediate visibility.
HubSpot
Why it's needed: HubSpot integration automatically creates contact records for qualified leads, ensuring your CRM stays up-to-date without manual data entry and enabling your sales team to begin nurture sequences immediately.
Setup steps:
- Log into your HubSpot account (Marketing Hub, Sales Hub, or CRM)
- Navigate to Settings → Integrations → API Key
- Click "Create API Key" or use an existing one
- Copy the API key to your clipboard
- In TaskAGI, go to Integrations → HubSpot
- Click "Add Integration" and paste your API key
- Test the connection to verify access
Configuration notes: The workflow creates contacts with standard properties (name, email, company, phone). You can customize which leads get added to HubSpot based on qualification score in the workflow configuration.
Configuration Steps
Step 1: Configure the Lead Capture Form
The Lead Capture Form node is your workflow trigger. Configure these fields:
-
Form Fields: Set up fields for
first_name, last_name, email, company, phone, and any custom qualification questions
-
Form URL: After saving, you'll receive a unique form URL to embed on your website or share directly
-
Submission Settings: Enable email notifications if you want backup alerts
Pro tip: Add qualifying questions like "What's your budget?" or "What's your timeline?" to give the AI more context for scoring.
Step 2: Set Up AI Lead Qualification
The AI Lead Qualification node analyzes submitted data. Configure:
-
Model: Use
gpt-4o (already set) for best results
-
Prompt: Customize the qualification criteria. Example:
Qualify this lead based on the following criteria:
Name: [[nodes.3560.first_name]] [[nodes.3560.last_name]]
Email: [[nodes.3560.email]]
Company: [[nodes.3560.company]]
Phone: [[nodes.3560.phone]]
Scoring criteria:
- HOT: Enterprise company, decision-maker title, urgent timeline
- WARM: Mid-size company, relevant role, exploring options
- COLD: Small company, student/personal email, no clear timeline
Return only: HOT, WARM, or COLD
-
Temperature: Set to
0.3 for consistent, deterministic scoring
-
Max Tokens:
50 is sufficient for a simple classification
Step 3: Format Lead Data
The Format Lead Data node structures information for downstream systems:
-
Data Mapping: Create fields that combine form data with AI qualification
-
Example mappings:
-
full_name: [[nodes.3560.first_name]] [[nodes.3560.last_name]]
-
lead_score: [[nodes.3561.content]]
-
timestamp: [[nodes.3560.submittedAt]]
-
email: [[nodes.3560.email]]
This ensures consistent data format across Google Sheets, Slack, and HubSpot.
Step 4: Configure Google Sheets Logging
The Log to Google Sheets node records every lead:
-
Sheet URL: Paste your Google Sheet URL (from integration setup)
-
Row Data: Map formatted data to columns in order:
- Column A:
[[nodes.3562.timestamp]]
- Column B:
[[nodes.3562.full_name]]
- Column C:
[[nodes.3562.email]]
- Column D:
[[nodes.3562.company]]
- Column E:
[[nodes.3562.lead_score]]
Important: The order must match your sheet's column headers exactly.
Step 5: Set Up Conditional Routing
Hot Lead Condition node checks if the lead is high-priority:
-
Condition Type: Text comparison
-
Value to Check:
[[nodes.3561.content]]
-
Operator:
equals
-
Compare To:
HOT
-
True Path: Routes to Slack Hot Lead Alert and HubSpot
-
False Path: Routes to Warm Lead check
Warm Lead Condition node (for leads that aren't hot):
-
Condition Type: Text comparison
-
Value to Check:
[[nodes.3561.content]]
-
Operator:
equals
-
Compare To:
WARM
-
True Path: Routes to Slack Warm Lead notification
-
False Path: Routes to Slack Cold Lead notification
Step 6: Configure Slack Notifications
Slack Hot Lead Alert:
Slack Warm Lead:
Slack Cold Lead:
Step 7: Configure HubSpot Contact Creation
The Create HubSpot Contact node (triggered for hot leads):
-
Email:
[[nodes.3560.email]] (required field)
-
First Name:
[[nodes.3560.first_name]]
-
Last Name:
[[nodes.3560.last_name]]
-
Company:
[[nodes.3560.company]]
-
Phone:
[[nodes.3560.phone]]
-
Lead Status: Set to "Hot Lead" or custom property
-
Lifecycle Stage: Set to "Lead" or "Marketing Qualified Lead"
Optional: Add custom properties like lead_source, qualification_date, or ai_score.
Testing Your Agent
Running Your First Test
-
Activate the workflow by toggling it to "On" in the workflow editor
-
Submit a test lead through your form with data that should qualify as "HOT" (use a test email like
test+hot@yourdomain.com)
-
Monitor the execution in the TaskAGI dashboard under "Workflow Runs"
-
Check each integration:
- Verify the row appears in Google Sheets
- Confirm Slack notification in the correct channel
- Check HubSpot for the new contact
Verification Checklist
✓ Form Submission:
- Form accepts all required fields
- Submission timestamp is captured
- Data passes to AI qualification node
✓ AI Qualification:
- OpenAI returns HOT, WARM, or COLD
- Response time is under 5 seconds
- Classification matches your criteria
✓ Data Formatting:
- All fields are properly mapped
- No blank or undefined values
- Timestamps are in correct format
✓ Google Sheets:
- New row appears at the bottom
- All columns are populated correctly
- No data is truncated or malformed
✓ Conditional Logic:
- Hot leads trigger hot lead path
- Warm leads trigger warm lead path
- Cold leads trigger cold lead path
✓ Slack Notifications:
- Messages appear in correct channels
- Formatting is clean and readable
- @mentions work (if configured)
✓ HubSpot Integration:
- Contact is created (for hot leads)
- All properties are populated
- No duplicate contacts are created
Expected Results
For a HOT lead submission:
- Execution time: 8-12 seconds
- Google Sheets: New row added
- Slack: Message in #hot-leads with urgent formatting
- HubSpot: New contact created
- Status: All nodes show green checkmarks
For WARM or COLD leads:
- Similar execution time
- Google Sheets: New row added
- Slack: Message in appropriate channel
- HubSpot: No contact created (only hot leads)
- Status: All nodes show green checkmarks
Troubleshooting
Common Issues and Solutions
Problem: AI always returns the same classification
Solution:
- Check your prompt for clarity and specific criteria
- Reduce temperature to 0.1 for more consistent results
- Ensure form data is actually passing to the AI node (check data references)
- Add more context to your prompt about what makes a lead hot/warm/cold
Problem: Google Sheets shows "Permission Denied" error
Solution:
- Verify the Google account connected in TaskAGI has edit access to the sheet
- Check that the sheet URL is correct (copy from browser address bar)
- Re-authenticate the Google Sheets integration
- Ensure the sheet isn't protected or locked
Problem: Slack notifications not appearing
Solution:
- Verify TaskAGI app is added to the target channels (type
/invite @TaskAGI in the channel)
- Check channel names are spelled correctly (case-sensitive)
- Confirm Slack integration has proper permissions
- Test with a public channel first before using private channels
Problem: HubSpot contact creation fails
Solution:
- Verify email field is properly mapped (required field)
- Check for duplicate contacts (HubSpot may reject if email exists)
- Ensure API key has contact creation permissions
- Validate that property names match HubSpot's internal names exactly
Problem: Workflow doesn't trigger on form submission
Solution:
- Confirm workflow is activated (toggle is "On")
- Check form URL is correctly embedded or shared
- Test form submission directly from TaskAGI's form preview
- Review workflow logs for any error messages
Problem: Data references showing as "undefined"
Solution:
- Verify node IDs in data references match actual node IDs (check in workflow editor)
- Ensure upstream nodes completed successfully before downstream nodes execute
- Test each node individually to isolate where data is lost
- Check for typos in field names (case-sensitive)
Error Message Guide
-
"OpenAI API rate limit exceeded": You've hit your API usage limit. Upgrade your OpenAI plan or wait for the limit to reset.
-
"Invalid sheet URL": The Google Sheets URL format is incorrect. Use the full URL from your browser.
-
"Slack channel not found": Channel name is misspelled or TaskAGI doesn't have access. Invite the bot to the channel.
-
"HubSpot contact already exists": A contact with this email already exists. Consider using an "update or create" approach.
-
"Workflow execution timeout": A node took too long to respond. Check your internet connection and integration service status.
Next Steps
Immediate Actions After Setup
-
Run 5-10 test submissions with different lead profiles (hot, warm, cold) to ensure routing works correctly
-
Share the form URL with your marketing team to embed on landing pages, email campaigns, or social media
-
Train your sales team on the new Slack notification system and response expectations
-
Set up a weekly review of your Google Sheets lead log to identify trends and optimize qualification criteria
Optimization Suggestions
Refine AI Qualification Criteria:
- After 50-100 leads, review the AI's classifications in your Google Sheets
- Adjust your prompt to better match your ideal customer profile
- Add industry-specific keywords or disqualifiers
- Consider adding a "MEDIUM" category between warm and cold
Enhance Data Collection:
- Add custom form fields for budget, timeline, or