{ "nodes": [ { "id": "d7ba34e4-5f98-4a32-abe7-1ed1a3d30410", "name": "n8n Form Trigger", "type": "n8n-nodes-base.formTrigger", "position": [ -800, 840 ], "parameters": { "options": {}, "formTitle": "Contact us", "formFields": { "values": [ { "fieldLabel": "What's your business email?" } ] }, "formDescription": "We'll get back to you soon" }, "typeVersion": 2 }, { "id": "4e91bf1d-ff5b-4a5c-805e-08c930e8dbe9", "name": "Check if the email is valid", "type": "n8n-nodes-base.if", "position": [ -380, 840 ], "parameters": { "options": {}, "conditions": { "options": { "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "and", "conditions": [ { "id": "54d84c8a-63ee-40ed-8fb2-301fff0194ba", "operator": { "name": "filter.operator.equals", "type": "string", "operation": "equals" }, "leftValue": "={{ $json.status }}", "rightValue": "valid" } ] } }, "typeVersion": 2 }, { "id": "a1c972d5-1455-48d8-9f6d-053147db5db2", "name": "Email is not valid, do nothing", "type": "n8n-nodes-base.noOp", "position": [ -40, 980 ], "parameters": {}, "typeVersion": 1 }, { "id": "84f0521d-38e8-4ef4-b590-5ef6d06ebfa2", "name": "Score lead with MadKudu", "type": "n8n-nodes-base.httpRequest", "position": [ -40, 740 ], "parameters": { "url": "https://api.madkudu.com/v1/persons", "authentication": "genericCredentialType", "genericAuthType": "httpBasicAuth", "sendQuery": true, "queryParameters": { "parameters": [ { "name": "email", "value": "={{ $json.email }}" } ] }, "options": {} }, "typeVersion": 4.1 }, { "id": "f9553935-ca49-43d5-b3a5-d469edac5e83", "name": "Verify email with Hunter", "type": "n8n-nodes-base.hunter", "position": [ -580, 840 ], "parameters": { "email": "={{ $json['What\\'s your business email?'] }}", "operation": "emailVerifier" }, "typeVersion": 1 }, { "id": "4f3de033-8936-44f0-9a07-e21f98f6811b", "name": "Not interesting enough", "type": "n8n-nodes-base.noOp", "position": [ 520, 880 ], "parameters": {}, "typeVersion": 1 }, { "id": "f6b6829a-7bc7-4145-8933-db1ce965c1c9", "name": "if customer fit score > 60", "type": "n8n-nodes-base.if", "position": [ 200, 740 ], "parameters": { "options": {}, "conditions": { "options": { "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "and", "conditions": [ { "id": "c23d7b34-a4ae-421f-bd7a-6a3ebb05aafe", "operator": { "type": "number", "operation": "gt" }, "leftValue": "={{ $json.properties.customer_fit.score }}", "rightValue": 60 } ] } }, "typeVersion": 2 }, { "id": "fd0e1600-b1d9-4829-a86b-2cccc6a565f2", "name": "Telegram", "type": "n8n-nodes-base.telegram", "position": [ 500, 560 ], "parameters": { "text": "=⭐ New hot lead: {{ $json.email }}... \n\n{{ $json.properties.customer_fit.top_signals_formated ?? $json.properties.customer_fit.top_signals_formatted }}", "chatId": "YOUR_TELEGRAM_CHAT_ID", "additionalFields": {} }, "typeVersion": 1.1 }, { "id": "notify-qualified-form-leads-on-telegram-hunter", "name": "Validate Hunter result", "type": "n8n-nodes-base.code", "typeVersion": 2, "parameters": { "mode": "runOnceForEachItem", "jsCode": "const e=$('n8n Form Trigger').item.json[\"What's your business email?\"]; if(typeof $json.email!=='string'||typeof e!=='string'||$json.email.toLowerCase()!==e.trim().toLowerCase()||!['valid','invalid','accept_all','webmail','disposable','unknown'].includes($json.status))throw Error('Incomplete Hunter assessment');return {json:$json};" } }, { "id": "notify-qualified-form-leads-on-telegram-fit", "name": "Validate customer fit", "type": "n8n-nodes-base.code", "typeVersion": 2, "parameters": { "mode": "runOnceForEachItem", "jsCode": "const e=$('Verify email with Hunter').item.json.email, f=$json.properties?.customer_fit;if(typeof $json.email!=='string'||$json.email.toLowerCase()!==e.toLowerCase()||!f||typeof f.score!=='number'||!Number.isFinite(f.score)||typeof (f.top_signals_formated ?? f.top_signals_formatted)!=='string')throw Error('Incomplete customer fit');if(('⭐ New hot lead: '+$json.email+'...\\n\\n'+(f.top_signals_formated ?? f.top_signals_formatted)).length>4096)throw Error('Telegram message exceeds limit');return {json:$json};" } } ], "pinData": {}, "connections": { "n8n Form Trigger": { "main": [ [ { "node": "Verify email with Hunter", "type": "main", "index": 0 } ] ] }, "Score lead with MadKudu": { "main": [ [ { "node": "Validate customer fit", "type": "main", "index": 0 } ] ] }, "Verify email with Hunter": { "main": [ [ { "node": "Validate Hunter result", "type": "main", "index": 0 } ] ] }, "if customer fit score > 60": { "main": [ [ { "node": "Telegram", "type": "main", "index": 0 } ], [ { "node": "Not interesting enough", "type": "main", "index": 0 } ] ] }, "Check if the email is valid": { "main": [ [ { "node": "Score lead with MadKudu", "type": "main", "index": 0 } ], [ { "node": "Email is not valid, do nothing", "type": "main", "index": 0 } ] ] }, "Validate Hunter result": { "main": [ [ { "node": "Check if the email is valid", "type": "main", "index": 0 } ] ] }, "Validate customer fit": { "main": [ [ { "node": "if customer fit score > 60", "type": "main", "index": 0 } ] ] } }, "name": "Notify Qualified Form Leads on Telegram", "active": false }