{
  "name": "Ai-powered lead research & qualification using Relevance AI",
  "nodes": [
    {
      "id": "ad8ab20b-217c-4ff5-8e32-1290e1b8a135",
      "name": "Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2080,
        -48
      ]
    },
    {
      "id": "752d2c94-57eb-4837-b787-c6a44b5c2945",
      "name": "Router",
      "type": "n8n-nodes-base.switch",
      "position": [
        0,
        224
      ]
    },
    {
      "id": "d437ef5a-647f-4da6-bcbf-5307f26991f8",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -1808,
        -48
      ]
    },
    {
      "id": "a21eaa1b-a250-4fdd-be01-79e80835798c",
      "name": "score individual (Relevance)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1440,
        -112
      ]
    },
    {
      "id": "3ff80f8d-61f7-476c-8e8b-c5e169e6ec93",
      "name": "score company (Relevance)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1440,
        80
      ]
    },
    {
      "id": "f9320638-fca7-4e1e-8ee5-9e0849048b76",
      "name": "Summarize_N_score",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -768,
        -48
      ]
    },
    {
      "id": "6c34b905-d6e2-4d20-ab44-e986ae5ef39b",
      "name": "Structured Output",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        -48
      ]
    },
    {
      "id": "c942bec9-3c91-4cbe-8f39-80ae52004a98",
      "name": "Deepseek",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -736,
        160
      ]
    },
    {
      "id": "a81313ef-d2ec-4bc0-9fbb-90c81cf8c696",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -576,
        160
      ]
    },
    {
      "id": "d0ee2940-3abe-4063-9056-01ca137120db",
      "name": "Deepseek R1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        448,
        848
      ]
    },
    {
      "id": "f9311c82-1c5a-4fe6-9160-f245e24b16bd",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        608,
        848
      ]
    },
    {
      "id": "815b4d81-4e0a-434f-93c8-71b2e614c3a0",
      "name": "Email Personalizer (HOT)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        192
      ]
    },
    {
      "id": "676659e6-e1c9-4c46-a64b-1e4001c06da5",
      "name": "Email Personalizer (WARM)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        416
      ]
    },
    {
      "id": "7fb47b10-c36b-4b02-bcdd-e368629ae27c",
      "name": "Email Personalizer (COLD)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        640
      ]
    },
    {
      "id": "ca1fc9b7-d669-4dfe-b350-83a70e529d04",
      "name": "Create a draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        896,
        192
      ]
    },
    {
      "id": "cd908406-2c72-41cc-a7a3-45281a55fc8d",
      "name": "Update CRM",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        384,
        -704
      ]
    },
    {
      "id": "a152149e-7db5-4578-8849-86ebe5fc6561",
      "name": "Notify team",
      "type": "n8n-nodes-base.slack",
      "position": [
        912,
        -352
      ]
    },
    {
      "id": "0876072a-5c07-4609-977f-cae5bc08a66a",
      "name": "Set data",
      "type": "n8n-nodes-base.set",
      "position": [
        16,
        -624
      ]
    },
    {
      "id": "1a036c4b-9003-467d-9ab3-58e1f30b85ae",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2112,
        -256
      ],
      "parameters": {
        "width": 464,
        "height": 368,
        "content": "## 🟧 Lead Intake\nForm → Captures visitor details (name, email, company, job title) from your website/contact page.\n\nEdit Fields → Normalizes inputs (merges first & last name, extracts company URL)."
      }
    },
    {
      "id": "4f63151d-fd6d-4455-9e0f-e70d5c64fa93",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -544
      ],
      "parameters": {
        "width": 528,
        "height": 784,
        "content": "## 🔵 Lead Enrichment\nScore Individual (Relevance) → Calls Relevance AI to evaluate the lead’s personal fit (role, expertise, influence).\n\nScore Company (Relevance) → Calls Relevance AI to assess the c"
      }
    },
    {
      "id": "6835df06-c477-4694-8c4b-1510dfa624f0",
      "name": "Merge data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1152,
        -48
      ]
    },
    {
      "id": "04f36d10-2f86-4df1-b326-dd241e5e6f44",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -240
      ],
      "parameters": {
        "width": 512,
        "height": 528,
        "content": "## 🟩 Lead Scoring & Insights\nSummarize_N_score → AI analyzes combined data (40% individual + 60% company) to check against ICP and produces final lead score, qualification status, and structured JSON "
      }
    },
    {
      "id": "6404a8a5-b72d-4c3b-b55c-52cf62d4f395",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -864
      ],
      "parameters": {
        "width": 576,
        "height": 400,
        "content": "## 🟨 Data Handling\nSet Data → Extracts key fields (lead name, email, label, summary, red flags, etc.) for CRM and routing.\n\nUpdate CRM (Google Sheets) → Logs or updates lead details in your CRM sheet "
      }
    },
    {
      "id": "0caa564b-f69a-4d41-8c2f-23930f56b2a6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        0
      ],
      "parameters": {
        "width": 304,
        "height": 400,
        "content": "## 🔀 Routing by Lead Quality\nRouter → Splits leads into HOT / WARM / COLD based on score threshold:\n\nHOT: ≥80\n\nWARM: 60–79\n\nCOLD: <60"
      }
    },
    {
      "id": "d0df6c65-fb78-4d0d-8bbe-54d83d877873",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -64
      ],
      "parameters": {
        "width": 800,
        "height": 1056,
        "content": "## ✉️ BONUS: Personalized Outreach\nEmail Personalizer (HOT) → Generates high-impact, conversion-oriented outreach emails.\n\nEmail Personalizer (WARM) → Creates trust-building, consultative emails.\n\nEma"
      }
    },
    {
      "id": "6f3ae231-c8c4-4070-af56-8d18984a0d64",
      "name": "Send email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        896,
        528
      ]
    },
    {
      "id": "eb084bdf-d233-4d07-9dab-fb06dc7dceca",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -416
      ],
      "parameters": {
        "width": 432,
        "height": 224,
        "content": "## Notify for HOT lead\n"
      }
    },
    {
      "id": "18c43755-6fb7-4d80-b907-c966d9f4740d",
      "name": "Merge data+mail",
      "type": "n8n-nodes-base.merge",
      "position": [
        672,
        -352
      ]
    },
    {
      "id": "df2d6715-9ec7-4fc9-8f2b-86f73e965282",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3232,
        -832
      ],
      "parameters": {
        "width": 1040,
        "height": 1856,
        "content": "## ⚙️ Setup & Configuration Guide\nThis guide helps you (or anyone cloning this workflow) set it up quickly.\n---\n\n### 🔑 1. API & Credential Setup\n- **Relevance AI**\n  - Sign up at [Relevance AI](https:"
      }
    },
    {
      "id": "b237e96c-3d48-44c0-b467-d1453e82a01d",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3152,
        -1056
      ],
      "parameters": {
        "width": 880,
        "height": 192,
        "content": "## This workflow automates lead qualification using Relevance AI + n8n. It scores both the individual and the company, routes them by quality, and triggers tailored outreach — all while logging in CRM"
      }
    },
    {
      "id": "96566740-b1d2-474f-a2c2-335a04584534",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        -832
      ],
      "parameters": {
        "width": 1056,
        "height": null,
        "content": "## I pinned some data in **Form** and **RelevanceAI** nodes. Your can check those out to understand how the data looks like."
      }
    },
    {
      "id": "cb5367fb-6522-4c5e-8295-771ebb4a40b0",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        272
      ],
      "parameters": {
        "width": 352,
        "height": 112,
        "content": "## Quick Tip:\n- Make sure to check the relevance.ai tools\n- May adjust those according to your needs"
      }
    },
    {
      "id": "0fcb90e4-4bee-4961-b424-787d624c3cbf",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -496
      ],
      "parameters": {
        "width": null,
        "height": 288,
        "content": "## Configure Me!\nMake sure to paste the spreadsheet ID (where you store your lead data) in the specified field"
      }
    },
    {
      "id": "7160316a-d39c-4261-8df5-dbd87fcc925d",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -304
      ],
      "parameters": {
        "width": null,
        "height": 544,
        "content": "## Configure Us!\n- Make sure to create a credential using your relevance.ai API key\n- Pase your relevance ai projectID (tool ID) in the query parameter"
      }
    }
  ],
  "connections": {
    "Form": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize_N_score",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Router": {
      "main": [
        [
          {
            "node": "Email Personalizer (HOT)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email Personalizer (WARM)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email Personalizer (COLD)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deepseek": {
      "ai_languageModel": [
        []
      ]
    },
    "Set data": {
      "main": [
        [
          {
            "node": "Update CRM",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge data+mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge data": {
      "main": [
        [
          {
            "node": "Summarize_N_score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update CRM": {
      "main": [
        []
      ]
    },
    "Deepseek R1": {
      "ai_languageModel": [
        [
          {
            "node": "Email Personalizer (WARM)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Email Personalizer (COLD)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Email Personalizer (HOT)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "score individual (Relevance)",
            "type": "main",
            "index": 0
          },
          {
            "node": "score company (Relevance)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a draft": {
      "main": [
        [
          {
            "node": "Merge data+mail",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge data+mail": {
      "main": [
        [
          {
            "node": "Notify team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "main": [
        [
          {
            "node": "Set data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize_N_score": {
      "main": [
        [
          {
            "node": "Structured Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Personalizer (HOT)": {
      "main": [
        [
          {
            "node": "Create a draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Email Personalizer (HOT)",
            "type": "ai_outputParser",
            "index": 0
          },
          {
            "node": "Email Personalizer (COLD)",
            "type": "ai_outputParser",
            "index": 0
          },
          {
            "node": "Email Personalizer (WARM)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Email Personalizer (COLD)": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Personalizer (WARM)": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "score company (Relevance)": {
      "main": [
        [
          {
            "node": "Merge data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "score individual (Relevance)": {
      "main": [
        [
          {
            "node": "Merge data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}