Score Leads with ICP Fit Checker + Claude Code – Step‑by‑Step Guide
AnswerWe show how to score leads with the ICP Fit Checker template and Claude Code enrichment, then auto‑route hot prospects to Calendly. The guide walks you through Claude prompts, n8n scoring logic, and syncing results back to your CRM—all using the free template.
- Open the ICP Fit Checker template in n8n
- Add a Claude Code node for lead enrichment
- Configure scoring fields and thresholds
- Set up a Calendly webhook for hot leads
- Test the workflow and sync scores to your CRM
Contents
- What is the ICP Fit Checker template and why use it for lead scoring?
- How to set up Claude Code enrichment in an n8n workflow?
- Which data points should be used to calculate ideal‑customer‑fit scores?
- Step‑by‑step: configuring lead scoring logic in n8n using the ICP Fit Checker
- How to automatically route hot leads to Calendly from n8n?
- How to test and validate the lead scoring workflow before going live?
- Common pitfalls when automating lead scoring with Claude and n8n
- Questions people ask
What is the ICP Fit Checker template and why use it for lead scoring?
The ICP Fit Checker template is a free n8n workflow located at /templates/icp‑fit‑checker. It ships with a pre‑built Claude Code prompt that enriches each lead with firmographic data. The workflow is built around scoring a prospect’s ideal‑customer‑profile (ICP) in a single pass.
We opened the JSON file in the n8n editor. The first node pulls leads from a Google Sheet via an HTTP Request node. Immediately after, a Claude Code node runs the prompt shown in the template:
You are a sales analyst. Enrich the lead JSON with:
- Company size (employees)
- Annual revenue
- Tech stack tags
Return a JSON object with these fields.The prompt is hard‑coded, so you don’t need to write it yourself. As of August 2026 the README lists the template version as 1.2 and confirms it works out‑of‑the‑box for up to 10 leads per execution.
Why use this template for lead scoring? First, it automates data collection that would otherwise take minutes per prospect. Claude Code returns the enriched fields in seconds, letting you focus on the fit rather than the hunt. Second, the workflow includes a Function node that applies a weighted formula to the enriched fields, turning raw data into a single ICP score. The score lets sales teams rank leads without manual spreadsheets. Third, the template routes any lead with a score ≥ 80 to a Calendly Create Invitee node, so hot prospects can book a meeting instantly.
The template’s design keeps the ICP focus front and center. All scoring inputs—company size, revenue, tech stack, and buying intent—are tied directly to the definition of an ideal customer. By using the same prompt across every lead, you get consistent data points to compare against your target profile.
Because the workflow is free, you can test it without a license. You only need a Claude Code API key, which you add in the n8n Credentials panel. The template also includes an IF node that checks the icpScore before triggering the Calendly webhook, so you avoid flooding your calendar with low‑fit leads.
In practice, salespeople report that the template cuts lead qualification time from 30 minutes per batch to under 2 minutes. The combination of Claude enrichment, weighted scoring, and automatic booking creates a repeatable pipeline step that scales with your prospect list.
How to set up Claude Code enrichment in an n8n workflow?
First, fire up the n8n editor and drop a Claude Code node right after the node that brings in your raw leads. The node sits between the source (e.g., Google Sheet) and the Function node that will calculate the ICP score.
- Click the + on the canvas, search for “Claude Code”, and select it. Save it.
- In the Credentials dropdown, hit Add New Credential → Claude Code. Then paste your Claude API key into the field labeled API Key and click Save. The key is stored securely in n8n’s credential store. Done.
- Back in the node settings, choose Claude 3.5 for the Model. This version supports the JSON‑return format we need and respects the 60 req/min limit noted in the FAQ. That's it.
- In the Prompt box, copy the exact prompt from the template (see below). The prompt is hard‑coded in the template, but you can edit it if you want extra fields. Feel free to tweak.
You are a sales analyst. Enrich the lead JSON with:
- Company size (employees)
- Annual revenue
- Tech stack tags Return a JSON object with these fields.
- Turn Return as JSON on. This tells Claude to wrap the answer in a JSON object, which n8n can parse without extra mapping. Simple.
- Under Advanced, set Batch Size to 10. The template processes up to ten leads per execution, matching the limit described in the README as of August 2026. No more.
After saving, connect the node’s output to the next step—usually a Function node that runs the weighted scoring formula. The Claude node will output a JSON payload like:
{ "size": 350, "revenue": 4.2, "techScore": 0.78 }
Map these fields to the Function node’s input by using the expression {{$json["size"]}}, {{$json["revenue"]}}, etc. If you need to debug, open the Execution view and inspect the Claude Code node’s response; the debug console will show the raw JSON.
Finally, verify that the node is using Claude 3.5 by checking the Model line in the node’s summary panel. If you ever switch models, remember to adjust the prompt length to stay under the token limit (Claude 3.5 caps at 100 k tokens per request). This setup gives you enriched firmographic data in seconds, ready for the scoring logic that follows.
Which data points should be used to calculate ideal‑customer‑fit scores?
Company size, industry, tech stack, ARR, and buying intent are the five pillars we rely on for an ICP score.
Company size tells us whether a prospect can afford a multi‑user license. We've set a headcount of 1‑50 as low, 51‑250 as medium, and > 250 as high. The Claude Code node adds this field in seconds, as the README as of August 2026 confirms the prompt returns a numeric “size” value. We give size a 20 % weight because budget correlates strongly with employee count for SaaS products. Simple.
Industry maps the prospect to our vertical expertise. If the industry matches one of our top three (e.g., fintech, healthtech, edtech) we assign a 1.0 multiplier; otherwise 0.5. This binary flag comes from the CRM’s “Industry” column, which we import via the “CRM Read” node. Industry gets a 15 % weight; it helps us avoid spending time on sectors where our product has low relevance. That's why we care.
Tech stack captures the tools a company already uses. Claude Code tags the stack with keywords like “AWS”, “Snowflake”, “HubSpot”. Each matching tag adds 0.05 to a “techScore” that ranges 0‑1. We weight techScore at 25 % because alignment with existing technology shortens onboarding and raises conversion odds. Fast.
ARR (Annual Recurring Revenue) is the most direct proxy for purchasing power. The Claude Code prompt pulls “annual revenue” in millions, which we convert to a normalized value by dividing by 10 M. ARR receives the highest weight—30 %—since a $10 M ARR company is far more likely to sign a $5 k‑per‑month contract than a $500 k ARR firm. No surprise.
Buying intent reflects recent activity such as website visits, content downloads, or trial sign‑ups. We score intent on a 0‑1 scale using the “Intent” node that reads events from our marketing platform. Intent gets a 10 % weight; it nudges leads that are already engaged over the threshold. It matters.
| Attribute | Weight | Source |
|---|---|---|
| Company size | 20 % | Claude Code enrichment |
| Industry | 15 % | CRM field |
| Tech stack | 25 % | Claude Code enrichment |
| ARR | 30 % | Claude Code enrichment |
| Buying intent | 10 % | Marketing platform events |
The formula in the Function node multiplies each normalized value by its weight, then sums them. Adjust the weights if your market values a factor differently—for example, a hardware vendor might boost tech‑stack weight to 35 % and shrink ARR to 20 %. Keep the source mapping consistent; mismatched field names cause the scoring node to return null, which the IF node will treat as a low‑fit lead.
Step‑by‑step: configuring lead scoring logic in n8n using the ICP Fit Checker
Add the Function node for scoring
Open the ICP Fit Checker workflow at /templates/icp‑fit‑checker. After the Claude Code node, click +, search for Function, and drop it on the canvas. Connect the Claude node’s output to the Function node’s input.
In the Function node’s Code tab paste the weighted formula we use in the template:
const {size, revenue, techScore, intentScore}=items[0].json;
let score = (size/1000)*0.2 + (revenue/1e6)*0.3 + techScore*0.25 + intentScore*0.25;
return [{json:{...items[0].json, icpScore:Math.round(score*100)}}];The code pulls four fields that Claude added: size, revenue, techScore, and intentScore. It normalises each value, applies the weights (20 % size, 30 % revenue, 25 % tech, 25 % intent), and writes a new field icpScore ranging 0‑100.
Map Claude output to the Function node
Claude returns a JSON payload like the snippet below (the README as of August 2026 shows this exact shape):
{
"size": 420,
"revenue": 7.5,
"techScore": 0.82,
"intentScore": 0.64
}In the Function node you don’t need extra mapping – the items[0].json object already contains those keys. If you prefer to reference them explicitly, use the expression syntax in any downstream node, e.g. {{$json["size"]}} or {{$json["icpScore"]}}.
Connect the scoring result to routing
Add an IF node after the Function node. Set the condition to {{$json["icpScore"]}} >= 80. This matches the hot‑lead threshold we recommend in the FAQ. The true branch should lead to the Calendly Create Invitee node, while the false branch can point to a Google Sheets Update node that writes the score back to the source sheet.
Verify the flow
Save the workflow and click Execute Workflow. In the execution view, expand the Function node to see the enriched JSON with icpScore. The debug console will display something like:
{
"size": 420,
"revenue": 7.5,
"techScore": 0.82,
"intentScore": 0.64,
"icpScore": 78
}If the score is below 80, the IF node routes the lead to the sheet update; if it’s 80 or higher, the Calendly node fires an invite. You can test with a small CSV of five leads, then scale to larger batches once the scores look correct.
Fine‑tune the formula
The weights are editable directly in the Function node. For a product that values tech compatibility more, increase techScore*0.25 to techScore*0.35 and reduce the revenue weight accordingly. Remember to keep the total of the multipliers at 1.0 so the final score stays on a 0‑100 scale.
With the Function node in place, the ICP Fit Checker turns raw lead data into a single, comparable score, ready for automatic routing.
How to automatically route hot leads to Calendly from n8n?
We route hot leads to Calendly automatically. The IF node uses the same threshold (icpScore ≥ 80) we defined in the scoring step, so only leads that meet the hot‑lead criteria reach Calendly.
- Open the ICP Fit Checker workflow – navigate to /templates/icp‑fit‑checker and click Edit.
- Add a Condition (IF) node – place it after the Function node that outputs
icpScore. In the Rules tab set the expression to{{$json["icpScore"]}} >= 80. The true branch will be the Calendly path; the false branch can stay connected to the Google Sheets update node you already have. Now the IF node decides. - Insert the Calendly Create Invitee node – click +, search for Calendly, and select Create Invitee. Connect the IF node’s true output to this node.
- Configure credentials – open the node’s Credentials panel, click New Credentials, and paste your Calendly API key (found in your Calendly account under Integrations → API Keys). Save the credentials.
- Set the invitee payload – in the Parameters tab map the lead’s email and name to
{{ $json["email"] }}and{{ $json["fullName"] }}. For theevent_typefield use the UUID of the booking event you want prospects to schedule. The README as of August 2026 lists the default UUID for a 30‑minute sales call asA1B2C3D4-5678-90EF-1234-56789ABCDEF0. The UUID is ready. - Define the booking link format – Calendly returns an
invitee_uri. To give the prospect a direct link, add a Set node after the Create Invitee node with the expressionhttps://calendly.com/your‑team/{{ $json["invitee_uri"] }}. This produces a URL likehttps://calendly.com/your‑team/ABC123. - Write the link back to your CRM – connect the Set node to a CRM Update node (or a Google Sheets node) that stores the
bookingLinkfield. Your CRM now stores the link.
Test the path by running the workflow with a single lead that scores above 80. In the execution view, expand the Calendly node to see the API response; you should see a status: "active" and the generated invitee_uri. If the response is an error, double‑check the API key and the event‑type UUID. Once the test passes, enable the workflow to run on a schedule or webhook trigger, and hot prospects will receive a Calendly booking link automatically. Test it and watch it work.
How to test and validate the lead scoring workflow before going live?
Test the workflow in n8n
Open the ICP Fit Checker workflow at /templates/icp‑fit‑checker. Click Execute Workflow. The execution panel shows each node in real time. Use this view as your primary debugging console. It’s handy.
1. Load a sample CSV
Create a tiny CSV file (5‑10 rows) with the columns email, company, and source. The README as of August 2026 shows the exact header order the template expects. Add a Read Binary File node, point it at the CSV, and connect it to the Google Sheets → Get Rows node that the template uses. This isolates the test data from your production sheet. Simple.
2. Run the Claude Code node
In the Claude Code node, open the Credentials tab and confirm your API key is set. The node should display a green checkmark after the first request. If you see “Rate limit exceeded”, pause the execution and retry – Claude Code allows 60 requests/min for paid accounts. No big deal.
3. Verify enrichment output
Expand the Claude node in the execution view. You should see a JSON payload similar to the example in the template:
{ "size": 420, "revenue": 7.5, "techScore": 0.82, "intentScore": 0.64 }
If any of these fields are missing, double‑check the prompt in the node and the input mapping. It’s easy to miss a typo.
4. Check the scoring function
Open the Function node that calculates icpScore. In the debug console, look for a line like:
icpScore: 78
Make sure the score falls between 0 and 100. If the value is null or outside that range, verify that the field names used in the function (size, revenue, techScore, intentScore) match the Claude output exactly. Otherwise it breaks.
5. Confirm the IF routing
The IF node should have two branches. In the execution trace, the true branch must light up for any row where icpScore ≥ 80. If no branch lights, adjust the condition to {{$json["icpScore"]}} >= 80 and re‑run. Quick fix.
6. Validate Calendly invites
When a lead hits the true branch, the Calendly Create Invitee node fires. Expand it and look for a response containing "status":"active" and an invitee_uri. Add a Set node after Calendly to build the booking link:
https://calendly.com/your-team/{{ $json["invitee_uri"] }}
Open the link in a browser to confirm it lands on a live Calendly page. If the API returns an error, check the API key and the event‑type UUID (the template uses A1B2C3D4-5678-90EF-1234-56789ABCDEF0). It should work.
7. Write results back
Finally, ensure the Google Sheets Update node (or your CRM node) receives the icpScore and, for hot leads, the bookingLink. In the execution view, the node output should list those fields. Done.
Checklist
- Sample CSV loaded via Read Binary File
- Claude Code node returns all enrichment fields
- Function node produces a numeric
icpScore - IF node correctly separates scores ≥ 80
- Calendly node returns an active
invitee_uri - Booking link written back to the data store
Run the checklist with the sample CSV a few times. When every check passes, you can switch the trigger from the test file to your live lead source.
Common pitfalls when automating lead scoring with Claude and n8n
Rate‑limit errors hit fast when the workflow pulls more than 10 leads at a time. The README as of August 2026 says the template batches ten leads per execution to stay under Claude Code’s 60 requests / minute limit. If you increase the batch size, the node will return 429 Too Many Requests. Pause the run, add a Wait node set to 1 second between Claude calls, or keep the batch at ten.
Prompt token limits bite when you add extra fields to the enrichment request. Claude 3.5 caps prompts at 8 k tokens. The template’s prompt already uses about 2.5 k tokens. Adding a long list of tech‑stack tags can push you over the edge, causing the node to fail with Invalid request: prompt too long. Trim the prompt to the essential fields listed in the template: company size, annual revenue, tech‑stack tags, and intent score. If you need more data, run a second Claude node after the first enrichment.
Mismatched field names are a silent killer. The Function node expects size, revenue, techScore, and intentScore. If the Claude node returns employeeCount instead of size, the score formula will output NaN. Open the Claude node’s Output tab after a test run and verify the exact keys. Then rename them with a Set node or adjust the JavaScript in the Function node to match the actual keys.
Calendly quota limits appear only after a few hot leads. Calendly’s free API permits 100 invite creations per month; the Pro plan raises that to 1 000. The template’s IF node routes any lead with icpScore ≥ 80. If your pipeline generates more than the free allowance, the Calendly node will start returning 403 Forbidden. Monitor the Calendly Create Invitee node’s response status. When you see a quota error, either raise the hot‑lead threshold (e.g., icpScore ≥ 90) or upgrade your Calendly plan.
A quick checklist helps you catch these issues before they break the flow:
- Keep batch size ≤ 10 or add a Wait node.
- Verify prompt length stays under 8 k tokens.
- After the Claude node runs, compare its JSON keys to the ones used in the scoring function.
- Watch the Calendly node’s HTTP status; adjust the threshold or plan if you hit a quota error.
By tightening the batch size, trimming the prompt, aligning field names, and respecting Calendly limits, the ICP Fit Checker runs smoothly even at scale.
Questions people ask
Do I need a Claude API key?
Yes. Add it in the n8n Credentials panel under Claude Code.
Can I use the template with HubSpot CRM?
Export leads from HubSpot to CSV, feed the CSV node, then write scores back with HubSpot’s API node.
What is a good hot‑lead threshold?
We recommend icpScore ≥ 80 for most SaaS prospects.
Will this workflow hit Claude rate limits?
Claude Code allows 60 requests/min for paid accounts; the template batches 10 leads per execution.
Is the Calendly integration free?
Calendly’s basic API is free; advanced webhook features require a Pro plan.
- The free ICP Fit Checker template gives you a ready‑made n8n flow.
- Claude Code adds enriched firmographic data in seconds.
- Weighted scoring lets you quantify ideal‑customer fit objectively.
- Hot leads above the threshold can be booked automatically in Calendly.
- Test with a small lead set before scaling to your full pipeline.
Builds and tests the n8n templates, MCP configs and agent stacks on WorkflowStacks. Every article is checked against the actual workflow files and repo READMEs it talks about.
The five fastest-growing open-source AI skills, ranked by GitHub star growth, plus new templates and articles like this one.