n8n Automate Lead Enrichment with Web Scraping, GPT-4o, Airtable & Slack
Form submission → intelligent web scraping → AI analysis → CRM logging → team Slack notification
- Who
- Sales operations teams and businesses needing automated lead follow-up
- You get
- After a prospect submits a form, automatically scrape and analyze their website, generate a business summary, log to Airtable, and notify Slack
Constraints
Prerequisites: n8n instance (self-hosted or cloud); OpenAI API key; Airtable account and base; Slack workspace with OAuth permissions. Costs: OpenAI API per token; n8n cloud per plan; Airtable/Slack have free tiers. Input: Prospect submits Name, Email, Website via n8n form. Output: Airtable record + Slack channel notification.
What they did
harvexai published this workflow template in the n8n official template gallery, demonstrating a complete lead enrichment automation: collecting prospect information via native n8n form, scraping the target website with HTTP Request node, extracting key page elements via HTML node, calling GPT-4o to judge content quality and generate a summary or decide to scrape the About page, then writing enriched data to Airtable and notifying the sales team via Slack. The template contains 20 nodes covering main flow, error handling, and branching logic.
How it went
The template author claims this workflow enables 'Speed-to-Lead' optimization, lead enrichment, and automated prospect research (basis=template, author_report). The template shows 500 views on n8n. This site has not executed or tested the workflow; actual runtime stability and summary quality are unverified.
Worth knowing
1. Credential requirements: openAiApi, airtableTokenApi, and slackOAuth2Api must be configured. 2. Airtable column names must exactly match: Name, Website, AI Insight, Email, Date. 3. The HTTP scrape node contains custom JS to auto-complete URL protocol and www. prefix, but may behave unexpectedly with non-standard domain structures. 4. The error handling path only triggers on scrape failure, writing 'Scrape Failed - Check URL manually' to CRM without retry. 5. The Airtable base ID and table ID in the template are author examples and must be replaced. 6. The Slack channelId is hardcoded as an example and must be reselected. 7. Both OpenAI system prompts require English output; modify if other languages are needed. 8. The 'Clean Data' node uses regex to extract the summary field; if GPT-4o deviates from the expected JSON format, extraction may fail.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Message a model node: connect OpenAI API credentials.
- Message a model1 node: connect OpenAI API credentials.
- Create a record node: connect Airtable credentials.
- Send a message node: connect Slack OAuth2 credentials.
- Error handling node: connect Airtable credentials.
Configuration to replace
- Source template is n8n public workflow #11371 (~20 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Configure the form trigger
In n8n, open the 'On form submission' node. Set the form title to 'Contact Us' and add three required fields: Name (text), Email (email type), and Website (text). The form description can be 'Fill out this form and we'll get back to you as soon as we can!'. Save and n8n will generate a form URL.
Connect OpenAI credentials
Add an openAiApi credential in n8n's credential manager with your OpenAI API Key. Ensure both 'Message a model' and 'Message a model1' nodes are linked to this credential. The model selected is chatgpt-4o-latest (GPT-4o).
Configure Airtable database structure
Create or open an Airtable base with these columns: Name (single line text), Website (single line text), AI Insight (single line text), Email (single line text), Date (date time). In the 'Create a record' node, select the matching base and table; n8n will map the fields.
Configure Slack notification channel
Add a slackOAuth2Api credential in n8n and complete OAuth authorization. In the 'Send a message' node, select the target channel (e.g. #all-n8n-test) and ensure the bot has posting permissions.
Execution prompt · Source text。Slack node 'Send a message' Text field
=New lead acquired. Name: {{ $json.fields.Name }} Email: {{ $json.fields.Email }} Website: {{ $json.fields.Website }} AI Insight: {{ $json.fields['AI Insight'] }}Test the workflow
Open the form URL, enter a real name, email, and website address (use a real accessible website), then submit. Watch the execution log: you should see 'Scrape home page' → 'HTML' → 'Message a model' → branch to 'Script Ready' or 'Need Deep Dive' based on AI judgment → finally 'Create a record' and 'Send a message' execute successfully.
Understand the runtime logic (optional reference)
At runtime the workflow automatically: 1) HTTP Request node scrapes the submitted website, auto-completing https:// and www.; 2) HTML node extracts h1, h2, meta description, nav links; 3) First OpenAI node judges content clarity, outputs JSON deciding whether to scrape the About page; 4) Switch node routes the flow; 5) If needed, constructs a secondary URL and rescrapes; 6) Second OpenAI generates summary; 7) Aggregate combines data; 8) Airtable creates record; 9) Slack sends notification. The error path logs 'Scrape Failed - Check URL manually' to CRM.
Execution prompt · Source text。OpenAI node 'Message a model' System Message field
You are a Sales Researcher. I will give you the H1, H2, and Description from a company's home page. Your Goal: Determine if this text CLEARLY explains what the company does. Scenario 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. Output 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) }Execution prompt · Source text。OpenAI node 'Message a model' User Message field
=H1: {{ $json.h1 }} H2: {{ $json.h2 }} Description: {{ $json.meta_description }} Links: {{ $json.nav_links }}Execution prompt · Source text。OpenAI node 'Message a model1' System Message field
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. Strategy: Mention their mission or history found in the text. Output: Just the 2 sentences of the script. Do not output JSON. Just the raw text.
Execution prompt · Source text。OpenAI node 'Message a model1' User Message field
=Page Text: {{ $json.about_text }}
Prompt you can copy
Setup guidance · Editorial suggestion。Give to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are an n8n workflow setup assistant. The user wants to replicate the 'AI Lead Enrichment & Notification System' template. First confirm they have: 1) n8n instance access; 2) OpenAI API Key; 3) Airtable base with Name/Website/AI Insight/Email/Date columns; 4) Slack OAuth permissions. Then guide them step by step to configure the form trigger, connect credentials, map database fields, set the Slack channel, and finally test with a real website. If nodes fail, check credential connections and HTTP status codes in execution logs.
Copy this prompt to an AI assistant and confirm four prerequisites before starting setup guidance
Source
Automate lead enrichment with web scraping, GPT-4o, Airtable and Slack notifications · harvexai · n8n.io · 2025-11-30
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.