{
  "name": "Score and route new trial leads with Firecrawl, Scrapin.io, OpenAI, Slack and Instantly",
  "nodes": [
    {
      "id": "4f8ab4a4-9058-44bd-a715-0efc7bd39653",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -6880,
        1104
      ]
    },
    {
      "id": "89d9501f-7668-4195-96e9-b53e67fa9058",
      "name": "Extract Email Root Domain",
      "type": "n8n-nodes-base.set",
      "position": [
        -6656,
        1008
      ]
    },
    {
      "id": "666523a8-c730-468b-b32a-77067f828c90",
      "name": "Check to make sure email is not null",
      "type": "n8n-nodes-base.if",
      "position": [
        -6208,
        1008
      ]
    },
    {
      "id": "a7105881-9d32-4500-a093-e6688b2ea386",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -4416,
        1216
      ]
    },
    {
      "id": "7afdd847-8471-4ba6-89a5-4122bfa4d066",
      "name": "LinkedIn Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -4624,
        992
      ]
    },
    {
      "id": "c03a70c8-72fa-4517-a9dc-3acb414fd22d",
      "name": "Check if website exists",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -6000,
        1008
      ]
    },
    {
      "id": "02ca2491-7ad5-48fa-a146-6fb7b8d7cb33",
      "name": "Normalize Country",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -3808,
        992
      ]
    },
    {
      "id": "7834015a-904d-4acb-9e78-96429a83280b",
      "name": "Score Country",
      "type": "n8n-nodes-base.code",
      "position": [
        -3472,
        992
      ]
    },
    {
      "id": "695c763d-faf3-4a21-b4b6-5899d747d3a0",
      "name": "Score Staff Count",
      "type": "n8n-nodes-base.code",
      "position": [
        -3264,
        992
      ]
    },
    {
      "id": "0a58f859-e986-4566-84d9-a0d20dfc3d1c",
      "name": "Sanitize Description",
      "type": "n8n-nodes-base.code",
      "position": [
        -4032,
        992
      ]
    },
    {
      "id": "e8652025-9325-4ad9-815e-6612288f3af0",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -4736,
        1232
      ]
    },
    {
      "id": "9b1bbf8e-ecca-4bf7-baa4-27c95f0e1f3b",
      "name": "Execution Data",
      "type": "n8n-nodes-base.executionData",
      "position": [
        -6656,
        1280
      ]
    },
    {
      "id": "804917d6-6098-4723-a3f3-ff37f891716e",
      "name": "Industry Scoring",
      "type": "n8n-nodes-base.code",
      "position": [
        -3024,
        992
      ]
    },
    {
      "id": "ae55a0b9-6acb-42df-a1b5-e9773fda2e8d",
      "name": "Algo Score",
      "type": "n8n-nodes-base.code",
      "position": [
        -2800,
        992
      ]
    },
    {
      "id": "143888a2-a992-4e54-bb87-a5152512bdfd",
      "name": "Extract Name From Email",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1648,
        976
      ]
    },
    {
      "id": "36a13dec-7a3e-49af-9e37-fc51ab70f921",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1280,
        976
      ]
    },
    {
      "id": "b33a8eb7-390f-4951-97bf-58667ea434df",
      "name": "Extract LinkedIn Url",
      "type": "n8n-nodes-base.code",
      "position": [
        -5344,
        1008
      ]
    },
    {
      "id": "99f68bfa-6dc8-4a55-a930-f7fa24fe78aa",
      "name": "Check if Company or Personal LI Profile",
      "type": "n8n-nodes-base.if",
      "position": [
        -4896,
        1008
      ]
    },
    {
      "id": "f46b91bc-f5b5-43e6-8055-089bc7932dcc",
      "name": "Check root URL",
      "type": "n8n-nodes-base.if",
      "position": [
        -5808,
        1008
      ]
    },
    {
      "id": "6e209053-4c83-4106-b1c0-fae7e3734d0f",
      "name": "Extract Name From Email2",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1648,
        1200
      ]
    },
    {
      "id": "7f9f9d1c-1c04-4d46-afb4-403b5c7b8938",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1280,
        1200
      ]
    },
    {
      "id": "fdcd7556-4857-4b4f-a4d4-715b2f79d41c",
      "name": "High Value Trials (70-89)",
      "type": "n8n-nodes-base.if",
      "position": [
        -2336,
        1200
      ]
    },
    {
      "id": "5a0bde80-7bb5-4a13-a27c-2807500a1614",
      "name": "Very High Value Trials (90-100)",
      "type": "n8n-nodes-base.if",
      "position": [
        -2336,
        992
      ]
    },
    {
      "id": "ba99157b-07de-4114-b34c-c7f1a16186c5",
      "name": "Extract Name From Email3",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1648,
        1408
      ]
    },
    {
      "id": "5139ced2-e900-4503-b469-2f7a90cd82cf",
      "name": "Wait3",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1280,
        1408
      ]
    },
    {
      "id": "30002cb6-a5d2-42be-a59c-0f38a870b398",
      "name": "Mid Value Trials (50-69)",
      "type": "n8n-nodes-base.if",
      "position": [
        -2336,
        1408
      ]
    },
    {
      "id": "3a0d54c5-9fa9-46b5-a4e0-36dd36669660",
      "name": "Extract Name From Email4",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1648,
        1648
      ]
    },
    {
      "id": "9c75d444-52e6-4362-a6c3-62f8c1025408",
      "name": "Wait4",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1280,
        1664
      ]
    },
    {
      "id": "44b49fca-6879-48d8-b045-98532f2b6aad",
      "name": "Low Value Trials (0-49)",
      "type": "n8n-nodes-base.if",
      "position": [
        -2336,
        1648
      ]
    },
    {
      "id": "7d39e660-97e4-4856-8a25-c83b0cecd437",
      "name": "Blacklist Regex Domains",
      "type": "n8n-nodes-base.if",
      "position": [
        -6432,
        1008
      ]
    },
    {
      "id": "7f567204-a733-4afd-9987-f023c250ff3b",
      "name": "Check LinkedIn is not null",
      "type": "n8n-nodes-base.if",
      "position": [
        -5120,
        1008
      ]
    },
    {
      "id": "f301371e-132f-4df0-be6b-c4496ccd8723",
      "name": "Audit LI Results",
      "type": "n8n-nodes-base.if",
      "position": [
        -4272,
        992
      ]
    },
    {
      "id": "64331374-3051-4f88-b124-a9341d3193e3",
      "name": "Firecrawl Scrape",
      "type": "@mendable/n8n-nodes-firecrawl.firecrawl",
      "position": [
        -5568,
        992
      ]
    },
    {
      "id": "6a2758d6-9ce5-4fa1-b09d-ab9834145086",
      "name": "website_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -4560,
        1216
      ]
    },
    {
      "id": "25313025-7254-451f-bb73-61056cd973ff",
      "name": "Consider adding to your CRM",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -2336,
        320
      ]
    },
    {
      "id": "d9504d0e-a964-4873-bd45-b4db2ed65e0b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6704,
        864
      ],
      "parameters": {
        "width": 624,
        "height": 320,
        "content": "## Email handling\n### This extracts the root domain and omits personal/trash emails"
      }
    },
    {
      "id": "6c0a5144-3084-45f4-8278-c4352375555d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6064,
        864
      ],
      "parameters": {
        "width": 640,
        "height": 320,
        "content": "## Check if website exists and scrape\n### This does a HEAD request to check if successful. If successful then scrapes"
      }
    },
    {
      "id": "457131a6-5955-4d71-b252-05f48fe7e71f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5408,
        864
      ],
      "parameters": {
        "width": 1280,
        "height": 560,
        "content": "## Extract company LinkedIn URL & enrich company info\nThis extracts the LI URL from the footer of the site, omits personal LI profiles and enriches with followers, headcount, HQ location, description."
      }
    },
    {
      "id": "1766dc8b-c6a5-43ab-9288-494154d8bcea",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4112,
        864
      ],
      "parameters": {
        "width": 1440,
        "height": 336,
        "content": "## Sanitize data for Slack, run scoring algo checks for qual and quant scores (based on ICP).\nThis ensures that data can be sent to Slack for notification and scores the country, headcount, industry, "
      }
    },
    {
      "id": "e9f6f511-00e7-4036-9427-d27206dff609",
      "name": "Send to slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        -2352,
        576
      ]
    },
    {
      "id": "b842f55d-1a78-4e24-b476-457e9baceead",
      "name": "Search Instantly Database",
      "type": "CUSTOM.instantly",
      "position": [
        -2080,
        1648
      ]
    },
    {
      "id": "9be4f1ff-e104-430a-8ae5-1fdbe16e7e1c",
      "name": "Search Instantly Database1",
      "type": "CUSTOM.instantly",
      "position": [
        -2080,
        1408
      ]
    },
    {
      "id": "4ba1060a-2068-418b-8408-39c43c040075",
      "name": "Search Instantly Database2",
      "type": "CUSTOM.instantly",
      "position": [
        -2080,
        1200
      ]
    },
    {
      "id": "344273d0-7b5a-4c1c-bb11-40b8fc3ede49",
      "name": "Search Instantly Database3",
      "type": "CUSTOM.instantly",
      "position": [
        -2080,
        976
      ]
    },
    {
      "id": "81032a55-cd19-4003-b5b5-35b793ca56f7",
      "name": "Check if in db",
      "type": "n8n-nodes-base.if",
      "position": [
        -1872,
        976
      ]
    },
    {
      "id": "920913de-572c-405a-b805-03ffa76edcaf",
      "name": "Check if in db1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1872,
        1200
      ]
    },
    {
      "id": "d325ee41-7766-4313-8010-329cfeedd145",
      "name": "Check if in db2",
      "type": "n8n-nodes-base.if",
      "position": [
        -1872,
        1408
      ]
    },
    {
      "id": "66dbdb48-47a4-488a-ac4d-4f8324200aae",
      "name": "Check if in db3",
      "type": "n8n-nodes-base.if",
      "position": [
        -1872,
        1648
      ]
    },
    {
      "id": "9e30ef1d-56bc-4b4c-a654-e7d58e33b745",
      "name": "Add lead to campaign",
      "type": "CUSTOM.instantly",
      "position": [
        -1056,
        1664
      ]
    },
    {
      "id": "ecf898ff-20b3-4f3e-ba6e-aa3285d2f989",
      "name": "Add lead to campaign1",
      "type": "CUSTOM.instantly",
      "position": [
        -1056,
        976
      ]
    },
    {
      "id": "d9c3dd3e-56fc-4603-8ef8-71e4a56f8b53",
      "name": "Add lead to campaign2",
      "type": "CUSTOM.instantly",
      "position": [
        -1056,
        1408
      ]
    },
    {
      "id": "b361feef-367e-4c41-9194-f37eaccb8258",
      "name": "Add lead to campaign3",
      "type": "CUSTOM.instantly",
      "position": [
        -1056,
        1200
      ]
    },
    {
      "id": "2007817e-f527-46b1-8c1a-6b77898cfe88",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2416,
        864
      ],
      "parameters": {
        "width": 1600,
        "height": 1024,
        "content": "## Segment scores, verify lead is not already in Instantly, then add to campaign\n### Breaks out into scoring ranges (Very High, High, Mid, Low. Then adds them to campaigns"
      }
    },
    {
      "id": "d5fe5be4-f3c8-4164-b998-2d0d05dca4bf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7984,
        528
      ],
      "parameters": {
        "width": 704,
        "height": 1968,
        "content": "# n8n Lead Qualification & Sales Intelligence Workflow (Top of Funnel)\n\n### Overview / Purpose\nThis workflow automatically processes new free-trial / lead sign-ups in real time:\n\n- Catches a webhook f"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Add lead to campaign1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Add lead to campaign3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "Add lead to campaign2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "Add lead to campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Extract Email Root Domain",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execution Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Algo Score": {
      "main": [
        [
          {
            "node": "Send to slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Very High Value Trials (90-100)",
            "type": "main",
            "index": 0
          },
          {
            "node": "High Value Trials (70-89)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Mid Value Trials (50-69)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Low Value Trials (0-49)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Consider adding to your CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "website_tool": {
      "ai_tool": [
        [
          {
            "node": "LinkedIn Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Score Country": {
      "main": [
        [
          {
            "node": "Score Staff Count",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if in db": {
      "main": [
        [
          {
            "node": "Extract Name From Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check root URL": {
      "main": [
        [
          {
            "node": "Firecrawl Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn Agent": {
      "main": [
        [
          {
            "node": "Audit LI Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if in db1": {
      "main": [
        [
          {
            "node": "Extract Name From Email2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if in db2": {
      "main": [
        [
          {
            "node": "Extract Name From Email3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if in db3": {
      "main": [
        [
          {
            "node": "Extract Name From Email4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Audit LI Results": {
      "main": [
        [
          {
            "node": "Sanitize Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Firecrawl Scrape": {
      "main": [
        [
          {
            "node": "Extract LinkedIn Url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Industry Scoring": {
      "main": [
        [
          {
            "node": "Algo Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Country": {
      "main": [
        [
          {
            "node": "Score Country",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Staff Count": {
      "main": [
        [
          {
            "node": "Industry Scoring",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "LinkedIn Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Add lead to campaign": {
      "main": [
        []
      ]
    },
    "Extract LinkedIn Url": {
      "main": [
        [
          {
            "node": "Check LinkedIn is not null",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize Description": {
      "main": [
        [
          {
            "node": "Normalize Country",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blacklist Regex Domains": {
      "main": [
        [
          {
            "node": "Check to make sure email is not null",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if website exists": {
      "main": [
        [
          {
            "node": "Check root URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Name From Email": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Low Value Trials (0-49)": {
      "main": [
        [
          {
            "node": "Search Instantly Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Name From Email2": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Name From Email3": {
      "main": [
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Name From Email4": {
      "main": [
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mid Value Trials (50-69)": {
      "main": [
        [
          {
            "node": "Search Instantly Database1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Email Root Domain": {
      "main": [
        [
          {
            "node": "Blacklist Regex Domains",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High Value Trials (70-89)": {
      "main": [
        [
          {
            "node": "Search Instantly Database2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Instantly Database": {
      "main": [
        [
          {
            "node": "Check if in db3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "LinkedIn Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Check LinkedIn is not null": {
      "main": [
        [
          {
            "node": "Check if Company or Personal LI Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Instantly Database1": {
      "main": [
        [
          {
            "node": "Check if in db2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Instantly Database2": {
      "main": [
        [
          {
            "node": "Check if in db1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Instantly Database3": {
      "main": [
        [
          {
            "node": "Check if in db",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Very High Value Trials (90-100)": {
      "main": [
        [
          {
            "node": "Search Instantly Database3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check to make sure email is not null": {
      "main": [
        [
          {
            "node": "Check if website exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Company or Personal LI Profile": {
      "main": [
        [
          {
            "node": "LinkedIn Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}