AutomationFlowsMarketing & Ads › Agency Lead Intake - Normalize, Validate, Score, Route

Agency Lead Intake - Normalize, Validate, Score, Route

Agency Lead Intake - Normalize, Validate, Score, Route. Webhook trigger; 4 nodes.

Webhook trigger★★★★☆ complexity4 nodes
Marketing & Ads Trigger: Webhook Nodes: 4 Complexity: ★★★★☆ Added:

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
{
  "name": "Agency Lead Intake - Normalize, Validate, Score, Route",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "agency-lead-triage-demo",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "3f47b60b-9ba7-4b31-a4d6-5a449d8dc151",
      "name": "Receive Lead"
    },
    {
      "parameters": {
        "jsCode": "const input = $json.body ?? $json;\nconst clean = (value) => typeof value === 'string' ? value.trim() : '';\nconst lead = { name: clean(input.name), email: clean(input.email).toLowerCase(), company: clean(input.company), teamSize: Number(input.teamSize) || 0, monthlyLeads: Number(input.monthlyLeads) || 0, pain: clean(input.pain) };\nconst errors = [];\nif (!lead.name) errors.push('name is required');\nif (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(lead.email)) errors.push('a valid email is required');\nif (errors.length) return [{ json: { ok: false, route: 'needs-correction', errors } }];\nlet score = 0;\nconst reasons = [];\nif (lead.company) { score += 15; reasons.push('company identified'); }\nif (lead.teamSize >= 2 && lead.teamSize <= 30) { score += 20; reasons.push('team matches initial customer profile'); }\nif (lead.monthlyLeads >= 50) { score += 25; reasons.push('lead volume makes response automation valuable'); }\nif (/manual|copy|spreadsheet|delay|wait|miss|duplicate|fail|break/i.test(lead.pain)) { score += 30; reasons.push('concrete automation pain detected'); }\nif (lead.pain.length >= 40) { score += 10; reasons.push('problem includes useful detail'); }\nreturn [{ json: { ok: true, lead, score, route: score >= 60 ? 'priority-review' : 'standard-review', reasons } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        260,
        0
      ],
      "id": "c32ce730-6042-40bc-817a-61129038162b",
      "name": "Validate and Triage"
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {
          "responseCode": 200
        }
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [
        520,
        0
      ],
      "id": "3e018dac-f93f-47c5-80e6-9b645c625693",
      "name": "Return Triage Result"
    },
    {
      "parameters": {
        "content": "## Safe demo boundary\nThis workflow validates and scores an inbound lead, then returns a route. It does not send messages or write to external systems. Client builds add approved destinations and credentials inside the client's n8n environment.",
        "height": 220,
        "width": 420
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -300
      ],
      "id": "25991903-8818-4d52-9910-4863c6c6764f",
      "name": "Demo Notes"
    }
  ],
  "connections": {
    "Receive Lead": {
      "main": [
        [
          {
            "node": "Validate and Triage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate and Triage": {
      "main": [
        [
          {
            "node": "Return Triage Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d5c4c901-e943-4763-8692-a18d2af4279c",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
Pro

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

About this workflow

Agency Lead Intake - Normalize, Validate, Score, Route. Webhook trigger; 4 nodes.

Source: https://github.com/workflowrepairdesk/n8n-workflow-reliability-proof/blob/main/lead-triage/n8n-lead-triage.workflow.json — 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

This workflow automates bulk email campaigns with built-in validation, deliverability protection, and smart send-time optimization.

HTTP Request, Postgres, Gmail
Marketing & Ads

Who is this for? Solo founders, sales teams, and event organizers who need email outreach without expensive tools but want full control from Telegram.

Telegram, Google Sheets, Google Sheets Trigger +2
Marketing & Ads

Universal Lead Processing Workflow. Uses googleSheets, gmail, httpRequest, gmailTrigger. Webhook trigger; 34 nodes.

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

This workflow turns Feishu bot messages into a human-in-the-loop short-video production pipeline, using Tavily for web search, DeepSeek for topic and script generation, Jimeng AI for text-to-video, an

HTTP Request
Marketing & Ads

This workflow is designed to manage the assignment and validation of unique QR code coupons within a lead generation system with SuiteCRM.

HTTP Request, Form Trigger, Google Sheets +1