Small Business Lead Capture Automation Workflow
Why This Automation Matters
For small businesses, every lead is precious. Manual lead capture and follow-up processes often result in missed opportunities, delayed responses, and inconsistent communication. This automation workflow transforms your lead capture process by:
- Capturing leads from multiple sources - Web forms, social media, and landing pages
- Instant qualification and scoring - Automatically categorize leads based on predefined criteria
- Immediate response - Send personalized welcome emails within seconds
- CRM synchronization - Automatically add qualified leads to your customer database
- Nurture sequences - Trigger appropriate email campaigns based on lead type
- Team notifications - Alert sales team members about high-priority prospects
This workflow can increase lead conversion rates by 30-50% while reducing manual work by up to 80%.
What You Need Before Starting
Required Tools and Accounts
- n8n Cloud or self-hosted instance
- Google Sheets (for lead storage) or CRM like HubSpot/Airtable
- Email service provider (Mailchimp, SendGrid, or SMTP)
- Webhook-enabled lead sources (website forms, landing pages)
- Slack or Discord (optional, for team notifications)
Prerequisites
- Basic understanding of webhooks and API integrations
- Access to your website’s form configuration
- Email templates prepared for different lead types
- Lead scoring criteria defined (industry, company size, budget, etc.)
- Team notification preferences configured
Preparation Steps
- Set up lead capture forms with proper field validation
- Create email templates for welcome messages and nurture sequences
- Define lead scoring rules and qualification criteria
- Prepare your CRM or spreadsheet with appropriate columns
- Gather API keys for all integrated services
Complete Node-by-Node Build Instructions
Step 1: Set Up the Webhook Trigger
- Add a Webhook node as your starting point
- Configure the webhook settings:
- HTTP Method: POST
- Path:
/lead-capture - Response Mode: Respond Immediately
- Copy the webhook URL for later use in your forms
- Test the webhook by sending a sample payload
Step 2: Validate and Parse Lead Data
- Add a Code node after the webhook
- Name it “Validate Lead Data”
- Insert the following JavaScript code:
const requiredFields = ['email', 'name', 'source'];
const leadData = $input.first().json;
// Validate required fields
for (const field of requiredFields) {
if (!leadData[field]) {
throw new Error(`Missing required field: ${field}`);
}
}
// Clean and format data
const cleanedLead = {
email: leadData.email.toLowerCase().trim(),
name: leadData.name.trim(),
company: leadData.company || '',
phone: leadData.phone || '',
source: leadData.source,
timestamp: new Date().toISOString(),
leadId: `lead_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`
};
return { json: cleanedLead };
Step 3: Score and Qualify Leads
- Add another Code node named “Lead Scoring”
- Connect it to the validation node
- Add this scoring logic:
const lead = $input.first().json;
let score = 0;
let priority = 'low';
let category = 'general';
// Industry scoring
const highValueIndustries = ['technology', 'healthcare', 'finance'];
if (highValueIndustries.includes(lead.industry?.toLowerCase())) {
score += 20;
}
// Company size scoring
if (lead.companySize === 'enterprise') score += 25;
else if (lead.companySize === 'medium') score += 15;
else if (lead.companySize === 'small') score += 10;
// Source scoring
if (lead.source === 'organic-search') score += 15;
else if (lead.source === 'referral') score += 20;
else if (lead.source === 'paid-ads') score += 10;
// Budget indication
if (lead.budget && parseInt(lead.budget.replace(/\D/g, '')) > 10000) {
score += 30;
}
// Determine priority and category
if (score >= 50) {
priority = 'high';
category = 'sales-qualified';
} else if (score >= 30) {
priority = 'medium';
category = 'marketing-qualified';
}
const scoredLead = {
...lead,
score,
priority,
category,
scoredAt: new Date().toISOString()
};
return { json: scoredLead };
Step 4: Save Lead to Database
- Add a Google Sheets node (or your preferred CRM connector)
- Configure the connection:
- Operation: Append
- Document ID: Your lead tracking spreadsheet ID
- Sheet: Lead Database
- Map the following fields:
- Lead ID → Column A
- Name → Column B
- Email → Column C
- Company → Column D
- Phone → Column E
- Source → Column F
- Score → Column G
- Priority → Column H
- Category → Column I
- Timestamp → Column J
Step 5: Send Welcome Email
- Add an Email Send node or your email service provider node
- Configure the email settings:
- To:
{{$json.email}} - Subject:
Welcome {{$json.name}}! Thanks for your interest - Email Type: HTML
- To:
- Create a personalized email template:
<h2>Hi {{$json.name}},</h2>
<p>Thank you for your interest in our services! We're excited to help your business grow.</p>
<p><strong>What happens next?</strong></p>
<ul>
<li>We've recorded your information and assigned you lead ID: {{$json.leadId}}</li>
<li>You'll receive helpful resources via email over the next few days</li>
<li>A team member will reach out within 24 hours if you're a qualified prospect</li>
</ul>
<p>In the meantime, feel free to explore our <a href="https://yourwebsite.com/resources">resource center</a>.</p>
<p>Best regards,<br>Your Business Team</p>
Step 6: Route High-Priority Leads
- Add an IF node to create conditional logic
- Set the condition:
{{$json.priority}} equal high - Connect the TRUE branch to immediate sales notification
- Connect the FALSE branch to standard nurture sequence
Step 7: Notify Sales Team (High Priority)
- Add a Slack or Discord node on the TRUE branch
- Configure the notification:
- Channel: #sales-alerts
- Message:
🔥 HIGH PRIORITY LEAD ALERT 🔥
Name: {{$json.name}}
Email: {{$json.email}}
Company: {{$json.company}}
Score: {{$json.score}}
Source: {{$json.source}}
Lead ID: {{$json.leadId}}
Action required: Follow up within 2 hours!
Step 8: Trigger Nurture Campaign
- Add a Mailchimp or HTTP Request node on the FALSE branch
- Configure to add the lead to appropriate email sequence:
- Marketing Qualified Leads → “Nurture Sequence A”
- General Leads → “Nurture Sequence B”
- Set up the API call to trigger the email automation
Step 9: Log Activity
- Add a final Google Sheets node for activity logging
- Configure to append to “Activity Log” sheet:
- Timestamp
- Lead ID
- Action Taken
- Next Follow-up Date
- Assigned Team Member
Full Workflow JSON Code
{
"name": "Small Business Lead Capture Automation",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "lead-capture",
"options": {}
},
"name": "Lead Capture Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [240, 300],
"webhookId": "auto-generated"
},
{
"parameters": {
"jsCode": "const requiredFields = ['email', 'name', 'source'];\nconst leadData = $input.first().json;\n\n// Validate required fields\nfor (const field of requiredFields) {\n if (!leadData[field]) {\n throw new Error(`Missing required field: ${field}`);\n }\n}\n\n// Clean and format data\nconst cleanedLead = {\n email: leadData.email.toLowerCase().trim(),\n name: leadData.name.trim(),\n company: leadData.company || '',\n phone: leadData.phone || '',\n source: leadData.source,\n timestamp: new Date().toISOString(),\n leadId: `lead_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`\n};\n\nreturn { json: cleanedLead };"
},
"name": "Validate Lead Data",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [460, 300]
},
{
"parameters": {
"jsCode": "const lead = $input.first().json;\nlet score = 0;\nlet priority = 'low';\nlet category = 'general';\n\n// Industry scoring\nconst highValueIndustries = ['technology', 'healthcare', 'finance'];\nif (highValueIndustries.includes(lead.industry?.toLowerCase())) {\n score += 20;\n}\n\n// Company size scoring\nif (lead.companySize === 'enterprise') score += 25;\nelse if (lead.companySize === 'medium') score += 15;\nelse if (lead.companySize === 'small') score += 10;\n\n// Source scoring\nif (lead.source === 'organic-search') score += 15;\nelse if (lead.source === 'referral') score += 20;\nelse if (lead.source === 'paid-ads') score += 10;\n\n// Budget indication\nif (lead.budget && parseInt(lead.budget.replace(/\\D/g, '')) > 10000) {\n score += 30;\n}\n\n// Determine priority and category\nif (score >= 50) {\n priority = 'high';\n category = 'sales-qualified';\n} else if (score >= 30) {\n priority = 'medium';\n category = 'marketing-qualified';\n}\n\nconst scoredLead = {\n ...lead,\n score,\n priority,\n category,\n scoredAt: new Date().toISOString()\n};\n\nreturn { json: scoredLead };"
},
"name": "Lead Scoring",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [680, 300]
},
{
"parameters": {
"operation": "append",
"documentId": "YOUR_SPREADSHEET_ID",
"sheetName": "Lead Database",
"columnToMatchOn": "leadId",
"valuesToWrite": {
"leadId": "={{$json.leadId}}",
"name": "={{$json.name}}",
"email": "={{$json.email}}",
"company": "={{$json.company}}",
"phone": "={{$json.phone}}",
"source": "={{$json.source}}",
"score": "={{$json.score}}",
"priority": "={{$json.priority}}",
"category": "={{$json.category}}",
"timestamp": "={{$json.timestamp}}"
}
},
"name": "Save to Database",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 3,
"position": [900, 300]
},
{
"parameters": {
"fromEmail": "noreply@yourbusiness.com",
"toEmail": "={{$json.email}}",
"subject": "Welcome {{$json.name}}! Thanks for your interest",
"emailType": "html",
"message": "<h2>Hi {{$json.name}},</h2>\n<p>Thank you for your interest in our services! We're excited to help your business grow.</p>\n<p><strong>What happens next?</strong></p>\n<ul>\n <li>We've recorded your information and assigned you lead ID: {{$json.leadId}}</li>\n <li>You'll receive helpful resources via email over the next few days</li>\n <li>A team member will reach out within 24 hours if you're a qualified prospect</li>\n</ul>\n<p>In the meantime, feel free to explore our <a href=\"https://yourwebsite.com/resources\">resource center</a>.</p>\n<p>Best regards,<br>Your Business Team</p>"
},
"name": "Send Welcome Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2,
"position": [1120, 300]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json.priority}}",
"operation": "equal",
"value2": "high"
}
]
}
},
"name": "High Priority Check",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [1340, 300]
},
{
"parameters": {
"channel": "#sales-alerts",
"text": "🔥 HIGH PRIORITY LEAD ALERT 🔥\nName: {{$json.name}}\nEmail: {{$json.email}}\nCompany: {{$json.company}}\nScore: {{$json.score}}\nSource: {{$json.source}}\nLead ID: {{$json.leadId}}\n\nAction required: Follow up within 2 hours!",
"otherOptions": {}
},
"name": "Notify Sales Team",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [1560, 180]
},
{
"parameters": {
"list": "YOUR_MAILCHIMP_LIST_ID",
"email": "={{$json.email}}",
"mergeFields": {
"customFieldsUi": [
{
"name": "FNAME",
"value": "={{$json.name}}"
},
{
"name": "COMPANY",
"value": "={{$json.company}}"
},
{
"name": "LEADSCORE",
"value": "={{$json.score}}"
}
]
},
"options": {}
},
"name": "Add to Nurture Campaign",
"type