AutomationFlowsAI & RAG › Lead Scoring Pipeline

Lead Scoring Pipeline

Lead Scoring Pipeline. Uses agent, lmChatOpenAi, toolCode, toolHttpRequest. Webhook trigger; 5 nodes.

Webhook trigger★★☆☆☆ complexityAI-powered5 nodesAgentLm Chat Open AiTool CodeTool Http Request
AI & RAG Trigger: Webhook Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes

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": "Lead Scoring Pipeline",
  "id": "wf-002",
  "nodes": [
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "leads",
        "httpMethod": "POST",
        "authentication": "none"
      },
      "position": [
        200,
        300
      ]
    },
    {
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "parameters": {
        "agentType": "toolsAgent"
      },
      "position": [
        400,
        300
      ]
    },
    {
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "parameters": {
        "model": "gpt-4o-mini",
        "temperature": 0.3
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "position": [
        400,
        500
      ]
    },
    {
      "name": "Code Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCode",
      "parameters": {
        "code": "return { score: Math.random() * 100 }"
      },
      "position": [
        600,
        400
      ]
    },
    {
      "name": "HTTP Request Tool",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "parameters": {
        "url": "https://api.enrichment.example.com/lookup"
      },
      "position": [
        600,
        600
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 1
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

About this workflow

Lead Scoring Pipeline. Uses agent, lmChatOpenAi, toolCode, toolHttpRequest. Webhook trigger; 5 nodes.

Source: https://github.com/Trusera/ai-bom/blob/main/examples/demo-project/workflows/lead-scorer.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →