{
  "name": "Qualify webhook leads with GPT-4o-mini and create Asana tasks automatically",
  "nodes": [
    {
      "id": "5aedd31f-d30f-4b57-b0aa-97ae6dca00aa",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        0
      ],
      "parameters": {
        "width": 389,
        "height": 608,
        "content": "## 🎯 AI-Powered Lead Enrichment & Qualification\n\n### How it works\nThis workflow automates lead enrichment and qualification using RocketReach and OpenAI. When a lead is submitted via webhook, it enric"
      }
    },
    {
      "id": "d768643d-7a9b-4ece-8aaa-6f095b41527e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        624
      ],
      "parameters": {
        "width": 448,
        "height": 323,
        "content": "## 📥 Data Ingestion & Normalization\nReceives lead data via webhook and structures it into a clean format for enrichment. Extracts key fields like name, company, job title, and LinkedIn URL."
      }
    },
    {
      "id": "d1215b48-7b4c-4de6-99bf-4fb5c57edcba",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        624
      ],
      "parameters": {
        "width": 649,
        "height": 323,
        "content": "## 🔍 Lead Enrichment & Quality Check\nEnriches leads with RocketReach to find professional emails and phone numbers. Calculates confidence scores based on email grade (A-D) and filters out low-quality "
      }
    },
    {
      "id": "f2181260-b5d5-4b5d-993f-86b40931221e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        544
      ],
      "parameters": {
        "width": 521,
        "height": 483,
        "content": "## 🤖 AI Lead Scoring & Filtering\nUses GPT-4o-mini to intelligently score leads (1-10) based on job seniority, company size, and data quality. Assigns priority levels and filters leads below threshold "
      }
    },
    {
      "id": "9661b38a-aaab-47d7-ad52-526178f5abb0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        480
      ],
      "parameters": {
        "width": 921,
        "height": 446,
        "content": "## ✅ Task Creation & Notifications\nCreates Asana tasks for qualified leads and sends Slack notifications to your sales team. Disqualified leads also trigger notifications for tracking purposes."
      }
    },
    {
      "id": "0d169a95-5dc0-4ec0-84b9-50270dc330d4",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        688
      ],
      "parameters": {
        "width": 380.3665987780041,
        "height": 233.59233786022102,
        "content": "## 🔐 Credentials & Security\n**Required credentials**: RocketReach API key, OpenAI API key, Asana OAuth2, Slack API token.\n\n⚠️ **Important**: Replace the hardcoded RocketReach API key in the HTTP node "
      }
    },
    {
      "id": "a240e684-7722-4619-a6bd-376b6e16625c",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1408,
        768
      ]
    },
    {
      "id": "a7a74541-9295-48a7-9e71-83e06b4f1d94",
      "name": "Normalize Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -1184,
        768
      ]
    },
    {
      "id": "3a7da26c-c476-4dc0-8295-b70e9c0cca50",
      "name": "Quality Filter",
      "type": "n8n-nodes-base.if",
      "position": [
        -512,
        768
      ]
    },
    {
      "id": "2deca84b-f4dc-4c3f-bd08-f147b2763955",
      "name": "AI Lead Scoring",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -288,
        672
      ]
    },
    {
      "id": "0d26ce75-2ba9-4a07-b82e-454ac36d0ae4",
      "name": "Score Filter",
      "type": "n8n-nodes-base.if",
      "position": [
        288,
        672
      ]
    },
    {
      "id": "72d70e51-d767-405c-ab11-522e20826634",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        512,
        576
      ]
    },
    {
      "id": "e98fe2c0-d12a-429e-9df5-a3368d441ed0",
      "name": "Respond - Low Confidence",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -224,
        864
      ]
    },
    {
      "id": "a170efe0-cd46-4b97-961a-09893ee25445",
      "name": "Respond - Low Score",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        512,
        768
      ]
    },
    {
      "id": "0ad7e252-054e-403b-aa13-87960ace6a19",
      "name": "RocketReach Lookup Profile",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -960,
        768
      ]
    },
    {
      "id": "b837758e-665e-4365-94f7-9d409f65297e",
      "name": "Calculate Email Confidence",
      "type": "n8n-nodes-base.code",
      "position": [
        -736,
        768
      ]
    },
    {
      "id": "b8a452e6-c0a5-4719-95be-0bda2d57a678",
      "name": "Extract AI Score Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        672
      ]
    },
    {
      "id": "122a6c09-e437-4af1-840c-a0d60e16dcc3",
      "name": "Create Asana Task",
      "type": "n8n-nodes-base.asana",
      "position": [
        736,
        576
      ]
    },
    {
      "id": "bb5b92cb-b962-4bdb-a61c-3eda35700a3d",
      "name": "Notify Slack - Qualified",
      "type": "n8n-nodes-base.slack",
      "position": [
        960,
        576
      ]
    },
    {
      "id": "2d0cfa50-ad63-4854-b79b-13c6a8ce2d0d",
      "name": "Notify Slack - Disqualified",
      "type": "n8n-nodes-base.slack",
      "position": [
        736,
        768
      ]
    },
    {
      "id": "ebfd89c3-b8c8-4d8e-84ed-cc150ad625bc",
      "name": "Workflow Error Handler",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1408,
        1424
      ]
    },
    {
      "id": "981e8983-a2b3-49c7-be13-45be2428dc22",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1088,
        1424
      ]
    },
    {
      "id": "67c203e4-740e-4f55-b6d0-0c194153e448",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1472,
        1232
      ],
      "parameters": {
        "width": 672,
        "height": 336,
        "content": "## 🚨 Error Handling \n\n \nCatches any workflow failure and posts an alert to Gmail.  \nIncludes node name, error message, and timestamp for quick debugging.\n"
      }
    }
  ],
  "connections": {
    "Score Filter": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond - Low Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quality Filter": {
      "main": [
        [
          {
            "node": "AI Lead Scoring",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond - Low Confidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Scoring": {
      "main": [
        [
          {
            "node": "Extract AI Score Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Normalize Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Asana Task": {
      "main": [
        [
          {
            "node": "Notify Slack - Qualified",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "Create Asana Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data": {
      "main": [
        [
          {
            "node": "RocketReach Lookup Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond - Low Score": {
      "main": [
        [
          {
            "node": "Notify Slack - Disqualified",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Error Handler": {
      "main": [
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract AI Score Fields": {
      "main": [
        [
          {
            "node": "Score Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Email Confidence": {
      "main": [
        [
          {
            "node": "Quality Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RocketReach Lookup Profile": {
      "main": [
        [
          {
            "node": "Calculate Email Confidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}