AutomationFlowsAI & RAG › Lead Qualification Agent

Lead Qualification Agent

Lead Qualification Agent. Uses httpRequest. Event-driven trigger; 5 nodes.

Event trigger★★★★☆ complexity5 nodesHTTP Request
AI & RAG Trigger: Event Nodes: 5 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": "Lead Qualification Agent",
  "nodes": [
    {
      "parameters": {},
      "id": "a318f4ea-5255-4822-aef3-e48c61361448",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        220,
        320
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "agent_slug",
              "value": "lead-qualification-agent"
            },
            {
              "name": "agent_title",
              "value": "Lead Qualification Agent"
            },
            {
              "name": "agent_description",
              "value": "Qualifiziert neue Leads, bewertet Kaufwahrscheinlichkeit und priorisiert CRM-Follow-ups."
            },
            {
              "name": "system_prompt",
              "value": "Du bist ein hochspezialisierter Business-Agent. Arbeite pr\u00e4zise, strukturiert, umsetzungsorientiert und ohne Halluzinationen. Nutze ausschlie\u00dflich die bereitgestellten Eingaben. Wenn Daten fehlen oder unsicher sind, markiere sie explizit als offen. Antworte standardm\u00e4\u00dfig auf Deutsch, au\u00dfer die Eingabe verlangt etwas anderes. Liefere Ergebnisse so, dass ein Team sie direkt weiterverwenden kann.\n\nRolle: Lead Qualification Agent. Aufgabe: Qualifiziert neue Leads, bewertet Kaufwahrscheinlichkeit und priorisiert CRM-Follow-ups. Arbeite immer in diesem Output-Rahmen: ICP Fit Score (0-100), Lead Temperature, Priority, Why this lead matters, Risks / Missing data, Next best action, CRM summary."
            },
            {
              "name": "task",
              "value": "Analysiere den neuen Inbound-Lead und bewerte Abschlusschance, Fit und Dringlichkeit."
            },
            {
              "name": "goal",
              "value": "Eine klare Priorisierung f\u00fcr Vertrieb und CRM erzeugen."
            },
            {
              "name": "context",
              "value": "B2B KI-Agentur in DACH. Fokus auf Unternehmen mit Bedarf an Automatisierung, AI Agents oder Prozessdigitalisierung."
            },
            {
              "name": "input_data",
              "value": "{\n  \"lead_name\": \"Anna Huber\",\n  \"company\": \"Huber Logistics GmbH\",\n  \"industry\": \"Logistik\",\n  \"employees\": 85,\n  \"country\": \"Austria\",\n  \"website\": \"https://example-logistics.at\",\n  \"source\": \"Website Anfrage\",\n  \"budget_signal\": \"10k-25k EUR\",\n  \"pain_points\": [\n    \"zu viele manuelle Supportanfragen\",\n    \"keine AI-gest\u00fctzte Lead-Vorqualifizierung\",\n    \"hoher Aufwand im Backoffice\"\n  ],\n  \"requested_solution\": \"AI Kundenservice Agent + CRM Automatisierung\",\n  \"timeline\": \"innerhalb von 30 Tagen\",\n  \"decision_maker\": \"COO\",\n  \"email_quality\": \"business email\",\n  \"intent_signals\": [\n    \"konkrete Anfrage\",\n    \"klarer Use Case\",\n    \"Budget-Hinweis vorhanden\"\n  ]\n}"
            },
            {
              "name": "output_format",
              "value": "Markdown mit klaren \u00dcberschriften und Bulletpoints"
            },
            {
              "name": "output_schema",
              "value": "\n- ICP Fit Score (0-100)\n- Lead Temperature\n- Priority\n- Why this lead matters\n- Risks / Missing data\n- Next best action\n- CRM summary"
            },
            {
              "name": "extra_rules",
              "value": "Bewerte streng. Erfinde keine Firmendaten. Gib konkrete Sales-Empfehlungen in Deutsch."
            },
            {
              "name": "sample_customer_value",
              "value": "Dieser Agent bewertet neue Leads und erzeugt eine CRM-fertige Priorisierung."
            }
          ]
        }
      },
      "id": "889d329e-13c2-46b5-9e52-f16f01110861",
      "name": "Set Agent Input",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        480,
        320
      ]
    },
    {
      "parameters": {
        "jsCode": "const user_message = `Aufgabe: ${$json.task}\n\nZiel: ${$json.goal}\n\nKontext: ${$json.context}\n\nEingabedaten (JSON oder Text):\n${$json.input_data}\n\nErwartete Ausgabebausteine:\n${$json.output_schema}\n\nZusatzregeln:\n${$json.extra_rules}`;\n\nreturn [{\n  json: {\n    ...$json,\n    user_message,\n    import_note: 'Nach dem Import nur OPENAI_API_KEY bzw. HTTP Credential und optional OPENAI_MODEL anpassen.'\n  }\n}];"
      },
      "id": "2076e137-cf0d-4ae5-bca8-de390857cd31",
      "name": "Build Prompt",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        760,
        320
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/responses",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{$env.OPENAI_API_KEY}}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: $env.OPENAI_MODEL || 'gpt-4.1', instructions: $json.system_prompt, input: $json.user_message }) }}",
        "options": {}
      },
      "id": "8fa63c89-0f00-4367-84b0-d68702c52890",
      "name": "Call OpenAI Responses API",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1040,
        320
      ]
    },
    {
      "parameters": {
        "jsCode": "const body = $json;\n                let text = '';\n                if (Array.isArray(body.output)) {\n                  for (const item of body.output) {\n                    if (Array.isArray(item.content)) {\n                      for (const c of item.content) {\n                        if (c.type === 'output_text' && c.text) text += c.text + '\n';\n                      }\n                    }\n                  }\n                }\n                return [{\n                  json: {\n                    agent: $('Set Agent Input').first().json.agent_title,\n                    result: text.trim(),\n                    raw_response: body\n                  }\n                }];"
      },
      "id": "3a93671d-2dbd-460e-94ee-66f30d9fdcf7",
      "name": "Extract Result",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1300,
        320
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set Agent Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Agent Input": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Call OpenAI Responses API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call OpenAI Responses API": {
      "main": [
        [
          {
            "node": "Extract Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "active": false,
  "versionId": "0a12679e-b4b7-47e5-8cc1-2b07c6f710cf",
  "id": "70c76e29-313c-4e40-83f7-70d66c9396de",
  "tags": [
    "ai",
    "template",
    "lead-qualification-agent"
  ]
}
Pro

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

About this workflow

Lead Qualification Agent. Uses httpRequest. Event-driven trigger; 5 nodes.

Source: https://github.com/kitz-labs/agent-templates-de/blob/1f4f4a5be56b818bda297731135696542f4907d5/lead-qualifizierung-agent/n8n/lead-qualifizierung-agent.n8n.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

This is for SaaS founders, agency owners, and Sales Ops managers who use HubSpot but are tired of "toe-stepping." If your BDRs are accidentally emailing your AE’s active deals, or Marketing is blastin

Data Table, HTTP Request
AI & RAG

CLEAN Agent - Manual Trigger. Uses googleDrive, googleSheets, httpRequest. Event-driven trigger; 49 nodes.

Google Drive, Google Sheets, HTTP Request
AI & RAG

[2/3] Set up medoids (2 types) for anomaly detection (crops dataset). Uses manualTrigger, httpRequest, splitOut, stickyNote. Event-driven trigger; 48 nodes.

HTTP Request
AI & RAG

Workflows from the webinar "Build production-ready AI Agents with Qdrant and n8n".

HTTP Request
AI & RAG

Secretary — Gmail Manager (gelsonmascarenhas@gmail.com). Uses gmailTrigger, httpRequest, googleCalendar, gmail. Event-driven trigger; 47 nodes.

Gmail Trigger, HTTP Request, Google Calendar +2