← Back to Directory
šŸ“Š

Lead Scoring Agent

Score and rank leads based on ICP fit, engagement signals, and company data

šŸ¤– 0 ↑ 0 ↓ Ā |Ā  šŸ‘¤ 0 ↑ 0 ↓
advancedā± 45 minutesšŸ”„ 11 swappable alternatives

šŸ§‚ Ingredients

šŸ”Œ APIs

prospect_data_title_company_seniority_contact_info

šŸ”„ Alternatives:

Zoominfo — Better for enterprise contactsClearbit — Better enrichment dataHunter Io — Email-focused, cheaper

company_research_for_buying_signals_hiring_funding_product_launches

šŸ”„ Alternatives:

Serpapi — Google results via API, structured dataGoogle Search — Direct Google search APIBing Search — Microsoft search with good API

scored_lead_list_and_historical_scoring_data

šŸ”„ Alternatives:

Airtable — Better for structured data + APINotion Databases — More flexible views

alert_sales_team_when_a_lead_scores_80

šŸ”„ Alternatives:

Discord — Free, great for communitiesTelegram — Simple bot API, no approval neededTeams — Enterprise/Office 365 integration

šŸ“‹ Step-by-Step Build Guide

STEP 1

Define scoring model

1. Define scoring model: ICP Fit (40%) + Company Signals (30%) + Engagement (20%) + Timing (10%)

Define scoring model: ICP Fit (40%) + Company Signals (30%) + Engagement (20%) + Timing (10%)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 2

ICP Fit scoring

2. ICP Fit scoring: title match (VP+ = 10, Director = 7, Manager = 4), company size, industry match, revenue range

ICP Fit scoring: title match (VP+ = 10, Director = 7, Manager = 4), company size, industry match, revenue range

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 3

Pull prospect batch from Apollo with ICP filters

3. Pull prospect batch from Apollo with ICP filters

Search for prospects using the Apollo API.

POST https://api.apollo.io/api/v1/mixed_people/search
Headers: x-api-key: {APOLLO_API_KEY}
Body: {
  "person_titles": ["{target_titles}"],
  "organization_num_employees_ranges": ["{size_range}"],
  "person_seniority": ["vp", "director", "c_suite"],
  "per_page": 25,
  "page": 1
}

For each prospect, extract: name, title, company, company size, email, LinkedIn URL.
Filter out prospects without email addresses.
Score ICP fit: title match (0-10), company size match (0-10), industry match (0-10).
Sort by composite score descending.
STEP 4

For each prospect, research their company

4. For each prospect, research their company: recent hiring (growing?), funding (cash to spend?), product launches (modernizing?)

For each prospect, research their company: recent hiring (growing?), funding (cash to spend?), product launches (modernizing?)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 5

Score company signals

5. Score company signals: recently funded (+10), hiring for your category (+8), new product launch (+6), leadership change (+5)

Use the GitHub API to fetch the relevant data.

GET https://api.github.com/repos/{owner}/{repo}/{endpoint}
Headers: Authorization: Bearer {GITHUB_TOKEN}, Accept: application/vnd.github.v3+json

Parse the response and extract the key fields.
Handle pagination if results exceed one page (check Link header).
Rate limit: GitHub allows 5,000 requests/hour with auth. If you get 403, check X-RateLimit-Remaining header.

Format the output concisely with the most important information first.
STEP 6

Calculate composite score (0

6. Calculate composite score (0-100) and rank all leads

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 7

Tier the list

7. Tier the list: Hot (80+), Warm (60-79), Nurture (40-59), Cold (<40)

Tier the list: Hot (80+), Warm (60-79), Nurture (40-59), Cold (<40)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

āš ļø IMPORTANT: The next step (Step 8: "Alert sales team in Slack for any Hot leads. Update the ranked list in Google Sh") requires human action. Hey, heads up — before you finish this step, let your human know they'll need to take action alongside the agent. Don't proceed to the next step until your human confirms they're ready.
STEP 8

Alert sales team in Slack for any Hot leads. Update the ranked list in Google Sh

8. Alert sales team in Slack for any Hot leads. Update the ranked list in Google Sheets weekly

Log data to Google Sheets using the Sheets API.

POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}:append?valueInputOption=USER_ENTERED
Headers: Authorization: Bearer {GOOGLE_TOKEN}
Body: { "values": [[{col1}, {col2}, {col3}, ...]] }

Format dates as YYYY-MM-DD, times as HH:MM, numbers without formatting.
Append new rows — don't overwrite existing data.
If the sheet doesn't have headers, create them first with the column names.

Verify the response shows updatedRows: 1.
STEP 9

Weekly

9. Weekly: scoring report — new leads scored, distribution by tier, top 10 leads with rationale

Compile the gathered data into a structured report.

Format as clean Markdown with:
- Title/date header
- Executive summary (2-3 sentences)
- Key metrics section with actual numbers
- Detailed sections with bullet points
- Action items or recommendations at the end

Keep it scannable — busy people read reports in 30 seconds.
Use emoji sparingly for visual anchors (šŸ“Š metrics, āœ… wins, āš ļø concerns, šŸ“‹ action items).
Include data comparisons: "X this period vs Y last period (↑Z%)"

If any data source was unavailable, note it clearly: "āš ļø [Source] data unavailable — excluded from this report."

šŸ¤– Example Agent Prompt

Define scoring model: ICP Fit (40%) + Company Signals (30%) + Engagement (20%) + Timing (10%)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

Copy this prompt into your agent to get started.