This workflow corresponds to n8n.io template #11371 — we link there as the canonical source.
This workflow follows the Airtable → 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": "5wwyebCbLPVInizA",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI Lead Enrichment & Notification System",
"tags": [],
"nodes": [
{
"id": "b5082826-df51-4aa4-98ed-b0088cee838f",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-416,
144
],
"parameters": {
"options": {
"buttonLabel": "Submit",
"appendAttribution": false
},
"formTitle": "Contact Us",
"formFields": {
"values": [
{
"fieldLabel": "Name",
"placeholder": "Your good name...",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Email",
"placeholder": "Your best email",
"requiredField": true
},
{
"fieldLabel": "Website",
"requiredField": true
}
]
},
"formDescription": "Fill out this form and we'll get back to you as soon as we can!"
},
"typeVersion": 2.3
},
{
"id": "18e1ac72-09cb-416c-a308-93193fbd5aea",
"name": "HTML",
"type": "n8n-nodes-base.html",
"position": [
32,
16
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "h1",
"cssSelector": "h1"
},
{
"key": "h2",
"cssSelector": "h2",
"returnArray": true
},
{
"key": "meta_description",
"attribute": "content",
"cssSelector": "meta[name=\"description\"]",
"returnValue": "attribute"
},
{
"key": "nav_links",
"attribute": "href",
"cssSelector": "nav a, header a",
"returnArray": true,
"returnValue": "attribute"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "7d64bccb-adfb-4ae6-aac0-b39bfedd04bf",
"name": "Message a model",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
256,
16
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"responses": {
"values": [
{
"role": "system",
"content": "You are a Sales Researcher. I will give you the H1, H2, and Description from a company's home page.\n\nYour Goal: Determine if this text CLEARLY explains what the company does.\n\nScenario A (Clear): If you understand the business, write a 2-sentence summary in English of the business to better help a sales agent understand the lead. Scenario B (Unclear): If the text is vague (e.g., just says \"Welcome\" or \"Future is here\"), look at the provided nav_links list. Find the one most likely to be the \"About\" or \"Mission\" page.\n\nOutput JSON ONLY: { \"status\": \"success\" OR \"need_more_info\", \"summary\": \"The script...\" (if success), \"fallback_url\": \"/about-us\" (if need_more_info, return the specific path from the list) }"
},
{
"content": "=H1: {{ $json.h1 }} H2: {{ $json.h2 }} Description: {{ $json.meta_description }} Links: {{ $json.nav_links }}"
}
]
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "2caaa192-4e0c-4271-9036-d8d50d877e67",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
608,
0
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Script Ready",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8a25257f-9d45-4e7a-9128-5bcfad97c3d5",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.output[0].content[0].text }}",
"rightValue": "\"status\": \"success\""
}
]
},
"renameOutput": true
},
{
"outputKey": "Need Deep Dive",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "05249675-b973-4732-a540-f0d1e4ae82ce",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.output[0].content[0].text }}",
"rightValue": "\"status\": \"need_more_info\""
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.3
},
{
"id": "c866bfb2-ac90-4b59-9837-89a693c288a0",
"name": "HTML1",
"type": "n8n-nodes-base.html",
"position": [
1280,
-32
],
"parameters": {
"options": {},
"operation": "extractHtmlContent",
"extractionValues": {
"values": [
{
"key": "about_text",
"cssSelector": "main"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "cab738e9-b4ce-405d-a32a-632f2151e124",
"name": "Message a model1",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1504,
-32
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"responses": {
"values": [
{
"role": "system",
"content": "You are a Sales Rep. I will give you text from a company's \"About Us\" page. Your goal is to write a 2-sentence summary in English so that a sales rep understands the business of the lead clearly.\n\nStrategy:\n\nMention their mission or history found in the text.\n\nOutput: Just the 2 sentences of the script. Do not output JSON. Just the raw text."
},
{
"content": "=Page Text: {{ $json.about_text }}"
}
]
},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 2
},
{
"id": "a881a842-c512-479d-a845-6d71af2ad79c",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
2080,
-160
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "e87dde69-2c8e-4e0b-ac0d-52d1f31bd5b8",
"name": "Create a record",
"type": "n8n-nodes-base.airtable",
"position": [
2304,
-160
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app2mABczvG6LN6hj",
"cachedResultUrl": "https://airtable.com/app2mABczvG6LN6hj",
"cachedResultName": "n8n CRM"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblydhiZPC5Uytfs1",
"cachedResultUrl": "https://airtable.com/app2mABczvG6LN6hj/tblydhiZPC5Uytfs1",
"cachedResultName": "n8n Smart Lead CRM"
},
"columns": {
"value": {
"Date": "={{ $('On form submission').item.json.submittedAt }}",
"Name": "={{ $('On form submission').item.json.Name }}",
"Email": "={{ $('On form submission').item.json.Email }}",
"Website": "={{ $('On form submission').item.json.Website }}",
"AI Insight": "={{ $json.data[0].final_script }}"
},
"schema": [
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Insight",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "AI Insight",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create"
},
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "c055003a-edc9-435c-bea2-fa63964fa6d1",
"name": "Send a message",
"type": "n8n-nodes-base.slack",
"position": [
2528,
-160
],
"parameters": {
"text": "=New lead acquired. \nName: {{ $json.fields.Name }}\nEmail: {{ $json.fields.Email }}\nWebsite: {{ $json.fields.Website }}\nAI Insight: {{ $json.fields['AI Insight'] }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "C09UQRDCTT4",
"cachedResultName": "all-n8n-test"
},
"otherOptions": {
"includeLinkToWorkflow": false
},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.3
},
{
"id": "be69ffc9-7815-4e8e-a6c6-938e7a7a62fe",
"name": "Scrape home page",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
-192,
144
],
"parameters": {
"url": "={{\n(() => {\n // 1. Trim whitespace (Crucial first step)\n let url = $json.Website.trim();\n\n // 2. Add protocol if missing (Default to https)\n if (!url.match(/^https?:\\/\\//)) {\n url = 'https://' + url;\n }\n\n try {\n // 3. Parse the URL object\n const urlObj = new URL(url);\n\n // 4. Add 'www.' ONLY if:\n // a) It is missing\n // b) It looks like a root domain (has exactly 2 parts, e.g., 'harvex-ai.com')\n // This prevents breaking subdomains like 'docs.google.com'\n if (!urlObj.hostname.startsWith('www.') && urlObj.hostname.split('.').length === 2) {\n urlObj.hostname = 'www.' + urlObj.hostname;\n }\n\n // 5. Return the clean URL\n return urlObj.toString();\n\n } catch (error) {\n // If the input is total garbage, return original to let the node error out naturally\n return url;\n }\n})()\n}}",
"options": {
"redirect": {
"redirect": {}
},
"response": {
"response": {
"responseFormat": "text"
}
}
}
},
"typeVersion": 4.3
},
{
"id": "5309a8ec-e1e8-4761-a772-434b8f819265",
"name": "Error handling",
"type": "n8n-nodes-base.airtable",
"position": [
864,
384
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app2mABczvG6LN6hj",
"cachedResultUrl": "https://airtable.com/app2mABczvG6LN6hj",
"cachedResultName": "n8n CRM"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblydhiZPC5Uytfs1",
"cachedResultUrl": "https://airtable.com/app2mABczvG6LN6hj/tblydhiZPC5Uytfs1",
"cachedResultName": "n8n Smart Lead CRM"
},
"columns": {
"value": {
"Date": "={{ $('On form submission').item.json.submittedAt }}",
"Name": "={{ $('On form submission').item.json.Name }}",
"Email": "={{ $('On form submission').item.json.Email }}",
"Website": "={{ $('On form submission').item.json.Website }}",
"AI Insight": "Scrape Failed - Check URL manually"
},
"schema": [
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Insight",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "AI Insight",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create"
},
"credentials": {
"airtableTokenApi": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "9c19143c-6883-4573-9ee9-0d8fa89fdf23",
"name": "Construct secondary URL",
"type": "n8n-nodes-base.set",
"position": [
832,
-16
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "755a7c6e-145e-462b-a43d-57805917f014",
"name": "Fallback URL",
"type": "string",
"value": "={{\n(() => {\n const extractedPath = $json.output[0].content[0].text.match(/\"fallback_url\":\\s*\"([^\"]+)\"/)[1];\n\n\n const rawBase = $('On form submission').item.json.Website;\n\n\n const cleanBase = (rawBase.startsWith('http') ? rawBase : 'https://' + rawBase).replace(/\\/$/, \"\");\n\n // 4. Combine them\n return extractedPath.startsWith('http') ? extractedPath : cleanBase + extractedPath;\n})()\n}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "edaff449-2871-43e1-80f4-e9247eb39634",
"name": "Scrape secondary URL",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
1056,
-16
],
"parameters": {
"url": "={{ $json[\"Fallback URL\"] }}",
"options": {
"response": {
"response": {
"responseFormat": "text"
}
}
}
},
"typeVersion": 4.3
},
{
"id": "e709c2bb-ad89-48be-87a7-a1c8e5828ebb",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-448,
-832
],
"parameters": {
"width": 720,
"height": 704,
"content": "## AI Lead Enrichment & Notification System\n\n### This n8n template automates the lead enrichment process for your business. Once a lead fills out a form, the workflow scrapes their website, provides a summary, and logs everything into a CRM before notifying your team.\n\n**Some use cases:** \"Speed-to-Lead\" optimization, lead enrichment, automated prospect research.\n\n### How it works\n1. **Ingestion:** A lead submits their details (Name, Email, Website) via a form.\n2. **Intelligent scraping:** The workflow scrapes the provided URL.\n3. **AI Analysis:** OpenAI's model (GPT-4o) analyzes the extracted data and determines whether there is enough info or if the workflow needs to scrape the \"About Us\" page.\n4. **CRM Sync:** The CRM (Airtable) is updated with the enriched data.\n5. **Notification:** An instant Slack notification is sent to the team channel.\n\n### How to use the workflow\n1. **Configure the form:** Open the trigger form and input the required fields.\n2. **Setup OpenAI:** Ensure that your credentials are connected.\n3. **Database mapping:** Ensure your Airtable base has the following columns: *Name*, *Website*, *AI Insight*, *Email*, and *Date*.\n4. **Slack setup:** Specify the desired Slack channel for notifications.\n5. **Test it out!** Open the form, enter sample data (with a real website), and watch the system enrich the lead for you.\n\n### Requirements\n* **OpenAI API Key** (For analyzing website content and generating summaries)\n* **Airtable** (For CRM and logging)\n* **Slack** (For team notifications)"
},
"typeVersion": 1
},
{
"id": "3605cda1-451a-43f4-b166-194265211bc8",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-464,
-80
],
"parameters": {
"color": 7,
"width": 1184,
"height": 368,
"content": "## Scrape the URL provided\nWe begin by scraping the URL that the user submitted in the form and assess whether it contains enough substance to summarize."
},
"typeVersion": 1
},
{
"id": "d23c21d6-b83b-4858-8b63-eb7b6226ccd3",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-128
],
"parameters": {
"color": 7,
"width": 1184,
"height": 288,
"content": "## Construct a secondary URL\nIf the provided URL does not contain enough information, a secondary URL is constructed and scraped based on the initial scraping performed."
},
"typeVersion": 1
},
{
"id": "3f3f2b2c-4178-4bfa-bfe5-078526212487",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
560
],
"parameters": {
"color": 7,
"width": 416,
"height": 192,
"content": "## Error Handling\nIn the event the web scraping fails, we log it into our CRM for the user to check manually"
},
"typeVersion": 1
},
{
"id": "5c5e7bc9-4a1d-40b7-b62c-3d8732255b86",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
2032,
-272
],
"parameters": {
"color": 7,
"width": 640,
"height": 272,
"content": "## CRM logging and Slack notif\nWe log the customer data in our CRM and send an instant notification to our Slack channel for follow-up"
},
"typeVersion": 1
},
{
"id": "ebb8540d-f156-45c7-988f-958ca9162123",
"name": "Clean Data",
"type": "n8n-nodes-base.set",
"position": [
1648,
-304
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "54b5f206-3282-4acd-880e-17e78d105eba",
"name": "final_script",
"type": "string",
"value": "={{ $json.output[0].content[0].text.match(/\"summary\":\\s*\"([^\"]+)\"/)[1] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "bb456481-3cfe-45a1-b194-219953c11e9a",
"name": "Clean Data1",
"type": "n8n-nodes-base.set",
"position": [
1856,
-32
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "7e8669bd-3778-4c2c-8865-79af0ce7f384",
"name": "final_script",
"type": "string",
"value": "={{ $json.output[0].content[0].text }}"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "a54cc183-00d4-46e0-8b58-b620416ad71d",
"connections": {
"HTML": {
"main": [
[
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"HTML1": {
"main": [
[
{
"node": "Message a model1",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Clean Data",
"type": "main",
"index": 0
}
],
[
{
"node": "Construct secondary URL",
"type": "main",
"index": 0
}
],
[
{
"node": "Error handling",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "Create a record",
"type": "main",
"index": 0
}
]
]
},
"Clean Data": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Clean Data1": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Create a record": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Message a model1": {
"main": [
[
{
"node": "Clean Data1",
"type": "main",
"index": 0
}
]
]
},
"Scrape home page": {
"main": [
[
{
"node": "HTML",
"type": "main",
"index": 0
}
],
[
{
"node": "Error handling",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Scrape home page",
"type": "main",
"index": 0
}
]
]
},
"Scrape secondary URL": {
"main": [
[
{
"node": "HTML1",
"type": "main",
"index": 0
}
],
[
{
"node": "Error handling",
"type": "main",
"index": 0
}
]
]
},
"Construct secondary URL": {
"main": [
[
{
"node": "Scrape secondary URL",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
airtableTokenApiopenAiApislackOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Some use cases: "Speed-to-Lead" optimization, lead enrichment, automated prospect research. Ingestion: A lead submits their details (Name, Email, Website) via a form. Intelligent scraping: The workflow scrapes the provided URL. AI Analysis: OpenAI's model (GPT-4o) analyzes the…
Source: https://n8n.io/workflows/11371/ — 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 workflow automates the "speed-to-lead" process for insurance agencies. It instantly triggers an AI voice call when a new lead comes in, qualifies their needs via conversation, and automatically g
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This workflow automatically turns any audio file uploaded to Google Drive into a complete podcast episode. It handles transcription, content generation, blog drafting, social copy creation, thumbnail
How it works • Automates multi-platform social media posting (Instagram, YouTube, TikTok, etc.) using AI-generated content • Integrates Airtable, n8n, and Blotato for full content scheduling and publi
This workflow is an AI-powered lighting and look development pipeline designed for VFX production. It transforms a single lighting brief into multiple high-quality cinematic lighting references using