Lead Generation Automation With n8n and Claude: A Build Guide

Teams posting this job want leads captured, qualified and routed without anyone copying data between forms, inboxes and a CRM. Build it as one workflow in n8n, Make or Zapier: a form webhook, a Claude step that scores and classifies, a CRM write with duplicate checks, and human-approved replies. A first version takes roughly 35 to 55 hours including team coaching.
Key Takeaways
- Lead generation automation works best as one narrow pipeline: capture, dedupe, score, route, report.
- Claude should classify and draft. Deterministic nodes should decide, write and send.
- Most failures come from messy input and silent errors, not from the model.
- Plan for a first build of 35 to 55 hours, and budget time to coach the people who will own it.
- If you get fewer than a few dozen leads a month, a shared inbox and a good form beat automation.
What Clients Ask For

Clients who post this job rarely ask for one thing. The requests tend to bundle front-office chores that all touch the same lead record. If you want a partner to scope it with you, our AI automation consulting work starts from the same questions covered below, and the broader basics are in AI Automation for SMBs: What It Is and How to Start.
The requirements that recur across these postings:
- Intake forms and lead capture from website forms, ad lead forms, booking tools and sometimes a chat widget or phone line, all landing in one place.
- Email triage: sort the shared inbox into sales enquiries, support, vendors and noise, and draft first replies.
- Reporting: a weekly or daily summary of new leads, response times and pipeline movement, without someone building it by hand.
- An existing stack: n8n, Make or Zapier already chosen or half-built, Claude as the model, and a CRM that may be tidy or may be a spreadsheet.
- Team coaching: the people who inherit the workflow need to adjust prompts, read run logs and know when to stop it.
What They Actually Need

The stated problem is repetitive work. The real problem is usually that leads arrive through five doors, nobody owns the first response, and no single record shows where each lead came from or what happened to it. Automation that skips this and only speeds up the copying just moves the mess faster.
Ask these before building, because each answer changes the design:
1. Where do leads arrive today, and can each source call a webhook? Native form tools and most ad platforms can push data. A phone call or a PDF cannot, and those need a different capture step.
2. Which system is the record of truth, and which fields are mandatory? This decides the duplicate check and the field mapping. If the CRM has no clean owner field, routing has nothing to write to.
3. What does qualified mean, in the words of the person who closes? Claude can only apply criteria that exist on paper. A vague definition produces a confident but arbitrary score.
4. What may be sent without a human looking at it? This sets whether the workflow drafts replies or sends them. For most small teams the answer is draft only, at least at first.
5. Who owns the workflow after handover? If nobody on the team will open the run log, you need simpler logic and louder alerts.
The Build
The architecture is deliberately plain. Salesforce groups lead generation software into five purposes: CRM and lead management, prospecting and data enrichment, email marketing and automation, chatbots and website visitor tracking, and lead scoring and qualification. A small business does not need a tool in every category. This build covers capture, CRM, scoring and a light version of email automation.
| Component | Tool | What it does |
|---|---|---|
| Capture | Form tool or ad lead form posting to a webhook | Sends each new lead to the workflow as JSON |
| Orchestrator | n8n, Make or Zapier | Runs the steps in order, retries, and logs every run |
| Deduplication | CRM search step | Finds an existing contact by email before creating anything |
| Qualification | Claude via API | Returns a score, a category and a one-line reason as structured JSON |
| Routing | Switch or router step | Assigns an owner and a follow-up task from fixed rules |
| Record | CRM | Stores the lead, the score, the source and the reason |
| Email triage | Mailbox trigger plus Claude | Labels inbound mail and drafts replies for approval |
| Reporting | Scheduled workflow plus Claude | Pulls CRM numbers and writes a short summary email |
| Alerts | Error workflow to email or chat | Tells a human when anything fails |
Data moves in one direction. A form submission hits the webhook, the workflow normalises the fields, searches the CRM for the email, and either updates the existing contact or creates a new one. Claude then reads the message and company fields and returns JSON. A router applies fixed rules to that JSON, and the CRM record and a task are written. Anything Claude marks uncertain goes to a human queue instead of a rule.
You do not need to start from zero. n8n's template library lists more than 1,000 lead generation templates, including a secure web form to CRM lead creation flow with UTM tracking. Treat templates as a parts bin. They rarely include your duplicate rules or error handling. Make describes three levels of sales automation on one canvas: plain automated workflows, AI-enhanced steps that enrich leads, and AI agents that research inbound leads. This build sits at the second level on purpose. For the autonomy question, see Autonomous AI Agents: What Autonomy Really Means in Business.
How to Build It, Step by Step
These steps use n8n node names. Make and Zapier have direct equivalents for each.
Step 1: Fix the lead schema before opening the tool
Write down the fields every lead must have: name, email, company, message, source, UTM source, UTM campaign and received_at. Add the same fields as custom properties in the CRM first. When this works, a test lead created by hand in the CRM shows every field filled and nothing stored as free text that should be a dropdown.
Step 2: Create the capture webhook
Add a Webhook node with HTTP Method set to POST and a path you can recognise, such as lead-intake. Set Respond to Immediately so the form does not time out while Claude runs. Use the Test URL while building, then the Production URL once the workflow is Active. Submit the real form once. You should see the payload appear in the node's output with every field from Step 1, and a missing field here means a form mapping problem, not a workflow problem.
Step 3: Normalise and deduplicate
Add an Edit Fields (Set) node that lowercases the email, trims whitespace and renames form fields to your schema. Then add the CRM's search operation with the email as the key. Follow it with an IF node: if a contact exists, route to update; if not, route to create. Submit the same test lead twice. When it works, the second run updates the existing record and the CRM shows one contact, not two.
Step 4: Add the Claude scoring step
Use the HTTP Request node against Anthropic's Messages API, or the native Anthropic node if your n8n version includes it. Send the key in the x-api-key header, the anthropic-version header as documented by Anthropic, and a JSON body with your chosen model, a low max_tokens and a single user message. Put your qualification criteria in the system prompt in plain language and ask for JSON only, with the keys score (1 to 5), category, reason and confidence. Keep temperature low for classification. In the next Code node, parse the reply inside a try block. When it works, five varied test leads return valid JSON, and a nonsense message returns a low confidence value, not an invented score.
Step 5: Route and write to the CRM
Add a Switch node on the score and confidence fields. High score with high confidence assigns the named owner and creates a same-day follow-up task. Medium goes to a nurture list. Low confidence goes to a review queue that a person checks daily. Write the reason string into a CRM note so the salesperson sees why the lead was scored that way. The check is simple: open three test contacts and confirm the owner, task and note are all present.
Step 6: Add email triage with drafts only
Add a mailbox trigger node on the shared inbox, polling at a short interval. Send the subject and body to Claude with a fixed list of categories: sales enquiry, support, vendor, internal, spam. Apply the label from the result. For sales enquiries only, ask Claude for a draft reply and save it as a draft in the mailbox, never as a sent message. When it works, a test enquiry appears labelled, with a draft waiting. For how far to push this toward support, see AI Customer Service Agents: Deflection, Handoff, Cost, Rollout.
Step 7: Build the weekly report
Create a second workflow with a Schedule Trigger set to a weekday morning in the owner's time zone. Query the CRM for the past seven days: new leads by source, response time, and stage changes. Do the arithmetic in a Code node, not in the model, then pass the finished numbers to Claude only to write three short paragraphs. Send it by email. When it works, the numbers in the email match a manual CRM count for the same week.
Step 8: Add error handling and test with ugly data
Create a separate workflow that starts with an Error Trigger node and sends the failing workflow name and execution link to a person. In the main workflow's settings, point Error Workflow at it. On the Claude and CRM nodes, open Settings and turn on Retry On Fail with a small Max Tries and a pause between attempts. Then break things on purpose: an empty message, a 5,000-word message, an email with capital letters, a duplicate, and a revoked API key. Each should end in a handled outcome or an alert, never a silent stop.
Step 9: Coach the team
Schedule two short sessions. In the first, walk through one lead end to end in the run log, and show how to pin a failed execution and re-run it. In the second, let them edit the scoring prompt on a copy of the workflow and compare results on ten saved leads. Leave a one-page runbook covering what to check when leads stop arriving, who to call, and how to switch the workflow off. People trust the system when they have seen it fail safely.
Where These Builds Break
- Duplicates and bad matches. The same person submits twice with different capitalisation or a work and personal email. Fix: lowercase and trim before searching, and match on email plus a second field such as company domain before creating anything.
- Claude returns text instead of clean JSON. A stray sentence before the braces crashes the parser. Fix: state the format in the system prompt, parse defensively, and route parse failures to the review queue rather than dropping the lead.
- Silent webhook failures. A form edit renames a field, the mapping returns empty values, and the CRM fills with blank contacts. Fix: add an IF check that email is present and valid, and alert on any run that fails it.
- Auto-replies that sound wrong. A drafted answer promises something the business does not offer. Fix: keep replies as drafts, give Claude a short list of approved facts, and tell it to say it will check when unsure.
- Credentials and quotas expire. A rotated key or a Google token that lapses stops the flow overnight. Fix: record which credentials each workflow uses, set a calendar reminder to review them, and keep the error workflow active so failure is loud.
Time and Cost
These are realistic hours for a first build by someone who has done it before. A team doing it for the first time should expect more.
| Work package | Hours |
|---|---|
| Scoping, schema and CRM fields | 4 to 6 |
| Capture, dedupe and CRM write | 6 to 10 |
| Claude scoring and routing | 6 to 10 |
| Email triage with drafts | 8 to 12 |
| Weekly report | 4 to 6 |
| Error handling and testing | 6 to 10 |
| Team coaching and runbook | 4 to 8 |
That adds up to roughly 35 to 55 hours once you allow for overlap. Capture plus scoring alone is closer to 15 to 25 hours.
Plan tiers. You need an orchestrator plan that allows webhooks, scheduled runs and error workflows, a CRM plan that exposes an API, and an Anthropic API account. Pricing varies by plan and changes, so check each vendor's current page. Make and Zapier typically bill by usage, while n8n can be self-hosted or run in its cloud, which shifts cost toward hosting and upkeep. Open-Source AI Agents vs SaaS: Cost, Control and Upkeep covers that trade-off.
Running costs. Expect three lines: the orchestrator plan, model usage that scales with lead and email volume, and a few hours a month of upkeep. Scoring a short lead message is a small API call, so for most SMBs the model is the cheapest line and the human review time is the largest.
What changes the estimate: the number of lead sources, a messy CRM that needs cleanup first, custom routing rules, how many mailbox categories you need, and whether the team wants approval steps in chat. For a wider view of which processes to automate first, see Business Automation Process: Identify, Prioritise, Automate.
When Not to Build This
- Low volume. If leads arrive at a handful a week, a good form, a notification and a templated reply cost almost nothing and break less. Automate when response delays or copy errors start costing deals.
- No agreed definition of a good lead. If sales and marketing disagree, Claude will encode the disagreement. Settle the criteria first, even on a single page.
- A messy CRM with no owner. Automating writes into a database nobody trusts multiplies the damage. Clean the fields and name an owner before connecting anything.
Can ChatGPT Do Lead Generation Automation?
A chat model can classify a lead, write a first reply and summarise a pipeline. It cannot, on its own, watch a form, search your CRM, create a record or run every morning. That is the job of the orchestrator. Claude, ChatGPT or another model sits inside one step of the workflow, and the build above works the same way with any of them. The model choice matters less than the schema, the duplicate check and the error handling around it.
Is Lead Generation Illegal?
Generating leads is not illegal in itself. The risk is in how you contact people. Rules on consent for marketing email, text messages and calls differ by country and state, and they apply to automated sends as well as manual ones. Keep a record of where each lead came from and what they agreed to, include opt-out handling, and take legal advice for your markets before automating outbound messages. This is general information, not legal advice.
Ready to Scope Yours?
If you would rather have a senior builder map your sources, CRM and approval rules before any workflow is built, our AI automation consulting team can do that scoping and then hand over a system your team is confident running.
---
About Lets Viz: Lets Viz is an AI, CRM, automation and BI consultancy that has delivered analytics and automation projects since 2020 for small and mid-market teams across professional services, software, e-commerce, manufacturing and logistics. We hold a 5.0 Clutch rating, and we build workflows that ordinary teams can run, read and fix themselves.
Sources
- n8n lead generation workflow templates
- Make: AI sales automation
- Salesforce: best lead generation tools guide
Facts and prices checked November 2026.


