{"name":"Lead Capture, AI Scoring & Routing Engine","nodes":[{"parameters":{"content":"## Lead Capture & Enrichment\nThis first step instantly captures information from the website contact form. The system then automatically finds more public details about the lead's company, giving us a complete and accurate profile to analyze.","height":356,"width":420,"color":3},"id":"d3030727-e9d4-40d5-9a21-0a8a44d253d0","name":"Sticky Note - Capture","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1632,-192]},{"parameters":{"content":"## AI Scoring & Qualification\nHere, our AI analyzes the complete lead profile. It instantly retrieves our most up-to-date scoring criteria from the Pinecone database and uses those rules to assign an accurate score from 1-100.","height":340,"width":544,"color":4},"id":"af3c31f4-3650-417b-bffa-abd14eceab69","name":"Sticky Note - Scoring","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1008,-176]},{"parameters":{"content":"## Hot Leads (Score 75+): Immediate Action\nThe best leads are fast-tracked. A deal is instantly created in the CRM, a follow-up email is sent, and the sales team gets an immediate alert. This ensures we act on our best opportunities in minutes, not hours.","height":268,"width":864,"color":5},"id":"4cfc308a-5870-4f21-83ee-7897733a6f4b","name":"Sticky Note - Hot","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-352,-192]},{"parameters":{"content":"## Medium Leads (Score 25-74): Sales Team Review\nPromising leads are sent directly to the sales team. The system creates a record in the CRM and assigns it for their personal review and follow-up, so no solid opportunity is missed.","height":292,"width":864,"color":7},"id":"b98bf875-1f1e-43f1-8368-7b2d044c2dae","name":"Sticky Note - Medium","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-352,128]},{"parameters":{"content":"## Cold Leads (Score <25)","height":224,"width":260,"color":7},"id":"3113f656-8cbf-4328-a528-ceccbfac3b3e","name":"Sticky Note - Cold","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-272,464]},{"parameters":{"content":"## Database","height":200,"width":316,"color":6},"id":"4f94d098-1899-48d7-b06d-330319fdff59","name":"Sticky Note - Database","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-800,240]},{"parameters":{"content":"## Ai Models","height":200,"width":320,"color":6},"id":"99baf0e4-503a-409e-9f72-27b96b78820d","name":"Sticky Note - AI Models","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1136,240]},{"parameters":{"content":"## System Knowledgebase\nThis is the AI's central \"rulebook.\" We use it to upload and manage the specific criteria for what defines an ideal lead. This ensures the AI always scores with perfect consistency based on our latest business rules.","height":540,"width":800,"color":6},"id":"9bd8d889-05fa-4394-8b63-22815a5cba1c","name":"Sticky Note - Knowledgebase","type":"n8n-nodes-base.stickyNote","typeVersion":1,"position":[-1536,496]},{"parameters":{"formTitle":"Contact Us","formDescription":"Tell us about your company and we'll get back to you.","formFields":{"values":[{"fieldLabel":"Full Name","requiredField":true},{"fieldLabel":"Work Email","requiredField":true},{"fieldLabel":"Company Name","requiredField":true},{"fieldLabel":"Company Website","requiredField":true},{"fieldLabel":"Message"}]}},"id":"889e4da6-d803-422b-9931-cc6a477714fa","name":"On form submission","type":"n8n-nodes-base.formTrigger","typeVersion":2.2,"position":[-1600,0]},{"parameters":{"method":"POST","url":"https://httpbin.org/post","sendBody":true,"specifyBody":"json","jsonBody":"={{ { \"companyWebsite\": $json[\"Company Website\"], \"companyName\": $json[\"Company Name\"] } }}"},"id":"4aafb70c-b8da-45ee-b730-6a6108dad091","name":"Company URL Researcher","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[-1376,0]},{"parameters":{"promptType":"define","text":"=You are a B2B lead qualification analyst. Analyze the enriched lead profile below and assign a lead score from 1-100 based on the scoring criteria retrieved from the knowledge base tool.\n\nLead profile:\n{{ JSON.stringify({\n  formSubmission: $('On form submission').item.json,\n  companyResearch: $('Company URL Researcher').item.json\n}) }}\nReturn ONLY the numeric score and a one-sentence justification.","options":{"systemMessage":"You always look up the current scoring rubric using the knowledge base tool before scoring a lead. Never guess the criteria from memory."}},"id":"dd302480-ba84-4bbf-9c37-b6f2477d9ed0","name":"AI Lead Scorer","type":"@n8n/n8n-nodes-langchain.agent","typeVersion":1.7,"position":[-992,0]},{"parameters":{"inputText":"={{ $json.output }}","categories":{"categories":[{"category":"Hot","description":"Lead score is 75 or higher. Strong ICP fit with clear business need, buying intent, and/or decision-maker signals."},{"category":"Medium","description":"Lead score is between 25 and 74. The lead shows some ICP fit, business need, or buying intent, but lacks enough strong signals for Hot."},{"category":"cold","description":"Lead score is below 25. The lead has weak fit, little evidence of business need or buying intent, or insufficient qualification signals."}]}},"id":"94f94da1-5734-45da-9a37-1e93bb211c6f","name":"Route Lead by Score","type":"@n8n/n8n-nodes-langchain.textClassifier","typeVersion":1.1,"position":[-736,-16]},{"parameters":{"mode":"retrieve-as-tool","toolDescription":"Retrieves the current, up-to-date lead scoring rubric and qualification criteria.","pineconeIndex":{"__rl":true,"value":"YOUR_PINECONE_INDEX","mode":"list"}},"id":"2fb75591-eee7-48dc-bdac-5db0b0a5685b","name":"Pinecone Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","typeVersion":1.3,"position":[-752,304]},{"parameters":{"modelName":"models/gemini-embedding-2"},"id":"453a54cd-a501-4eb4-9fef-1153b75d0ed2","name":"Embeddings Google Gemini1","type":"@n8n/n8n-nodes-langchain.embeddingsGoogleGemini","typeVersion":1,"position":[-944,304]},{"parameters":{"sendTo":"={{ $('On form submission').item.json['Work Email'] }}","subject":"Thanks for reaching out - let's connect!","message":"=Hi {{ $('On form submission').item.json['Full Name'] }},\n\nThanks for your interest! One of our team members will be reaching out to you shortly to discuss how we can help.\n\nBest,\nThe Sales Team","options":{"appendAttribution":false}},"id":"184259e9-dd9c-4a25-a0c2-05d7aa8066c3","name":"Quick Follow Up","type":"n8n-nodes-base.gmail","typeVersion":2.1,"position":[-288,-64]},{"parameters":{"operation":"append","documentId":{"__rl":true,"value":"YOUR_GOOGLE_SHEET_ID","mode":"list"},"sheetName":{"__rl":true,"value":"gid=0","mode":"list"},"columns":{"mappingMode":"defineBelow","value":{"Timestamp":"={{ $now.toISO() }}","Lead Name":"={{ $('On form submission').item.json['Full Name'] }}","Email":"={{ $('On form submission').item.json['Work Email'] }}","Company":"={{ $('On form submission').item.json['Company Name'] }}","Website":"={{ $('On form submission').item.json['Company Website'] }}","Industry":"={{ $('Company URL Researcher').item.json['Industry'] || 'Unknown' }}","Lead Score":"={{ Number($('AI Lead Scorer').item.json.output.match(/\\d+/)?.[0] || 0) }}","Temperature":"=HOT","Qualification":"=Highly Qualified","Score Reason":"={{ $('AI Lead Scorer').item.json.output.replace(/^\\s*\d+\s*[-:–]?\\s*/, '') }}","Recommended Action":"Immediate sales follow-up","Sales Status":"Now","Owner":"=","Source":"Website Form"},"matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"id":"11e3df23-576d-4035-9a62-44970fad4652","name":"HOT Lead CRM","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[16,-64]},{"parameters":{"select":"channel","channelId":{"__rl":true,"value":"YOUR_SLACK_CHANNEL_ID","mode":"list"},"text":"=🔥 New HOT lead: {{ $('On form submission').item.json['Company Name'] }} — score {{ $('AI Lead Scorer').item.json.output }}","otherOptions":{}},"id":"61ca7915-6699-4cbd-973c-9ba1aae41a1c","name":"Send a message","type":"n8n-nodes-base.slack","typeVersion":2.2,"position":[304,-64]},{"parameters":{"sendTo":"={{ $('On form submission').item.json['Work Email'] }}","subject":"Thanks for reaching out!","message":"=Hi {{ $('On form submission').item.json['Full Name'] }},\n\nThanks for getting in touch. Our team will review your details and follow up soon.\n\nBest,\nThe Sales Team","options":{"appendAttribution":false}},"id":"d5649cce-833b-4c0b-a4f9-5ca67890049d","name":"Quick Follow Up1","type":"n8n-nodes-base.gmail","typeVersion":2.1,"position":[-304,256]},{"parameters":{"sendTo":"sales-team@example.com","subject":"=New medium-priority lead: {{ $('On form submission').item.json['Work Email'] }}","message":"=A new lead scored {{ $('AI Lead Scorer').item.json.output }}. Please review in the CRM and follow up.","options":{"appendAttribution":false}},"id":"9a5c4281-ed80-4e70-ac4a-eb4a9c9c65f4","name":"Sales Team","type":"n8n-nodes-base.gmail","typeVersion":2.1,"position":[304,256]},{"parameters":{"pollTimes":{"item":[{"mode":"everyMinute"}]},"triggerOn":"specificFolder","folderToWatch":{"__rl":true,"value":"YOUR_GOOGLE_DRIVE_FOLDER_ID","mode":"list"},"event":"fileCreated"},"id":"31c188aa-e653-4d17-8dcf-db0705c2540c","name":"Google Drive Trigger","type":"n8n-nodes-base.googleDriveTrigger","typeVersion":1,"position":[-1504,672]},{"parameters":{"operation":"download","fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"}},"id":"81d32698-0e84-467e-b536-6d7c4c100202","name":"Download file","type":"n8n-nodes-base.googleDrive","typeVersion":3,"position":[-1296,672]},{"parameters":{"mode":"insert","pineconeIndex":{"__rl":true,"value":"YOUR_PINECONE_INDEX","mode":"list"}},"id":"60f20c15-5c23-4fd1-8ada-8e10a3ee9dcc","name":"Pinecone Vector Store1","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","typeVersion":1.3,"position":[-1056,672]},{"parameters":{"modelName":"models/gemini-embedding-2"},"id":"cbf2a707-1d53-4d4a-ad70-66cc1c9ece34","name":"Embeddings Google Gemini","type":"@n8n/n8n-nodes-langchain.embeddingsGoogleGemini","typeVersion":1,"position":[-1392,880]},{"parameters":{"dataType":"binary"},"id":"84dfd233-253d-42ba-93ce-93bcbd7f3057","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","typeVersion":1,"position":[-992,848]},{"parameters":{"model":"nvidia/nemotron-3-nano-30b-a3b:free"},"type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","typeVersion":1,"position":[-1088,304],"id":"bcbfa2d9-16d8-4433-b1ec-2764d6773917","name":"OpenRouter Chat Model"},{"parameters":{},"type":"@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter","typeVersion":1,"position":[-1152,896],"id":"aecfe654-a3c9-48c9-aa83-08abf8e594d6","name":"Character Text Splitter"},{"parameters":{"operation":"append","documentId":{"__rl":true,"value":"YOUR_GOOGLE_SHEET_ID","mode":"list"},"sheetName":{"__rl":true,"value":8830191,"mode":"list"},"columns":{"mappingMode":"defineBelow","value":{"Timestamp":"={{ $now.toISO() }}","Lead Name":"={{ $('On form submission').item.json['Full Name'] }}","Email":"={{ $('On form submission').item.json['Work Email'] }}","Company":"={{ $('On form submission').item.json['Company Name'] }}","Website":"={{ $('On form submission').item.json['Company Website'] }}","Industry":"={{ $('Company URL Researcher').item.json['Industry'] || 'Unknown' }}","Lead Score":"={{ Number($('AI Lead Scorer').item.json.output.match(/\\d+/)?.[0] || 0) }}","Temperature":"=Medium ","Qualification":"=Potentially Qualified","Score Reason":"={{ $('AI Lead Scorer').item.json.output.replace(/^\\s*\d+\s*[-:–]?\s*/, '') }}","Recommended Action":"Sales review within 24–48 hours","Sales Status":"Now","Owner":"=","Source":"Website Form"},"matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"id":"70445410-3459-4fcc-870e-c55c268cdabf","name":"Medium Level Lead CRM","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[16,256]},{"parameters":{"operation":"append","documentId":{"__rl":true,"value":"YOUR_GOOGLE_SHEET_ID","mode":"list"},"sheetName":{"__rl":true,"value":1191480710,"mode":"list"},"columns":{"mappingMode":"defineBelow","value":{"Timestamp":"={{ $now.toISO() }}","Lead Name":"={{ $('On form submission').item.json['Full Name'] }}","Email":"={{ $('On form submission').item.json['Work Email'] }}","Company":"={{ $('On form submission').item.json['Company Name'] }}","Website":"={{ $('On form submission').item.json['Company Website'] }}","Industry":"={{ $('Company URL Researcher').item.json['Industry'] || 'Unknown' }}","Lead Score":"={{ Number($('AI Lead Scorer').item.json.output.match(/\\d+/)?.[0] || 0) }}","Temperature":"=Cold","Qualification":"=Low Priority","Score Reason":"={{ $('AI Lead Scorer').item.json.output.replace(/^\\s*\d+\s*[-:–]?\s*/, '') }}","Recommended Action":"Store for future nurturing","Sales Status":"Now","Owner":"=","Source":"Website Form"},"matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"id":"32862f9e-b43c-452f-88d7-11c56ae588f1","name":"Cold Lead CRM1","type":"n8n-nodes-base.googleSheets","typeVersion":4.5,"position":[-208,528]},{"parameters":{"path":"YOUR_WEBHOOK_PATH"},"type":"n8n-nodes-base.webhook","typeVersion":2.1,"position":[-1888,-96],"id":"7c2be7c1-7ed5-445b-aa6e-04ac530dc674","name":"Webhook"},{"parameters":{"content":"# trigger\n","height":432},"type":"n8n-nodes-base.stickyNote","position":[-1936,-192],"typeVersion":1,"id":"056ec206-e513-4867-a3e8-c5d41f377d52","name":"Sticky Note"},{"parameters":{"pollTimes":{"item":[{"mode":"everyMinute"}]},"filters":{}},"type":"n8n-nodes-base.gmailTrigger","typeVersion":1.4,"position":[-1888,64],"id":"21b328ad-626e-4872-882d-da1598f55955","name":"Gmail Trigger"}],"connections":{"On form submission":{"main":[[{"node":"Company URL Researcher","type":"main","index":0}]]},"Company URL Researcher":{"main":[[{"node":"AI Lead Scorer","type":"main","index":0}]]},"AI Lead Scorer":{"main":[[{"node":"Route Lead by Score","type":"main","index":0}]]},"Route Lead by Score":{"main":[[{"node":"Quick Follow Up","type":"main","index":0}],[{"node":"Quick Follow Up1","type":"main","index":0}],[{"node":"Cold Lead CRM1","type":"main","index":0}]]},"Quick Follow Up":{"main":[[{"node":"HOT Lead CRM","type":"main","index":0}]]},"HOT Lead CRM":{"main":[[{"node":"Send a message","type":"main","index":0}]]},"Quick Follow Up1":{"main":[[{"node":"Medium Level Lead CRM","type":"main","index":0}]]},"Google Drive Trigger":{"main":[[{"node":"Download file","type":"main","index":0}]]},"Download file":{"main":[[{"node":"Pinecone Vector Store1","type":"main","index":0}]]},"Pinecone Vector Store":{"ai_tool":[[{"node":"AI Lead Scorer","type":"ai_tool","index":0}]]},"Embeddings Google Gemini1":{"ai_embedding":[[{"node":"Pinecone Vector Store","type":"ai_embedding","index":0}]]},"Embeddings Google Gemini":{"ai_embedding":[[{"node":"Pinecone Vector Store1","type":"ai_embedding","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Pinecone Vector Store1","type":"ai_document","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"AI Lead Scorer","type":"ai_languageModel","index":0},{"node":"Route Lead by Score","type":"ai_languageModel","index":0}]]},"Character Text Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader","type":"ai_textSplitter","index":0}]]},"Medium Level Lead CRM":{"main":[[{"node":"Sales Team","type":"main","index":0}]]}},"settings":{"executionOrder":"v1","binaryMode":"separate","availableInMCP":false}}