# What happens after someone fills in your demo form, tested with 300 made-up leads

24 November 2026 · 5 min read · hubspot, n8n, revops. By Manveen Singh. Web page: https://manveen.me/writing/an-inbound-crm-on-hubspot-and-n8n

> When someone asks for a demo on a company's website, something has to decide who calls them back and how fast. I built that on HubSpot and n8n and tested it with 300 made-up leads. All 300 landed where my rules said they should.

All the leads here are made-up data, in a free HubSpot account and a copy of n8n I run myself. It has never handled a real lead.

What a business would get: every enquiry goes to one team with a written reason, those worth a call get a deadline, late ones are flagged, and a weekly report counts what happened.

### One made-up lead's route, start to finish

*Drawing:* A lead's route on one line with 6 stops, shown for Priya, a made-up lead. 1 form: Priya asks for a demo. 2 score: 95 out of 100. 3 team: enterprise sales. 4 deadline: call within 1 hour, circled in red. 5 yes or no: the rep accepts the lead. 6 upkeep: nightly tidy-up, weekly report. Circled: the deadline. Late calls get flagged.

HubSpot is a CRM, where a sales team keeps its contacts, companies and deals. n8n runs the automations: steps that happen by themselves, like when a form is sent.

## Priya fills in a form

Priya is made up: a director at a health company with 8,500 staff, asking for a demo.

*a made-up lead from my test list*

- Name: Priya Nair
- Job title: Director of Revenue Operations
- Company: Lumen Health, 8,500 staff
- Form: demo request
- Message: "Evaluating vendors for Q1. Need SSO and Salesforce, budget approved." buying words: +15 (the red pen underlines "Evaluating")
- Came from: LinkedIn, a paid post

**95** out of 100

- fit 55 of 60: company size 30, seniority 20, a sales or revenue job 5
- ready to buy 40 of 40: demo form 25, buying words 15

She scores 95 out of 100. The score sets how urgent the follow-up call is, high, medium or low. It doesn't pick the team.

**Read more: How the score is worked out**

The score runs from 0 to 100. Up to 60 points are for fit and up to 40 for intent, which is how ready the lead sounds.

| Part | Points |
| --- | --- |
| Company size | 1,000 or more staff 30, 100 to 999 25, 20 to 99 15, 2 to 19 8, one person 3, unknown 5 |
| Seniority | executive 25, director or head 20, manager or lead 12, anyone else 5, student 0 |
| Role | 5 more if the title is in sales, revenue, growth, RevOps or marketing operations |
| Which form | demo form 25, pricing page 20, contact form or webinar 10, partner form 10, guide download 5, newsletter 2 |
| Buying words | 15 more for words like "this week", "budget", "contract ends", "evaluating" or "need a call" |

Priya: 30 for size, 20 for director, 5 for a revenue operations title, 25 for the demo form and 15 for buying words. That is 95.

The score sets the follow-up task's priority: 70 and over is high, 45 to 69 medium, under 45 low. It never picks the team.

**Read more: How it records where a lead came from (first-touch and last-touch attribution)**

Links in ads and emails carry tags that say where a click came from (UTM tags, like `utm_source=google`). The form sends them along.

Each contact keeps two copies. First touch is the channel that first brought them in. It is written once and never overwritten. Last touch is rewritten on every form.

Messy values are cleaned into a short list. `fb` becomes `meta`, and Priya's `LinkedIn` with a stray space after it becomes `linkedin`. A form with no tags at all is recorded as `direct`.

A spreadsheet import skips that cleaning, so a weekly count of values outside the list should be 0. It is a cheap check for any CRM.

Live test: 20 leads sent three times, 5 of them coming back from a new channel. First touch stayed the same for 20 of 20, and last touch moved for the 5.

## One team gets her, with a reason and a deadline

Every lead lands in one of seven places. A fixed list of checks picks the place, and the first match wins. Priya's company has over 1,000 staff and she sounds ready, so she goes to enterprise sales, who have 1 hour to call.

### Seven places a lead can land. The bars show where the 300 made-up leads landed first.

- Enterprise sales · call within 1 hour · 1,000 or more staff, ready to talk · 20
- Mid-size sales · call within 1 hour · 100 to 999 staff, ready to talk · 45
- Small-business sales · call within 4 hours · under 100 staff, ready to talk · 76
- Qualifier · within 24 hours · checks a lead first: a bigger company that is not clearly ready, or size unknown · 73
- these four are the sales teams: 214 of the 300
- Partnerships · within 48 hours · wants to resell or refer · 19
- Emails only · no deadline, nobody is asked to call · students, personal email with no company, small and not ready · 54
- Ruled out · no deadline, nobody is asked to call · junk, test entries, competitors · 13

*Red pen:* Priya landed here. She is from the 20-lead test, so she is not in these bars. (on the first row, where the red pen circles "call within 1 hour")

The rep gets a follow-up task in HubSpot with the deadline, the score and the reason.

An AI reviewer that had never seen my rules sorted 20 test leads and agreed on 18. One miss showed a real gap, so I changed that rule: 19 of 20. The reviewer is an AI, so I treat this as a second opinion.

**Read more: The seven places, and the 13 checks in order**

Four places are sales teams: three groups of salespeople by company size, and a qualifier, who checks a lead before a salesperson spends time on it. The fifth is partnerships. Each of those five gets a follow-up task, a to-do in HubSpot with a deadline for the first call. The other two are "emails only", where the lead gets marketing emails and nobody is asked to call, and "ruled out".

A fixed list of checks picks the team, top to bottom. The first one that matches wins.

- No valid email, or no form name: refused, nothing saved.
- Junk like "asdf" or "test": ruled out.
- An email domain on the competitor list: ruled out.
- The partner form, or "resell", "refer" or "partner" in the message: partnerships.
- A student title or a university email: emails only.
- A personal email with no company: emails only.
- A rep already said no and that still holds: the lead stays where the rep sent it.
- The person already belongs to a sales team: they stay with it.
- Their company already belongs to a sales team: the same team.
- Company size unknown: the qualifier checks first.
- Ready to talk (demo form, pricing page, or buying words): a sales team, by company size.
- A small company that is not ready, where the person is asking on behalf of a decision-maker: the qualifier.
- Not ready: a small company gets emails only, a mid-size or bigger one goes to the qualifier.

Buying words are a fixed list, including "this week", "asap", "contract ends", "budget", "ready to buy", "need a call", "evaluating", "security questionnaire" and "procurement".

**Read more: One company, one owner, and no second copy**

A second person from a company that a sales team already holds goes to that team. Grace Kim, Priya's colleague, scored 65 and still landed with enterprise sales, because Lumen Health already belonged to it.

Saving is by email address, so a repeat form updates the person and does not make a second one. Each form gets an id, and the same id twice opens no second task or deal.

A lead that goes to a salesperson (enterprise, mid-size or small-business sales) also opens one deal, HubSpot's record of a possible sale. A lead for the qualifier opens a task and no deal.

Live test: the same 20 leads sent a second and a third time made 0 new contacts, 0 companies, 0 deals and 0 tasks.

Every saved lead carries its reason in a field called `routing_reason`. That is the line the rep reads.

**Read more: How the reviewer was set up, and the two misses**

A fresh AI reviewer that had never seen my rules or the code sorted the same 20 leads. It got the table of leads and a one-line meaning for each team, with no size cut-offs.

The rule I changed: Chloe, an office manager at a 40-person company, wrote "My boss asked me to find out more." My rules sent her to emails only. The reviewer said a person should check her first, and it was right, so a new rule sends her to the qualifier.

I kept my rule for a student doing a thesis. The reviewer said no one should get him. My rules give students emails only, which opens no follow-up task, so it costs nothing, and students become buyers.

These are an AI's labels. A person sorting the same leads would be the stronger test, and no one has done that yet.

After the fix I ran the live test again on a clean account. 13 of 13 checks passed, and Chloe went to the qualifier with a follow-up task.

## The clock starts, and the rep says yes or no

If the deadline passes with no first call, the task is flagged as late: it moves to high priority in HubSpot. No message is sent to anyone.

Then the rep accepts the lead or turns it down. A no needs a reason, and the reason decides where the lead goes next. There were no real reps: a small program answered for them, 134 times. It said yes 66 times and no 68 times.

**Read more: How the late flag works (the SLA check, and speed to lead)**

A second automation looks at open follow-up tasks. If one is past its deadline (what sales teams call an SLA), it raises the task to high priority. It also adds one line saying when it was due and how late it is. The next run sees that line and leaves the task alone, so each task is flagged once.

To test it without waiting, a test run can be told what time it is. With 15 open follow-ups and the clock set 5 hours ahead, the 12 with a 1 or 4 hour deadline were flagged and the 3 with 24 or 48 hours were not. A second run flagged 0 more.

It also records speed to lead: the minutes from the form to the first follow-up being done. I measure from the moment the task was created. If I measured from the day the contact was created, someone who signed up months ago and fills in a new form today would show a response time of months.

It is built to run every hour. I left that timer off: switched on, it would edit HubSpot with nobody watching, and that is the account owner's call.

**Read more: What a yes or a no changes in HubSpot, and why lifecycle stage can't count accepted leads**

The program gave Priya a yes, with the note "Discovery call booked". In the 300-lead test it answered 134 of the 214 leads that reached a sales team, and left the rest unanswered on purpose.

A yes marks the lead as in progress, completes the follow-up task and leaves the deal open. A no closes any open deal as lost, with the reason, and completes the rep's follow-up task. Two exceptions: "duplicate" leaves the deal as it is, and a qualifier who says "not the buyer" keeps the task to find the buyer.

| Reason | Where the lead goes | Comes back |
| --- | --- | --- |
| Not the buyer | the qualifier, with a new task due in 24 hours | no date |
| Bad timing | emails only | after 90 days |
| No budget | emails only | after 180 days |
| Too small | emails only | after 180 days |
| Duplicate | stays where it is | no date |
| Spam or competitor | ruled out | never |

A no also holds. If a rejected lead fills in another form, they stay where the rep sent them and no new task or deal opens. One exception: a lead rejected for bad timing who comes back with buying words goes through the checks again, and usually back to the salesperson who holds its company.

The nightly job moves a lead from emails only to the qualifier on its return date. Sending the same decision twice changes nothing.

One HubSpot detail: lifecycle stage, HubSpot's own label for how far along a contact is, cannot tell you whether a rep accepted a lead. A default setting moves a contact to "opportunity" as soon as a deal is linked, and my first live check of this part failed on exactly that. I count accepted leads with a separate decision field.

## Mistake one: HubSpot made extra copies of every company

In my first test inside HubSpot, 20 leads made 35 company records where there should have been 17.

*Drawing:* The first live test: 17 companies in the test, 35 company records in HubSpot.

- companies in the test: 17
- company records HubSpot held: 35
- ringed in red: the extra records

HubSpot was making its own copy of each company, and then my automation made another. Saving the company first fixed it.

**Read more: Why HubSpot made the copies, and the fix**

HubSpot has a default setting that creates a company for every new email domain the moment a contact is saved. My automation saved the contact first and then made its own company, so each one got a second record.

The fix was the order: save the company first, then the person, and HubSpot links the person to the company that is already there.

The lookup also takes the oldest record for a domain and reports how many it found, in a field called `company_matches`. A duplicate now shows up in every response.

If that setting is on in your account, write companies first. If your automation owns companies, switch the setting off.

One case is still open. Two people from a brand-new company who submit in the same second can each make a company. That happened in a later live test, and the nightly job merged the pair.

## Mistake two: my tidy-up job changed 44 companies outside the project

A tidy-up job cleans the data, like country names. Its first run picked "the oldest 100 companies" in my test account. None were mine: they were older records of real companies from outside this project. It changed the country on 44 of them from "United States" to "US".

*Drawing:* The first run of the nightly job read the oldest 100 companies in the account. 0 were mine. It changed 44 by mistake, and all 44 were put back the same hour.

- the oldest 100 companies in the account: 44 changed by mistake, all 44 put back the same hour
- mine in that batch: 0
- ringed in red: changed by mistake. Filled: left alone.

I put all 44 back to their exact old values the same hour. Now the job only touches companies linked to leads the system handled, and refuses anything that is not test data. The lesson: pick records by a rule that names your own.

**Read more: The two guards, and what else the nightly job does**

An automated test plants an outside company and checks it is left alone.

Guard one is the read. The job now looks only at companies linked to leads the system has handled, plus other records with the same web domain.

Guard two is the write. The step that plans the changes refuses any company outside the test data's reserved example.com addresses.

My reset job, which clears the test data, got the same treatment. It stops before removing anything if a search returns a record that is not on its list. After I rewrote it, its first run did stop, over one made-up lead with a gmail address, and nothing was removed.

What the job does on each run:

- Works out seniority and department from the job title, for reporting.
- Turns country names into two-letter codes, so "United Kingdom" becomes GB. A value it does not know, like "Europe", is left alone and named in the run's summary.
- Merges duplicate companies. It keeps the oldest and archives the copies, because archived records can be restored for 90 days and HubSpot's own merge cannot be undone.
- Moves leads from emails only to the qualifier on their return date.
- Counts required fields that are empty.

It writes only what differs, so a second run straight after makes 0 changes. A data dictionary lists every custom field, what writes it and what broken looks like.

## 300 leads in, counted at every step

Then all of it at once: 300 made-up leads, with the same program playing the reps. A weekly report read it all back from HubSpot and counted it.

### 300 made-up leads, step by step

- Leads in · made-up people who filled in a form · 300
- Reached a sales team · a salesperson or the qualifier · 214 · 71%
- Accepted by a rep · a small program played the reps · 66 · 31% of the 214
- Became a deal · a possible sale opened in HubSpot; the qualifier's leads get none yet · 54 · 82% of the 66
- Won · the program marked the deal as won · 16 · 30% of the 54
- First follow-ups on time · done inside the team's deadline · 74% (167 of 225)

Late means the program left the task open past its deadline. The 225 are the 214 sales follow-ups plus 11 of the 19 partnership ones. Another 8 were not due yet.

The program also decided which deals were won or lost, so the 16 shows the report counts wins correctly. It is not a win rate, and the 74% says nothing about how fast a real team would be.

The report also asks whether a high score means a better lead. Reps accepted 52% of the leads scoring 70 or more, and 7% of those under 45. But I made the simulated reps likelier to accept high scores. So this only shows the report can spot a pattern. Whether this score works on real leads is untested.

**Read more: How the 300-lead run worked (MQL and SQL counts), and how I checked the report**

The weekly report only reads from HubSpot. It changes nothing.

300 made-up leads from a fixed random seed went in through the live form address, then 134 simulated rep decisions through the live decision address. 38 completed follow-ups and 36 closed deals went in through test-only inputs.

In CRM terms, a lead that reached a sales team is a marketing-qualified lead (MQL) and one a rep accepted is a sales-qualified lead (SQL). The 19 partnership leads are counted on their own line.

Fewer deals than accepted leads is expected: a lead the qualifier accepts opens no deal yet.

| Team | Follow-ups | On time | Late | Not due yet |
| --- | --- | --- | --- | --- |
| Enterprise sales | 20 | 18 | 2 | 0 |
| Mid-size sales | 45 | 31 | 14 | 0 |
| Small-business sales | 76 | 61 | 15 | 0 |
| Qualifier | 73 | 46 | 27 | 0 |
| Partnerships | 19 | 11 | 0 | 8 |
| All | 233 | 167 | 58 | 8 |

Every follow-up that was completed was done within minutes, in test time. The late ones were still open when the report's clock, set 30 hours after the last lead, judged them.

The report also splits the same counts by where a lead first came from. In this run google brought 72 of the 300 leads and 7 of the 16 wins.

To check the report itself, I wrote a separate recount as a database query from the lead generator's own records, and the numbers matched. A planted record from outside the test data was left out, a second run gave identical numbers, and the report made 0 writes. The whole run took 2,858 requests to HubSpot.

**Read more: The numbers behind the score answer**

| Score band | Leads | Reached a sales team | Accepted | Rate |
| --- | --- | --- | --- | --- |
| 0-44 | 107 | 43 | 3 | 7% |
| 45-69 | 133 | 111 | 32 | 29% |
| 70+ | 60 | 60 | 31 | 52% |

The test is a one-sided Fisher exact test of the top band against the bottom band, and it gives p < 0.001.

For win rate the report says "not enough data". The top band had 22 closed deals and the bottom band 2, and the report wants 10 in each before it gives a p-value.

## What it doesn't do

- It has only handled made-up leads, in a free account with one user.
- Deadlines are plain clock hours, so nights and weekends count.
- The three timers (late flag, nightly tidy-up, weekly report) are switched off. Switching them on is the account owner's decision, because two of them change HubSpot with nobody watching.
- Alerts when an automation fails are the next part, and they are not built yet.

**Read more: Smaller limits**

- The teams are a label on the lead, not different people's inboxes.
- The form's web address is protected by one password. A form on a public web page cannot keep that password secret, so a real site would pass the form through its own server first.
- The nightly job reads at most 100 contacts and 100 companies a run, and says so when it hits that.
- Two people from a brand-new company who submit in the same second can still create two company records. The nightly job merges them.

## How I checked it, and the code

I built it one part at a time and tested each part in the HubSpot test account before starting the next. 88 automated tests pass, every live check passed, and all 300 test leads went to the team the rules predicted.

The automations, the rules in plain words, every test result and the tests are public: [github.com/Manveen07/hubspot-n8n-inbound-crm](https://github.com/Manveen07/hubspot-n8n-inbound-crm).

**Read more: Every check and its result**

| What was checked | Result |
| --- | --- |
| The rules on their own, automated tests | 88 pass |
| Sorting, company records and where a lead came from | 14 of 14 live checks |
| Late flag | 13 of 13 |
| A rep's yes or no | 16 of 16 |
| Nightly tidy-up | 20 of 20 |
| Weekly report | 15 of 15, and equal to a separate recount |
| The 300 test leads | 300 of 300 went to the team the rules predicted |

**Read more: The key on the two form addresses**

The two addresses that accept data (webhooks, web addresses another system posts to) need a shared secret in a header. Without it the request is refused with a 401 and nothing is written.

Tested live: a lead and a rep decision sent with no key, and with a wrong key, were refused every time and nothing changed in HubSpot.

---

## More writing

- [A champion tracker that can say it isn't sure](https://manveen.me/writing/a-champion-tracker-that-can-say-it-isnt-sure.md), 3 November 2026
- [How I test an n8n workflow before it goes live](https://manveen.me/writing/149-tests-for-a-few-slack-buttons.md), 25 October 2026
- [Marking the AI's homework](https://manveen.me/writing/marking-the-ais-homework.md), Marked 26 Sep 2026
- [Four AI mistakes I caught](https://manveen.me/writing/things-ai-got-confidently-wrong.md), Last entry 19 Sep 2026
- [How I caught my own AI test cheating](https://manveen.me/writing/schema-as-eval-spec.md), 14 June 2026

[all writing](https://manveen.me/writing.md) · [the home page](https://manveen.me/index.md)
