Introduction: From Reading About AI Scoring to Actually Having It Running
You've read about AI lead scoring. Maybe you've even read articles explaining why you need it.
This isn't another explainer.
This is the step-by-step build guide showing you:
Which free accounts to create (with direct links)
The exact workflow configuration in Activepieces
The LLM prompt that scores leads accurately
How to connect it all to HubSpot without code
Time investment: 3-4 hours this weekend
Technical skill needed: If you can copy/paste and follow screenshots, you're ready
Cost: $0 until you process 1,000+ leads/month
The Free Tool Stack (Why These Specific Tools)
Tool | Specific Role in Your System | Why This One |
|---|---|---|
Activepieces | Workflow orchestration + AI steps | Native LLM integration, 1,000 free tasks/month |
HubSpot CRM | Lead database + final routing | Best free CRM, unlimited contacts |
OpenRouter | Free LLM access | Aggregates free models (Llama 3.1, Mistral) |
Make.com (alternative) | Visual workflow builder | Use if you prefer Make's interface |
Key decision: Activepieces vs Make?
Choose Activepieces if you want built-in AI steps (easier)
Choose Make if you're already using it for other workflows
This guide uses Activepieces as primary, with Make alternatives noted.
Understanding the System You're Building (5-Minute Overview)
Input: Lead submits form → Name, Email, Company, Message
Process:
Webhook receives data
Optional: Enrich with company info
LLM analyzes fit + intent
Returns JSON:
{score: 8, route: "book_call", confidence: "high"}System routes based on score
Output:
Score 8-10 → Email with calendar link
Score 5-7 → Add to nurture in HubSpot
Score 0-4 → Tag as "low-fit" for later review
Step 1 — Set Up Your Free Accounts (15 Minutes)
Account Creation Checklist:
HubSpot CRM (Free Forever Plan)
Go to hubspot.com/products/crm
Click "Get started free"
Complete signup
Navigate to Settings → Properties → Create custom property:
ai_lead_score(number field)
Activepieces
Visit activepieces.com
Sign up for free account
Verify email
You get 1,000 tasks/month free tier
OpenRouter (Free LLM Access)
Go to openrouter.ai
Create account
Navigate to Keys → Generate API key
Copy key (you'll paste this into Activepieces)
Check "Free Models" tab - note
z-ai/glm-4.5-air:free
Step 2 — Create Your Lead Capture Form in HubSpot
HubSpot forms feed directly into your automation:
HubSpot → Marketing → Forms → Create form
Add fields:
First Name (required)
Last Name (required)
Email (required)
Company Name (required)
Job Title (required)
Message/How can we help? (long text)
Company Size (dropdown: 1-10, 11-50, 51-200, 201+)
Timeline (dropdown: Urgent, 1-3 months, 3-6 months, Just researching)
Form Settings:
Thank you message: "Thanks! We'll review and respond within 24 hours."
Notification: Turn OFF (automation will handle routing)
Embed on site or use HubSpot's hosted page
Key setup: Go to Settings → Integrations → Private Apps → Create app → Give API access to contacts (read/write)
Step 3 — Build the Scoring Workflow in Activepieces
Creating Your First Flow:
In Activepieces Dashboard:
Click "Create Flow" → Name it "AI Lead Scorer"
Trigger: HubSpot - New Contact
Connect your HubSpot account
Select trigger: "Contact Created"
Test connection
Test by submitting data through the form
Step 2: HTTP Request to OpenRouter
Add step → HTTP Request
Method: POST
URL:
https://openrouter.ai/api/v1/chat/completionsHeaders:
Authorization: Bearer YOUR_OPENROUTER_API_KEY
Content-Type: application/jsonBody (copy this exactly, then customize):
json
{
"model": "z-ai/glm-4.5-air:free",
"messages": [
{
"role": "system",
"content": "You are a lead scoring AI. Analyze leads and return JSON with: score (0-10), route (book_call/nurture/archive), confidence (high/medium/low), reasoning (brief explanation). Score based on: company size fit, role seniority, timeline urgency, message intent quality."
},
{
"role": "user",
"content": "Score this lead:\nName: {{trigger.properties.firstname}} {{trigger.properties.lastname}}\nEmail: {{trigger.properties.email}}\nCompany: {{trigger.properties.company}}\nRole: {{trigger.properties.jobtitle}}\nCompany Size: {{trigger.properties.company_size}}\nTimeline: {{trigger.properties.timeline}}\nMessage: {{trigger.message}}"
}
],
"response_format": { "type": "json_object" }
}Step 3: Parse JSON Response
Add step → Code (it's JavaScript)
Code:
javascript
module.exports = {
code: async (inputs) => {
const response = JSON.parse(
inputs.aiResponse.choices[0].message.content
);
return {
score: response.score,
route: response.route,
confidence: response.confidence,
reasoning: response.reasoning
};
}
};
Step 4: Router - Branch by Score
Add Router step
Create 3 branches:
Branch A: If
score >= 8Branch B: If
score >= 5 AND score < 8Branch C: If
score < 5
7. Step 4 — Configure Routing Actions for Each Score Range
Branch A: High Score (8-10) → Book Call
Add HubSpot Action:
Action: Update Contact
Contact ID:
{{trigger.id}}Properties to update:
ai_lead_score:{{parseJson.score}}lifecyclestage:marketingqualifiedleadlead_status:New
Add Gmail/Email Action:
To:
{{trigger.email}}Subject:
Quick question about {{trigger.company}}Body: Hi {{trigger.firstname}},
Thanks for reaching out! Based on what you shared, I think we could be a great fit.
Would you be open to a quick 15-minute call this week? Grab a time here: [YOUR_CALENDLY_LINK]
Best, [Your Name]
Branch B: Medium Score (5-7) → Nurture Sequence
Add HubSpot Action:
Action: Add to Workflow
Workflow: "Nurture Sequence" (create this in HubSpot as 3-5 email drip)
Update properties:
ai_lead_score:{{parseJson.score}}lead_status:Nurture
Branch C: Low Score (0-4) → Archive
Add HubSpot Action:
Update properties:
ai_lead_score:{{parseJson.score}}lead_status:Not a Fiths_lead_status:Unqualified
Optional: Send polite rejection
"Thanks for your interest. Based on [reasoning], we might not be the best fit right now. Here are some resources that might help: [link to blog/guides]"
Step 5 — Test Your System With Real Data
Testing Checklist:
Submit a test lead through your HubSpot form:
Use your own email
Fill as "high-fit" lead: Founder role, 11-50 company, "Urgent" timeline, specific message
Watch Activepieces execution log:
Go to Runs tab
Click on the triggered flow
Verify each step executed
Check LLM response JSON
Verify HubSpot updates:
Open contact in HubSpot
Check
ai_lead_scorefield populatedVerify lead status updated
Confirm you received routing email
Test edge cases:
Submit "low-fit" lead (just researching, junior role)
Submit "medium-fit" lead
Verify each routes correctly
The LLM Prompt That Actually Works (Copy This)
The prompt in Step 6 works because it:
Specifies output format (JSON with exact fields)
Defines scoring criteria (fit + intent signals)
Requests reasoning (helps you debug/improve)
Prompt Customization Tips:
If you're B2B SaaS: Add to system prompt: "Prioritize leads from tech companies, CTOs/VPs, with budget mentions."
If you're agency: Add: "Score higher if message includes specific project details, realistic timeline, mentions referral."
If you're selling to enterprises: Add: "Require company size 200+, C-level or VP roles. Discount small businesses."
Logging Decisions for Continuous Improvement
Track Scoring Accuracy:
Create a Google Sheet tracker (optional but recommended):
Add Activepieces step after scoring:
Action: Google Sheets - Add Row
Spreadsheet: "Lead Scoring Log"
Columns: Date, Name, Email, Company, Score, Route, Confidence, Reasoning
Weekly review process:
Filter leads you manually followed up with
Compare AI score vs your assessment
Note patterns where AI was wrong
Refine prompt based on mismatches
Handling Edge Cases & Low-Confidence Scores
Fallback Logic:
Add this to your Router:
If
confidence == "low"→ Route to manual review regardless of scoreCreate HubSpot task: "Review ambiguous lead - AI confidence low"
Assign to yourself
Include AI reasoning in task notes
Common low-confidence scenarios:
Generic messages ("just checking it out")
Missing key fields (no company size)
Mixed signals (senior role but "just researching")
Solution: Build a 4th branch specifically for low-confidence → Human review queue
Free Tier Limits & How to Stay Under Them
Monthly Capacity on $0 Budget:
Tool | Free Limit | Estimated Leads |
|---|---|---|
Activepieces | 1,000 tasks | ~200 leads (5 steps per lead) |
HubSpot | Unlimited contacts | Unlimited |
OpenRouter free models | Rate-limited | ~500 requests/day |
Cost Control Tactics:
1. Prevent duplicate scoring:
Add filter in Activepieces: Only trigger if
ai_lead_scoreis emptyCode check:
javascript
if (inputs.trigger.ai_lead_score) {
return { skip: true };
}2. Batch low-priority leads:
Score urgent leads immediately
Batch-process "just researching" leads once daily
3. Cache enrichment data:
If using company enrichment, store results in HubSpot custom field
Don't re-enrich same domain
Weekend Implementation Checklist
Saturday Morning (2 hours):
Create HubSpot, Activepieces, OpenRouter accounts
Build HubSpot form with required fields
Create custom property
ai_lead_scorein HubSpotGet OpenRouter API key
Saturday Afternoon (2 hours):
Build Activepieces flow: Trigger → LLM call → Parse JSON → Router
Configure 3 routing branches (book/nurture/archive)
Connect HubSpot actions to each branch
Set up email templates
Sunday (1 hour):
Submit 5 test leads (varied fit levels)
Verify each routes correctly
Check HubSpot updates
Confirm emails sent
Sunday Evening (30 min):
Turn on live
Monitor first real leads
Document any issues
What to Do When You Outgrow Free Tiers
Signs you need to upgrade:
Processing 200+ leads/month (Activepieces limit approaching)
Need faster LLM responses (free models have rate limits)
Want advanced enrichment (company funding, tech stack)
Upgrade path:
Month 1-3: Stay on free tiers, optimize prompt
Month 4-6: Add paid enrichment ($50/mo Clearbit/Apollo)
Month 7+: Upgrade Activepieces ($15/mo) or switch to paid LLM (GPT-4 for complex scoring)
When to hire vs automate more:
If scoring 500+ qualified leads/month → Hire SDR, use system for pre-qualification only
If scoring mostly unqualified → Keep automation, improve top-of-funnel
Next Steps: Make It Yours
This week:
Build the system following steps 4-7
Test with 10 real leads
Adjust prompt based on results
Next week:
Add enrichment (company data from Seamless.AI free tier)
Create nurture sequences in HubSpot
Track which routed leads convert
This month:
Review 50 scored leads
Calculate time saved vs manual qualification
Refine ICP criteria in LLM prompt
You now have the exact blueprint. The only thing between you and an AI sales system is a weekend of setup.