This workflow corresponds to n8n.io template #18010 — we link there as the canonical source.
This workflow follows the Chainllm → Form Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "yln6jNQdH96ikDlX",
"name": "AI Lead Scoring from Form Submission",
"tags": [],
"nodes": [
{
"id": "78633414-0ba1-4ae0-a01f-c54b6cf74218",
"name": "Sticky Note - Main",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"width": 420,
"height": 628,
"content": "## AI Lead Scoring from Form Submission\nEvery form submission gets scored 1-10 by AI with reasoning. Hot leads (7+) ping Slack immediately, everything else gets logged for later.\n\n## How it works\n1. Lead submits the form\n2. AI scores fit/intent 1-10 with a short reason\n3. Score 7+ triggers a Slack alert\n4. Everything else is logged to Google Sheets\n\n## Setup\n- [ ] Connect OpenAI credentials in OpenAI Chat Model\n- [ ] Connect Slack credentials in Alert Hot Lead, set the channel\n- [ ] Connect Google Sheets credentials in Log Lead, set the Spreadsheet ID and sheet\n- [ ] Adjust the scoring criteria in Score Lead's prompt to match what 'hot' actually means for your business"
},
"typeVersion": 1
},
{
"id": "c585c7c2-c93a-4af8-b1d8-6da91280bd49",
"name": "Sticky Note - Route by Score",
"type": "n8n-nodes-base.stickyNote",
"position": [
464,
32
],
"parameters": {
"color": 7,
"width": 1318,
"height": 588,
"content": "## Route by Score\nScore >= 7 goes to Slack. Everything else just gets logged, no alert noise."
},
"typeVersion": 1
},
{
"id": "4aae84d8-ad24-4cfe-aedd-d0feda2525cc",
"name": "On Form Submitted",
"type": "n8n-nodes-base.formTrigger",
"position": [
512,
240
],
"parameters": {
"options": {},
"formTitle": "Get in Touch",
"formFields": {
"values": [
{
"fieldLabel": "Name",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Email",
"requiredField": true
},
{
"fieldLabel": "Company"
},
{
"fieldType": "textarea",
"fieldLabel": "What are you looking for?",
"requiredField": true
}
]
},
"formDescription": "Tell us a bit about you and what you're looking for."
},
"typeVersion": 2.3
},
{
"id": "df7fc81d-4d36-4066-901c-cc5121b5018f",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
752,
432
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"typeVersion": 1.2
},
{
"id": "db7e76a2-a522-42e8-89fd-a68535b58404",
"name": "Score Lead",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
752,
240
],
"parameters": {
"text": "=Score how promising this lead is, 1-10, based on likely fit and buying intent from what they submitted.\n\nName: {{ $json.Name }}\nEmail: {{ $json.Email }}\nCompany: {{ $json.Company }}\nWhat they're looking for: {{ $json['What are you looking for?'] }}\n\nHigher scores = clear buying intent, specific need, business email domain, realistic fit for what we offer. Lower scores = vague, personal email domain, sounds like a student/researcher/job seeker rather than a buyer.\n\nRespond in exactly this format, nothing else:\nSCORE: <a single number 1-10>\nREASONING: <1-2 sentences explaining the score>",
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "ca50c64f-c261-4ea1-8209-3b07a8029247",
"name": "Parse Score",
"type": "n8n-nodes-base.code",
"position": [
1008,
240
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const lead = $('On Form Submitted').item.json;\nconst text = $input.item.json.text || '';\n\nconst scoreMatch = text.match(/SCORE:\\s*(\\d+)/i);\nconst reasonMatch = text.match(/REASONING:\\s*([\\s\\S]*)/i);\n\nconst score = scoreMatch ? parseInt(scoreMatch[1], 10) : 0;\nconst reasoning = reasonMatch ? reasonMatch[1].trim() : text.trim();\n\nreturn {\n json: {\n Name: lead.Name,\n Email: lead.Email,\n Company: lead.Company,\n Message: lead['What are you looking for?'],\n score,\n reasoning\n }\n};"
},
"typeVersion": 2
},
{
"id": "4c67e541-77e2-48c5-9b73-5ec2f017c8e3",
"name": "Is Hot Lead?",
"type": "n8n-nodes-base.if",
"position": [
1264,
240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "cond-hot-1",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.score }}",
"rightValue": 7
}
]
}
},
"typeVersion": 2.2
},
{
"id": "6b8bf262-506c-403d-b1b6-df6e2540b069",
"name": "Alert Hot Lead",
"type": "n8n-nodes-base.slack",
"position": [
1504,
144
],
"parameters": {
"text": "=Hot lead ({{ $json.score }}/10): {{ $json.Name }} from {{ $json.Company }}\nEmail: {{ $json.Email }}\nLooking for: {{ $json.Message }}\nWhy: {{ $json.reasoning }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "REPLACE_WITH_CHANNEL_ID",
"cachedResultName": "sales-alerts"
},
"otherOptions": {}
},
"typeVersion": 2.3,
"continueOnFail": true
},
{
"id": "1c172277-a03e-4b89-b4a7-072329fe70c7",
"name": "Log Lead",
"type": "n8n-nodes-base.googleSheets",
"position": [
1504,
336
],
"parameters": {
"columns": {
"value": {},
"mappingMode": "autoMapInputData"
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_SPREADSHEET_ID",
"cachedResultName": "Leads"
}
},
"typeVersion": 4.6,
"continueOnFail": true
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "d9923e96-c5ab-45a3-a5b9-fcf7dc955549",
"nodeGroups": [],
"connections": {
"Score Lead": {
"main": [
[
{
"node": "Parse Score",
"type": "main",
"index": 0
}
]
]
},
"Parse Score": {
"main": [
[
{
"node": "Is Hot Lead?",
"type": "main",
"index": 0
}
]
]
},
"Is Hot Lead?": {
"main": [
[
{
"node": "Alert Hot Lead",
"type": "main",
"index": 0
}
],
[
{
"node": "Log Lead",
"type": "main",
"index": 0
}
]
]
},
"On Form Submitted": {
"main": [
[
{
"node": "Score Lead",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Score Lead",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow collects n8n Form submissions, uses OpenAI (GPT-4o-mini) to score each lead from 1–10 with reasoning, posts hot leads (score ≥ 7) to Slack, and appends all scored leads to Google Sheets for tracking. Triggers when a new submission is received from an n8n Form.…
Source: https://n8n.io/workflows/18010/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This end-to-end AI-powered recruitment automation workflow helps HR and talent acquisition teams automate the complete hiring pipeline—from resume intake and parsing to GPT-4-based evaluation, TA appr
[](https://www.youtube.com/watch?v=MD1krFvVKdU) Automatically extract, evaluate, and shortlist multiple resumes against a selected job description using GPT-4. This smart, scalable n8n workflow helps
This workflow collects Amazon product URLs via an n8n form, pulls reviews from Bright Data, extracts complaint and praise themes with OpenAI (GPT-5.6), identifies competitive gaps versus up to three c
A smart and reliable resume screening pipeline for modern HR teams. This workflow combines Google Drive (JD & CV storage), OpenAI (GPT-4-based evaluation), Google Sheets (position mapping + result log
Episode 11: AI shorts factory app. Uses httpRequest, googleSheets, lmChatOpenAi, lmChatOllama. Event-driven trigger; 96 nodes.