n8n Real Estate Lead Automation: IDX to HubSpot Workflow
Build a 5-node n8n real estate lead automation workflow that captures IDX leads, enriches contacts via Apollo, creates them in HubSpot Free, and fires a personalized email and SMS in under 30 seconds. Step-by-step node configuration included.
After building 30+ lead automation workflows for real estate agents on the Agent OS platform, our team can tell you that n8n real estate lead automation is the single highest-ROI project most agents ignore. The average agent takes over 15 hours to respond to an IDX lead. The workflow in this post fires in under 30 seconds.
n8n real estate lead automation connects your IDX website's lead capture forms directly to a workflow engine, eliminating manual CRM entry and firing a personalized email and SMS within 30 seconds of a buyer registering on your site. The 5-node workflow in this post does exactly that using n8n, Apollo, and HubSpot Free.
The Rain Automation team designed and maintains Agent OS, an IDX platform that ships webhook-ready lead capture forms. We've watched agents lose deals they should have won because their follow-up process was a patchwork of email notifications, manual CRM entry, and late-night text messages. This post walks you through the exact 5-node n8n workflow we built to fix that.
- The MIT Lead Response Management Study found that responding within 5 minutes makes you 21x more likely to qualify a lead, yet agents average 917 minutes (15+ hours) to respond per AgentZap's 2026 lead statistics (citing Inman 2025 data).
- This 5-node n8n workflow captures an IDX form submission, enriches the contact via Apollo, creates them in HubSpot Free, and sends a day-0 email and SMS in under 30 seconds total.
- HubSpot deprecated API keys in 2022, so this tutorial uses the correct Private App token method with the crm.objects.contacts.write scope.
- Agent OS IDX lead forms POST structured data (name, email, phone, listing_url, price range) to any webhook URL you configure, making this workflow plug-and-play.
What Is IDX Lead Capture and Why It Needs a Webhook
IDX (Internet Data Exchange) lead capture collects structured buyer data from your real estate website's MLS-powered search, including which properties a visitor viewed, their price range, and bedroom count. Unlike a generic contact form, IDX lead data gives you context to personalize your first response, but only if you can act on it within minutes.
Here's what makes IDX forms different from a basic "Contact Us" page. When someone registers on your IDX site, the form payload contains fields like listing_url, price_min, price_max, and bedrooms. That's structured intent data. A generic contact form gives you a name, email, and a free-text message. You can't automate personalization from free text. You can from structured fields.
The problem is that most IDX platforms send you an email notification when a new lead registers. That's it. You open Gmail, read the notification, switch to your CRM, manually type in the contact info, then draft a response. By the time you've done all that, the lead has filled out forms on two other agents' websites.
A webhook changes the game. Instead of sending you an email notification, your IDX platform POSTs the lead data directly to an automation tool like n8n. No human in the loop. No email notification to miss. The data flows straight into your workflow, and the follow-up fires before you even know the lead exists.
If you're not familiar with how IDX works under the hood, we wrote a detailed breakdown in What Is IDX in Real Estate and How Does It Work.
The Manual Follow-Up Problem (and What It Costs You)
Each missed IDX lead represents roughly $10,000 in lost buyer's agent commission based on NAR's November 2025 median home sale price of $409,200 at a 2.43% buyer's agent commission rate (Redfin Q2 2025 post-settlement average). The MIT Lead Response Management Study by Dr. James Oldroyd found that agents who respond within 5 minutes are 21x more likely to qualify a lead compared to those who wait 30 minutes. Per AgentZap's 2026 real estate lead statistics (citing Inman 2025 data), the average agent response time is 917 minutes, over 15 hours.
Let me break down what the manual process actually looks like:
- A buyer registers on your IDX website at 9:14 PM
- Your IDX platform emails you a notification
- You check email the next morning at 7:30 AM (that's already 10+ hours)
- You open your CRM and manually create a new contact
- You copy-paste the lead's details from the notification email
- You draft a personalized email referencing the property they viewed
- You send a text message from your phone
That sequence takes 15 minutes on a good day. And most of those steps happen the morning after the lead came in.
Now here's the math that should bother you. According to AgentZap's 2026 lead statistics, 78% of buyers work with the first agent who responds. And a significant share of IDX inquiries arrive after business hours, evenings and weekends, when checking email manually is hit or miss. In our experience, more than half of IDX leads come in after hours. So the majority of your leads arrive when you're not working, and the first agent to respond almost always wins the deal.
Agents in the r/n8n community have described spending 30+ minutes after showings manually copying lead data into their CRM. That context-switching between the IDX notification email, the CRM, and a texting app is exactly the friction this workflow eliminates.
One of our clients last year was converting IDX leads at about 2%. Good traffic, decent listings, but slow follow-up. We built this exact n8n workflow for her site. Within 60 days, her conversion rate was at 6.8%. Nothing else changed. Same traffic, same listings. The only difference was that leads got a personalized email and SMS within 30 seconds instead of 10 hours.
Here's a comparison of what the two processes look like side by side:
| Step | Manual Process | Time | n8n Workflow | Time |
|---|---|---|---|---|
| Lead submits IDX form | Email notification sent | 0 sec | Webhook fires to n8n | 0 sec |
| Agent sees notification | Check email next morning | ~10 hours | Instant (automated) | 0 sec |
| Contact enrichment | Skip (no tool set up) | 0 min | Apollo API enriches contact | 2 sec |
| CRM entry | Open HubSpot, type info manually | 4 min | HubSpot contact auto-created | 3 sec |
| Personalized email | Draft and send | 5 min | Email node sends with property details | 5 sec |
| SMS follow-up | Open phone, type message | 3 min | Twilio node sends SMS | 5 sec |
| Total | ~10 hrs 12 min | < 30 sec |
That table is the entire argument for automating your lead follow-up. If you're still doing this manually, you're giving deals away.
How n8n Real Estate Lead Automation Works: The 5-Node Workflow
The complete workflow uses five n8n nodes in sequence. These are: a Webhook trigger that receives IDX form data, an HTTP Request node that enriches the contact via Apollo, an IF node that checks enrichment success, a HubSpot node that creates the CRM contact, and parallel Send Email and Twilio nodes that fire the day-0 follow-up.
Here's the flow in plain language:
- Webhook Trigger receives the JSON payload when someone submits your IDX lead form
- HTTP Request (Apollo) takes the lead's email and returns their phone number, LinkedIn URL, and company
- IF Node checks whether Apollo returned a phone number (determines whether to send SMS)
- HubSpot Create Contact creates a new contact with all enriched fields and sets the lead status
- Send Email + Twilio SMS (parallel) fires a personalized email and text message simultaneously
The entire sequence executes in under 30 seconds from form submission. Most of that time is API latency from Apollo and HubSpot, not processing.
If you've never used n8n before, it's an open-source workflow automation platform similar to Zapier but self-hostable and far more configurable. You can run it free on your own server or use n8n Cloud for a managed experience. For a deeper intro to connecting n8n with CRMs, see our n8n CRM integration tutorial. If you're also evaluating Make as part of your stack, how to connect both tools to your CRM in one workflow covers HubSpot, Pipedrive, Salesforce, and Zoho side by side.
Step 1: Set Up the n8n Webhook Trigger
The Webhook node in n8n creates a unique URL that your IDX platform posts lead data to, replacing the email notification with a direct data pipeline. Configure it with HTTP Method POST, no authentication for the initial setup, and Response Mode set to "Last Node" so the IDX form gets a proper response.
Create a new workflow in n8n and add a Webhook node as your trigger. Here are the exact configuration parameters:
- HTTP Method: POST
- Path:
idx-lead-capture(or any slug you prefer) - Authentication: None (for initial setup; add Header Auth in production)
- Response Mode: Last Node
- Response Code: 200
If you're not sure why "Last Node" is the right choice here rather than "Immediately" or "Respond to Webhook," the differences matter — a misconfigured response mode can cause your IDX form to time out or fail silently. The full breakdown is in the n8n webhook response mode guide.
Once you save, n8n generates a webhook URL that looks like this:
https://your-n8n-instance.com/webhook/idx-lead-capture
Copy that URL and paste it into your IDX platform's webhook configuration. In Agent OS, you'll find this under Settings > Lead Capture > Webhook URL. Agent OS lead forms POST structured JSON with this schema:
{
"name": "Jane Smith",
"email": "[email protected]",
"phone": "",
"listing_url": "https://yoursite.com/listing/123-oak-street",
"price_min": 350000,
"price_max": 500000,
"bedrooms": 3,
"source_page": "/search/results"
}
Notice the phone field is often blank. IDX leads frequently provide only name and email on first touch. That's exactly why the enrichment step matters (more on that in Step 2).
To test your webhook before connecting your live IDX site, use Postman or curl:
curl -X POST https://your-n8n-instance.com/webhook-test/idx-lead-capture \
-H "Content-Type: application/json" \
-d '{"name":"Test Lead","email":"[email protected]","phone":"","listing_url":"/listing/test","price_min":300000,"price_max":450000,"bedrooms":3,"source_page":"/search"}'
If you see the execution appear in your n8n workflow editor, the webhook is working. If not, check the troubleshooting section below.
Step 2: Enrich the Contact with Apollo (or AnyMailFinder)
Contact enrichment fills in the missing phone number, LinkedIn profile, and company name that IDX forms rarely collect on first touch. The Apollo /people/match API endpoint takes an email address and returns structured contact data, increasing your chance of reaching the lead by phone from near-zero to roughly 60-70% based on what we've seen across our client workflows.
Add an HTTP Request node after the Webhook trigger. Here's the exact configuration for Apollo's People Match endpoint:
- URL:
https://api.apollo.io/api/v1/people/match - HTTP Method: POST
- Authentication: Header Auth
- Header Name:
X-Api-Key - Header Value:
{{ your Apollo API key }}
- Header Name:
- Body Content Type: JSON
- Body:
{
"email": "{{ $json.email }}"
}
The response from Apollo includes fields you'll map in later nodes:
person.phone_numbers[0].sanitized_number(the enriched phone number)person.linkedin_url(LinkedIn profile URL)person.organization.name(company name)person.title(job title)
Apollo's free plan includes 1,200 credits per year (100/month), but phone number enrichment specifically draws from mobile credits, which are limited to just 5 per month on the free plan. That's enough to verify the workflow setup, not for production use with real lead volume. Their paid plans start at $49/month. For most agents running 50-200 IDX leads monthly, a paid Apollo plan or a more cost-effective alternative is necessary. AnyMailFinder is a solid fallback and can serve as the primary enrichment source if Apollo's pricing doesn't fit your budget.
You can also add a second HTTP Request node using AnyMailFinder for leads that Apollo can't match. AnyMailFinder is particularly good at finding phone numbers for contacts in smaller markets where Apollo's database is thinner.
After the enrichment node, add an IF node to check whether a phone number was returned:
- Condition:
{{ $json.person.phone_numbers[0].sanitized_number }}is not empty - True branch: Routes to both email AND SMS nodes
- False branch: Routes to email node only (skip SMS if no phone)
This prevents your workflow from crashing when Apollo returns an empty phone field. For more on structuring CRM data from enrichment, check out how to eliminate manual CRM data entry.
Disclosure: Links to n8n, Apollo, and AnyMailFinder in this article are affiliate links. Rain Automation may receive a commission at no extra cost to you. We only recommend tools we actively use in production.
Step 3: Create the Contact in HubSpot Free
HubSpot Free CRM is the best option for agents who want automated contact creation without a monthly CRM bill. The key setup detail most tutorials get wrong: HubSpot deprecated API keys in November 2022 and now requires Private App tokens for all API access. You'll need to create a Private App with the crm.objects.contacts.write scope before this node will work.
Here's how to set up the HubSpot authentication correctly:
- Go to HubSpot > Settings > Integrations > Private Apps
- Click "Create a Private App"
- Name it something like "n8n Lead Automation"
- Under Scopes, enable
crm.objects.contacts.writeandcrm.objects.contacts.read - Click "Create App" and copy the generated token
Now add a HubSpot node in n8n with these parameters:
- Resource: Contact
- Operation: Create
- Authentication: Private App Token (paste the token from step 5)
- Field Mappings:
firstname:{{ $json.name.split(' ')[0] }}lastname:{{ $json.name.split(' ').slice(1).join(' ') }}email:{{ $json.email }}phone:{{ $node['Apollo Enrichment'].json.person.phone_numbers[0].sanitized_number }}hs_lead_status:NEWnotes:IDX lead from {{ $json.source_page }}. Interested in {{ $json.listing_url }}. Budget: ${{ $json.price_min }} - ${{ $json.price_max }}.
Two things we always configure that most tutorials skip:
Duplicate handling. HubSpot will throw a 409 error if a contact with that email already exists. In your n8n node settings, set the "On Error" behavior to "Continue" and add a secondary branch that updates the existing contact instead of creating a new one. This is especially important for IDX sites where the same buyer might search multiple times over several weeks.
Pipeline assignment. If you're using HubSpot's deal pipeline (available on Free), add a second HubSpot node after the contact creation to create a Deal associated with the new contact. Set the deal stage to your first pipeline stage (usually "New Lead" or "Inquiry").
For a complete walkthrough of the HubSpot-n8n connection, we wrote a dedicated tutorial: n8n HubSpot Integration Tutorial: Connect Leads to Your CRM. And if you want to see how deal stages can auto-progress as leads engage, read Automate Your Deal Pipeline: Stage Progression and Alerts.
Step 4: Send a Day-0 Email and SMS
The day-0 follow-up is the most critical touchpoint in your entire lead funnel. Configure n8n's Send Email node and Twilio SMS node in a parallel branch so both fire simultaneously within seconds of the IDX form submission. Reference the specific property the lead viewed to demonstrate you're paying attention, not blasting a generic template.
After the HubSpot node, add two branches running in parallel:
Email Configuration (Send Email Node)
- From:
[email protected] - To:
{{ $json.email }} - Subject:
{{ $json.name.split(' ')[0] }}, I saw you were looking at {{ $json.listing_url }} - Body (HTML):
Hi {{ $json.name.split(' ')[0] }},I noticed you were browsing properties in the ${{ $json.price_min.toLocaleString() }} - ${{ $json.price_max.toLocaleString() }} range.
I'd love to help you find the right fit. Want to hop on a quick call this week? Here's my calendar: https://calendar.app.google/ZW7PCGvUhwsY13wYA
Talk soon,
[Your Name]
[Your Brokerage]
Keep the email short. The lead just filled out a form. They don't need a 500-word introduction to your brokerage. They need to know a real person saw their inquiry and is ready to help. In our experience, emails under 80 words get 3-4x the reply rate of longer templates.
SMS Configuration (Twilio Node)
- From: Your Twilio phone number
- To:
{{ $node['Apollo Enrichment'].json.person.phone_numbers[0].sanitized_number }} - Message:
Hi {{ $json.name.split(' ')[0] }}, this is [Your Name]. I saw you were looking at homes in the ${{ $json.price_min / 1000 }}k-${{ $json.price_max / 1000 }}k range. Would a quick call this week help? Here's my calendar: https://calendar.app.google/ZW7PCGvUhwsY13wYA
The SMS only fires if the IF node confirmed a phone number exists. This prevents Twilio errors and wasted credits.
Both messages include a calendar link instead of "call me anytime." That's intentional. In our experience, a calendar link converts significantly better than an open-ended "let me know when works" because it removes the friction of scheduling. For more on building effective automated follow-up sequences, including multi-touch drip campaigns, see our dedicated guide.
What the 30-Second Response Looks Like to the Lead
From the lead's perspective, they submit a property search registration on your IDX website at 9:14 PM, and by 9:15 PM they have a personalized email and a text message from you referencing the exact property they were looking at. No other agent they contacted that evening will match that speed.
Picture this: Sarah is browsing homes in the $400k-$550k range after putting her kids to bed. She registers on three agents' IDX websites between 9 PM and 9:30 PM. Two of those agents will see the notification email tomorrow morning and respond by 10 AM. You responded at 9:15 PM with a message that references her price range and includes a calendar link.
The MIT Lead Response Management Study found that leads contacted within 5 minutes are 21x more likely to enter the sales cycle compared to leads contacted at 30 minutes. At 917 minutes (the industry average per AgentZap's 2026 data citing Inman 2025), most agents aren't even in the same category.
So what does Sarah do? She books a call with you. Not because you're the best agent. Not because your listings are better. Because you responded in 30 seconds and the other two agents haven't responded at all.
This is the core value of real estate lead follow-up automation. Speed wins.
Common Setup Issues and How to Fix Them
The five most common problems agents hit when building this workflow are webhook connectivity failures, HubSpot duplicate contact errors, Apollo rate limits, Twilio number configuration, and n8n error handling. Here's how to diagnose and fix each one.
Webhook not triggering
- Make sure you're testing with the
-testURL (e.g.,/webhook-test/idx-lead-capture) while the workflow editor is open. The production URL only works after you activate the workflow. - Verify your IDX platform is POSTing (not GETting) to the URL.
- Check that the Content-Type header is
application/json. - Use Postman or curl to isolate whether the issue is n8n or your IDX platform.
HubSpot duplicate contact error (409)
HubSpot rejects contact creation if the email already exists. Two options:
- Set "On Error" to "Continue" in the node settings, then add an Update Contact branch.
- Use the HubSpot "Create or Update" operation if your n8n HubSpot node version supports it.
See 10 HubSpot Workflow Automation Examples for more HubSpot-specific patterns.
Apollo rate limits
Apollo's paid plans allow higher throughput but still limit to 5 requests per second. If you're running high-traffic IDX sites, add a Wait node (1 second) before the Apollo HTTP Request to stay under the rate limit. For most solo agents, this won't be an issue.
Twilio number not sending SMS
- Verify your Twilio number has SMS capability enabled (not all numbers do).
- Check that the recipient's number is in E.164 format (
+1XXXXXXXXXX). - If you're sending to numbers you haven't verified, you need a paid Twilio account (trial accounts restrict recipients).
n8n error workflow
Always set up an Error Workflow in n8n's workflow settings. Create a second workflow that sends you a Slack or email notification when the main workflow fails. In our experience, most failures happen silently, and you won't know a lead was dropped unless you have error monitoring in place. This is something we cover in the n8n Send Email Node tutorial as well.
Frequently Asked Questions
Here are the most common questions we hear from agents setting up n8n real estate lead automation workflows, from choosing the right enrichment plan to staying compliant with SMS regulations.
Do I need a paid n8n plan for this workflow?
No. You can self-host n8n for free on a $5/month VPS. n8n Cloud starts at $24/month (Starter plan) if you prefer a managed solution. The free self-hosted version has no workflow limits and includes all the nodes used in this tutorial.
Can I use a different CRM than HubSpot?
n8n has native nodes for Salesforce, Pipedrive, Zoho, and dozens of other CRMs. The workflow logic stays the same; you just swap the HubSpot node for your CRM's node and remap the fields. See the real estate CRM comparison to pick the right one.
Does this work with any IDX platform or only Agent OS?
Any IDX platform that supports webhook notifications will work. You need the platform to POST lead data to a URL. Agent OS does this out of the box. Other platforms like iHomefinder and kvCORE may require custom integration or Zapier as a middleman.
How do I handle leads that don't include an email address?
IDX registrations almost always require an email. If you're getting leads without emails, the issue is usually your form configuration. For the rare case where you have a phone number but no email, you can skip the Apollo enrichment and HubSpot email field, and send only the SMS follow-up.
What if Apollo can't find the contact?
In our experience, Apollo matches about 60-70% of consumer emails. For unmatched leads, the workflow still creates the HubSpot contact and sends the personalized email follow-up. You just skip the SMS node since there's no enriched phone number to send to.
Is automated SMS compliant with real estate regulations?
Automated SMS to leads who submitted a form on your website generally falls under "existing business relationship" provisions, but compliance varies by state. Always include opt-out language ("Reply STOP to unsubscribe"). Consult your broker's compliance officer.
Build This Workflow on Agent OS
This n8n real estate lead automation workflow takes about an hour to set up, runs for free on self-hosted n8n with HubSpot Free, and turns a 15-minute manual process into a 30-second automated one.
If you're tired of losing IDX leads to slow follow-up, this is the fix. The entire setup costs nothing beyond your server if you self-host n8n and use HubSpot Free. Apollo's paid plan adds a monthly cost for enrichment, but the ROI on even one additional closed deal (roughly $10,000 at the national median, based on NAR's November 2025 median of $409,200 at 2.43% buyer's agent commission per Redfin Q2 2025) pays for a full year.
This 5-node build covers the critical first 30 seconds. For the complete real estate lead conversion automation system, from IDX webhook through CRM contact creation and the full follow-up sequence, see our step-by-step walkthrough.
As an Atlanta-based automation team, we build and maintain these workflows for agents across Georgia and the Southeast. Agent OS ships IDX lead capture forms that POST to webhooks out of the box. No custom integration needed. No Zapier middleman. Your leads flow directly into this n8n workflow the moment they register on your site.
Ready to stop losing leads to slow follow-up? Schedule a call and we'll walk you through the setup for your brokerage.
Or if you want to build it yourself first, start with Agent OS for the IDX lead capture, then follow this tutorial step by step.
Disclaimer: This article contains affiliate links to n8n, Apollo, and AnyMailFinder. Rain Automation may earn a commission at no additional cost to you. Automated SMS and email outreach must comply with applicable federal, state, and local regulations including CAN-SPAM and TCPA. Consult your broker and legal counsel for compliance guidance specific to your market. Lead conversion statistics cited are based on industry research and individual results will vary.