1. Opening Problem Statement
Meet Lisa, a sales operations manager at a fast-growing SaaS startup. Every time her team adds new companies to their HubSpot CRM, Lisa spends hours manually checking if the companies’ website domains are valid and trustworthy. Sometimes, these domains lead to disposable emails or broken websites, causing wasted follow-up efforts and tarnished business reputation. Lisa knows missing bad domains can cost the company leads and damage outreach effectiveness.
This tedious process is error-prone and time-consuming, spanning multiple tools — from HubSpot to manual browser checks and Slack notifications. With hundreds of new companies created weekly, Lisa is overwhelmed and risks letting suspicious domains slip through.
That’s where this specific n8n workflow steps in, automating the entire domain validation and alerting process seamlessly.
2. What This Automation Does
When this workflow is active, here’s exactly what it accomplishes for Lisa and her team:
- Triggers automatically on new company creation in HubSpot — no manual running required
- Retrieves detailed company information from HubSpot using the company ID
- Attempts to load the company domain URL to verify its responsiveness and validity
- Checks if the domain is suspicious or leads to disposable emails by analyzing the HTTP response status code
- Posts a detailed alert message to a Slack channel for any domain flagged as problematic, including company name, domain, and HubSpot ID
- Helps sales and operations teams quickly identify and handle risky companies without manual effort
This automation saves at least 3-4 hours per week for Lisa’s team, eliminates manual domain checks, and sharply reduces the risks of nurturing bad leads.
3. Prerequisites ⚙️
- HubSpot CRM account with developer API access — used to receive webhook triggers and company data retrieval
- Slack workspace with bot token and channel set up to receive notifications
- n8n automation platform account — cloud or self-hosted (see self-hosting options)
4. Step-by-Step Guide
Step 1: Set up the HubSpot “On new company created” trigger node
In n8n, click the “+” button → Search for HubSpot Trigger → Select “On new company created” event → Connect your HubSpot Developer API credentials.
You should see the node listening for new company creation events with a unique webhook ID generated.
This node triggers the workflow each time a new company is added in HubSpot.
Common mistake: Forgetting to connect developer-level credentials may cause webhook triggers to fail.
Step 2: Add the “Get company information” HubSpot node
Click “+” → Search for HubSpot node → Choose “Get company” operation → For Company ID, use expression: {{$json["companyId"]}}
Connect your HubSpot API credentials.
You should see company details output including properties like name and domain.
Common mistake: Incorrect property mapping for Company ID leads to no data retrieved.
Step 3: Insert the “Try to load the domain” HTTP Request node
Add an HTTP Request node → Set method to GET (default) → In URL field, enter expression {{$json["properties"]["domain"]["value"]}}
Set response settings to receive full response in text format.
This step tries to load the company domain URL to check if it’s reachable.
Common mistake: Not setting options to get full response may cause status code to be unavailable.
Step 4: Configure the “Check Result” IF node to analyze HTTP response
Add an IF node → Add condition to check if {{$json["statusCode"]}} equals 200 (OK) under string conditions → Set combine operation to “any”.
This evaluates if the domain is valid by checking response status.
Common mistake: Misconfiguring conditions or combine operations might let invalid domains pass unnoticed.
Step 5: Set up “Post to Slack” node for alert notifications
Add a Slack node → Choose “Post Message” action → Set channel to #hubspot-alerts (or your preferred channel) → Customize the message text using expressions:
=:warning: New Company with suspicious domain :warning:
*Name: * {{$node["Get company information"].json["properties"]["name"]["value"]}}
*Domain: * {{$node["Get company information"].json["properties"]["website"]["value"]}}
*ID: * {{$node["Get company information"].json["companyId"]}}Connect your Slack API credentials.
This message posts alert details when the domain fails validation.
Common mistake: Using incorrect Slack credentials or channel names causes message posting failures.
Step 6: Connect nodes logically and activate your workflow
Connect nodes in this order:
“On new company created” → “Get company information” → “Try to load the domain” → “Check Result” → “Post to Slack”
Save and activate the workflow.
Test by adding a new company in HubSpot with a test domain.
Expected outcome is Slack alert if domain is suspicious.
5. Customizations ✏️
- Adjust domain validation status codes: In the IF node, add conditions for other HTTP status codes like 400, 404, or 500 to tighten domain checks.
- Enrich Slack messages: Add more company info like industry or location from the “Get company information” node in Slack messages for deeper context.
- Filter disposable email domains: Integrate with external API nodes or add a Code node to check domain against known disposable email lists before Slack alerts.
6. Troubleshooting 🔧
Problem: “No data from HubSpot node”
Cause: Company ID not correctly passed from trigger.
Solution: Verify expression {{$json["companyId"]}} in the “Get company information” node. Use debug to check input data.
Problem: “Slack messages not posting”
Cause: Invalid Slack credentials or wrong channel.
Solution: Re-authenticate Slack node with a valid bot token and double-check channel spelling.
Problem: “HTTP request status code missing or incorrect”
Cause: HTTP Request node not configured to receive full response.
Solution: Set option “Full response” true in HTTP Request node’s response settings.
7. Pre-Production Checklist ✅
- Confirm HubSpot Developer API credentials work and webhook triggers on new company creation.
- Test HTTP Request node by entering known valid and invalid URLs manually.
- Validate Slack connection with a test message to the alert channel.
- Check all node connections and expressions for accurate data flow.
- Backup existing workflows before activating major changes.
8. Deployment Guide
Once verified, activate the workflow in n8n.
Monitor execution logs in n8n to ensure it triggers correctly on new companies.
Set up Slack notifications to alert sales or support teams immediately.
Review Slack messages regularly and refine conditions as needed for better alert accuracy.
9. Conclusion
By following this guide, you have built a fully automated process that eliminates manual domain checks for new HubSpot companies. This saves Lisa and her team several hours every week, reduces potential bad lead follow-ups, and keeps the sales funnel clean and efficient. Next, consider automating further lead quality checks, integrating email validation APIs, or enriching Salesforce contact updates with domain verification insights. Keep innovating your workflow with n8n to boost productivity!