Testing an n8n lead intake bot: 10 targeted conversations found 2 bugs a 200+ dialog test set missed

I recently ran an outside test pass on the demo bot of AgentCore (agentcoreai.ru), a project that builds lead intake assistants in n8n. The developer agreed to share the results, so here is what happened, because the method is easy to copy for any intake bot.

Context. The demo bot is for equipment rental. It talks to customers in Russian, collects the details needed to price a job, and hands a finished request card to a dispatcher. Before this test the project already had its own test set of more than 200 dialogs.

Method. The developer shared 14 of his conversations and the field spec: required fields per stage, allowed values, and how dates, quantities and equipment names are normalised. I wrote 10 new conversations, numbered 15 to 24, in the same format. Each one targets a spec rule his 14 did not cover: “from Monday for 3 days” (start date versus duration), a quantity given in trips, “tomorrow” just after midnight Moscow time, a correction that changes only a trench’s length, a prompt injection, and others. The expected state after every client message was written down before any run, and a small validator checked the file against his own 14. He then replayed all 10 on the live demo bot in his own test runner.

Results, as he reported them. 22 steps: 7 passed, 1 behaved as designed, 8 were not counted because questions after the card are switched off on purpose, and 6 failed.

Two failures were real bugs, and none of the 200+ dialogs had caught either:

  • Case 17: “about five trips” was not accepted as a quantity, so the bot asked for cubic metres instead of sending the card.
  • Case 20: after “not 20, but 25 metres”, the correction reached the dispatcher, but the stored request lost the 1.5 m depth.

He fixed both.

Three failing steps (18 and both steps of 23) exposed a gap in the spec I had been given: aerial platforms need a working height before the card. He has added it. One (24) was an optional topic. In the injection case (21) no card was sent and the dispatcher got a “looks like a joke or ad” flag.

What it shows. More dialogs did not find these bugs. A few conversations aimed at specific rules did, because each had one expected answer written down first, so a reply that sounded fine but stored the wrong value could not pass.

If you build intake bots in n8n, the cheapest version of this is: take your field spec, list every normalisation rule, and write one conversation per rule with the exact stored state you expect after each message.

Really useful write-up. Writing the expected stored state before running is the key bit, since a reply can sound perfect and still save the wrong value. I’d add: keep those targeted cases as a regression set and re-run them after every prompt or model change, because a fix for one rule quietly breaks another surprisingly often. Recent n8n versions have a built-in Evaluations feature that can run a dataset like this, though I haven’t tried it on multi-turn chats, so not sure how well it fits.

Did the expected-state checks also inspect the card at the dispatcher handoff? In case 20, the correction went through, but an unchanged field was lost. Comparing the final payload with the expected card would catch a mismatch between the bot’s state and what the dispatcher actually receives

Thanks, that is a good addition. Keeping the targeted cases as a regression set is exactly how they pay off, because a fix for one rule can quietly break another, and you only see it if the same cases run again after every prompt or model change.

On Evaluations, I have not tried it on multi turn chats either. One shape that might fit is one dataset row per client message, with a conversation id, the message, and the expected stored state after it, then replaying the rows in order and comparing the stored fields rather than the reply text. If anyone has run it that way, I would be curious how it went.

Good question. The expected states in this pass were checked against the bot’s stored request, not the card itself. Case 20 shows why that gap matters: the correction did reach the dispatcher, but the stored request lost the 1.5 m depth, so what the dispatcher saw and what the bot kept no longer matched. I don’t know whether the developer’s runner also compares the card payload.

I agree it should. The cheap way is to add the expected card to each case and compare the final payload field by field next to the stored state, so a mismatch between the two fails the case on its own.

That row-per-message shape makes sense to me. One thing I’d watch if you try it: the rows for one conversation need to share memory, keyed on the conversation id, otherwise each row runs as a fresh chat and the “expected state after message 3” check is testing a bot that never saw messages 1 and 2. And checking the card payload next to the stored state like you said would have caught case 20 on its own.

Interesting results. Finding two bugs with just 10 targeted conversations shows why testing specific failure scenarios matters more than simply increasing the number of conversations.

One additional area I’d test is concurrent conversations and webhook retries.

For example:

  • Two customers requesting the same equipment simultaneously.
  • A customer correcting information while an earlier response is still processing.
  • The same incoming message being delivered twice.

I’d verify that each conversation maintains its own state, previously collected fields remain unchanged unless explicitly corrected, and duplicate events don’t generate duplicate dispatcher requests.

I’m developing a self-initiated lead-recovery automation demo, so these are useful scenarios to incorporate into my own testing.

Did you include any interleaved conversations or duplicate-message tests?

No, the 10 cases were all single, sequential conversations, so interleaving and duplicate delivery were not covered. Both are good additions. Duplicate delivery is the cheaper one to start with: send the same message id twice and expect exactly one dispatcher card, because an at least once retry is exactly where a second card sneaks in. For interleaving, run two conversation ids with overlapping messages and check each expected state only against its own id.