AutomationFlowsMarketing & Ads › Lead Capture & CRM Automation

Lead Capture & CRM Automation

Lead Capture & CRM Automation. Uses slack, googleSheets, gmail. Webhook trigger; 14 nodes.

Webhook trigger★★★★☆ complexity14 nodesSlackGoogle SheetsGmail
Marketing & Ads Trigger: Webhook Nodes: 14 Complexity: ★★★★☆ Added:

This workflow follows the Gmail → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "lead-capture-automation-001",
  "name": "Lead Capture & CRM Automation",
  "nodes": [
    {
      "parameters": {
        "content": "## \ud83d\udce5 Intake\nWebsite contact form posts here. Normalizes raw form fields into a clean shape.",
        "height": 200,
        "width": 320,
        "color": 5
      },
      "id": "sticky-intake",
      "name": "Sticky Note - Intake",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        180,
        80
      ]
    },
    {
      "parameters": {
        "content": "## \ud83e\udde0 Score & Route\nScores the lead (budget mentioned, phone provided, urgency keywords) and routes hot leads to instant Slack alert.",
        "height": 220,
        "width": 360,
        "color": 4
      },
      "id": "sticky-score",
      "name": "Sticky Note - Score",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        900,
        60
      ]
    },
    {
      "parameters": {
        "content": "## \ud83d\udce4 Record & Confirm\nEvery valid lead lands in the CRM sheet and gets an instant confirmation email \u2014 no lead falls through the cracks.",
        "height": 200,
        "width": 340,
        "color": 3
      },
      "id": "sticky-record",
      "name": "Sticky Note - Record",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1620,
        360
      ]
    },
    {
      "parameters": {
        "path": "lead-capture",
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "node-webhook",
      "name": "Website Form Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        220,
        360
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "name",
              "type": "string",
              "value": "={{ $json.body.name }}"
            },
            {
              "id": "a2",
              "name": "email",
              "type": "string",
              "value": "={{ $json.body.email.toLowerCase().trim() }}"
            },
            {
              "id": "a3",
              "name": "phone",
              "type": "string",
              "value": "={{ $json.body.phone || '' }}"
            },
            {
              "id": "a4",
              "name": "message",
              "type": "string",
              "value": "={{ $json.body.message || '' }}"
            },
            {
              "id": "a5",
              "name": "source",
              "type": "string",
              "value": "={{ $json.body.source || 'website' }}"
            },
            {
              "id": "a6",
              "name": "submittedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            }
          ]
        }
      },
      "id": "node-normalize",
      "name": "Normalize Lead Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        360
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "cond-email",
              "leftValue": "={{ $json.email }}",
              "rightValue": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
              "operator": {
                "type": "string",
                "operation": "regex"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "node-if-valid-email",
      "name": "Valid Email?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        700,
        360
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"error\", \"message\": \"A valid email address is required.\" } }}",
        "options": {
          "responseCode": 400
        }
      },
      "id": "node-respond-invalid",
      "name": "Invalid Email Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        940,
        540
      ]
    },
    {
      "parameters": {
        "jsCode": "const lead = $input.first().json;\nlet score = 40;\nconst msg = (lead.message || '').toLowerCase();\nif (lead.phone) score += 20;\nif (/urgent|asap|this week|budget|ready to/.test(msg)) score += 25;\nif (/just looking|curious|maybe/.test(msg)) score -= 15;\nif (!/gmail|yahoo|hotmail|outlook/.test(lead.email)) score += 15;\nscore = Math.max(0, Math.min(100, score));\nconst tier = score >= 70 ? 'hot' : score >= 40 ? 'warm' : 'cold';\nreturn [{ json: { ...lead, leadScore: score, tier } }];"
      },
      "id": "node-score",
      "name": "Score Lead",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        940,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "cond-hot",
              "leftValue": "={{ $json.tier }}",
              "rightValue": "hot",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "node-if-hot",
      "name": "Hot Lead?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1180,
        300
      ]
    },
    {
      "parameters": {
        "channel": "#sales-leads",
        "text": "=\ud83d\udd25 *Hot lead just came in* ({{ $json.leadScore }}/100)\n*{{ $json.name }}* \u2014 {{ $json.email }}\n{{ $json.phone }}\n\"{{ $json.message }}\"",
        "otherOptions": {}
      },
      "id": "node-slack",
      "name": "Notify Sales (Hot Lead)",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        1420,
        180
      ]
    },
    {
      "parameters": {
        "mode": "chooseBranch",
        "output": "input1"
      },
      "id": "node-merge",
      "name": "Merge Branches",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1660,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "sheetName": "Leads",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Name": "={{ $json.name }}",
            "Email": "={{ $json.email }}",
            "Phone": "={{ $json.phone }}",
            "Message": "={{ $json.message }}",
            "Score": "={{ $json.leadScore }}",
            "Tier": "={{ $json.tier }}",
            "Source": "={{ $json.source }}",
            "Submitted At": "={{ $json.submittedAt }}"
          }
        }
      },
      "id": "node-sheets",
      "name": "Log Lead to CRM Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1900,
        300
      ]
    },
    {
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "subject": "Thanks for reaching out, {{ $json.name }}!",
        "message": "=Hi {{ $json.name }},\n\nThanks for getting in touch \u2014 we received your message and a member of our team will follow up within one business day.\n\nTalk soon,\nThe Team",
        "options": {}
      },
      "id": "node-email",
      "name": "Send Confirmation Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2140,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { \"status\": \"ok\", \"tier\": $json.tier, \"leadScore\": $json.leadScore } }}",
        "options": {}
      },
      "id": "node-respond-success",
      "name": "Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        2380,
        300
      ]
    }
  ],
  "connections": {
    "Website Form Webhook": {
      "main": [
        [
          {
            "node": "Normalize Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data": {
      "main": [
        [
          {
            "node": "Valid Email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Valid Email?": {
      "main": [
        [
          {
            "node": "Score Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Invalid Email Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Lead": {
      "main": [
        [
          {
            "node": "Hot Lead?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hot Lead?": {
      "main": [
        [
          {
            "node": "Notify Sales (Hot Lead)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Branches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Sales (Hot Lead)": {
      "main": [
        [
          {
            "node": "Merge Branches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Branches": {
      "main": [
        [
          {
            "node": "Log Lead to CRM Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Lead to CRM Sheet": {
      "main": [
        [
          {
            "node": "Send Confirmation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Confirmation Email": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Lead Capture & CRM Automation. Uses slack, googleSheets, gmail. Webhook trigger; 14 nodes.

Source: https://gist.github.com/Tebrean-Cosmin-Andrei/9631b7998ce7a7d2355a120ff3597cd8 — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Marketing & Ads

Ad agencies needing automated lead capture. Sales teams fighting fraud and scoring leads. B2B SaaS companies nurturing prospects. Marketing pros boosting sales pipelines. Captures leads via Webhook fr

HTTP Request, Google Sheets, Slack +2
Marketing & Ads

This workflow captures real estate property inquiries via a webhook, validates and normalizes lead details, upserts the lead into Google Sheets, sends an auto-reply through Gmail, and notifies your te

Google Sheets, Gmail, Slack +1
Marketing & Ads

This workflow captures real estate property inquiries via a webhook, saves the lead to Google Sheets, sends an auto-reply email through Gmail, and posts a notification to a Slack channel before return

Google Sheets, Gmail, Slack +1
Marketing & Ads

This workflow captures shoe-shopping leads via a Tally form webhook, matches products from Google Sheets, uses a local Llama model (Ollama HTTP API) to score the lead and draft recommendations, then e

Google Sheets, HTTP Request, Gmail +1
Marketing & Ads

Let's build this simple and high-value workflow. Here is a detailed, node-by-node explanation of how it works and how to set it up in n8n.

Slack, Google Sheets, Gmail