methodologyJun 24, 2026·8 min read

Building a Cold Email Agent in n8n: What We Learned

By Jonathan Stocco, Founder

What We Set Out to Build

In early 2026, we set out to answer a specific question: could a multi-agent pipeline in n8n replace the manual prospecting loop that consumes most of a sales rep's week? According to Salesforce's State of Sales Report, sales reps spend only 28% of their time actually selling. The remaining 72% disappears into data entry, internal meetings, and administrative tasks. That number stopped us cold. If the average SDR is selling less than a third of their working hours, the bottleneck is not their pitch. It is the pipeline feeding them contacts to pitch.

We wanted to build something that handled the upstream work: finding qualified leads, pulling relevant context about each one, scoring fit against an ideal customer profile, and drafting a first-touch email that referenced something specific about the recipient's business. The goal was not volume for its own sake. It was precision at a pace no human team could sustain manually.

The system we designed had three discrete stages: a prospecting module that sourced and enriched contact data, a scoring module that ranked leads against defined criteria, and a writing module that generated personalized outreach. Each stage would hand off structured data to the next. Simple in theory.

We built the first version in n8n, which in 2026 remains one of the few orchestration tools that lets you wire together HTTP calls, LLM nodes, and conditional logic without writing a deployment pipeline. For non-technical founders, that matters. You can inspect every node, see exactly what data is passing between steps, and debug failures without reading stack traces.

What Happened, Including What Went Wrong

The first build worked on five leads. At fifty, it fell apart.

I made this mistake myself: I built the initial version with a flat three-agent architecture where a single orchestrator node managed the prospecting, scoring, and writing components simultaneously. All three reported to one controller. At low volume, the orchestrator kept up. When we pushed fifty leads through, the scoring component sat idle waiting on prospecting output that had nothing to do with scoring. The orchestrator was serializing work that should have been parallel, and because the data contracts between stages were implicit, a malformed field from the prospecting step caused silent failures downstream. The writing module received incomplete records and generated emails that referenced missing company details. Those went out. That was bad.

The fix was architectural, not cosmetic. We split each stage into a discrete, independently testable unit with an explicit schema governing what it accepted as input and what it guaranteed as output. The prospecting module could not hand off a record unless it contained a validated set of fields. The scoring module rejected anything that did not match the contract. The writing module never saw a partial record. This is what ForgeWorkflows calls agentic logic: not just chaining LLM calls, but defining the handoff contracts between reasoning components so that each one can fail loudly and independently rather than silently corrupting downstream output.

Splitting into discrete components with explicit handoff contracts cut processing time and made each stage independently testable. That lesson is now baked into every blueprint we ship.

The second failure was subtler. Our initial prompting strategy for the writing module was too generic. We told the LLM to "write a personalized cold email" and passed it a block of company data. The output was technically personalized in that it mentioned the company name, but it read like a mail-merge template. Recipients could tell. Open rates on the first batch were unremarkable.

We restructured the prompt to force the model to identify one specific, recent, verifiable detail about the recipient's business and build the opening line around that detail. A funding announcement. A new product launch. A job posting that signaled a strategic priority. The email body stayed short: three sentences, one question, one call to action. Nothing else. That change, not the automation itself, was what moved open rates.

There is an honest limitation here worth naming. This approach works well when your lead list contains companies with a public digital footprint: active blogs, press coverage, LinkedIn activity, recent job postings. It breaks down for small businesses or niche operators who have minimal online presence. The prospecting module cannot surface specific context that does not exist publicly. For those segments, you either accept lower personalization quality or you invest in manual research for the highest-value accounts and reserve the automated pipeline for the broader list.

Lessons with Specific Takeaways

Three things changed how we build these pipelines now.

Explicit inter-agent schemas are not optional. Every stage in the pipeline must define what it accepts and what it produces. In n8n, this means using a Set node after each major processing step to normalize the output into a known shape before passing it forward. If you skip this, you will spend hours debugging failures that trace back to a single missing field three steps earlier. We learned this the hard way at fifty leads. Do not wait until you are at five hundred.

Personalization quality beats send volume. The instinct when you first automate outreach is to maximize the number of emails sent. Resist it. A pipeline that sends two hundred emails with genuine, specific personalization will outperform one that sends two thousand with generic copy. The LLM is not the bottleneck. The quality of the context you feed it is. Invest in the prospecting and enrichment stages. That is where the differentiation happens.

Deliverability is a separate problem from personalization. We spent significant time on copy quality before realizing that a portion of our sends were landing in spam regardless of content. Domain warm-up, sending infrastructure, and reply-to configuration are prerequisites, not afterthoughts. No amount of personalization recovers an email that never reaches the inbox. If you are building this pipeline from scratch, configure your sending domain before you write a single prompt.

One more thing that surprised us: the scoring stage is the most valuable component in the system, and it is the one most builders skip. Sending to every lead your prospecting module surfaces is a mistake. A scoring step that filters out low-fit contacts before the writing module runs means your LLM spends its cycles on accounts that are actually worth pursuing. It also keeps your sending volume lower, which helps deliverability. The scoring module we built evaluates company size, industry fit, technology stack signals, and recent growth indicators. Leads that do not clear a defined threshold never reach the writing stage.

If you want to see how we structured the full pipeline, including the inter-agent schemas and the scoring logic, the Outbound Prospecting Agent is the packaged version of what we built. The setup guide walks through the configuration decisions in detail, including how to adapt the scoring criteria for different ICP definitions.

For context on how we think about multi-agent architecture more broadly, the post on building an autonomous multi-agent team covers the design principles we apply across all our pipelines.

What We'd Do Differently

Start with the scoring module, not the writing module. Every builder's instinct is to get the email copy working first because that is the visible output. We would flip the order. Define your scoring criteria and build the filter before you write a single prompt for outreach copy. A well-tuned filter means every subsequent step operates on a cleaner input set, and you will catch ICP definition problems early rather than after you have sent a thousand emails to the wrong segment.

Build a feedback loop into the pipeline from day one. We did not instrument reply tracking until after the first campaign. That meant we had no signal on which personalization angles were generating responses versus which were being ignored. In the next build, we would wire reply data back into the scoring model from the start, so the system learns which contact attributes correlate with positive responses over time. Without that loop, you are optimizing blind.

Do not automate a process you have not run manually at least once. We skipped this step on the first build and paid for it. Running twenty outreach sequences by hand before automating them would have surfaced the ICP gaps, the copy problems, and the deliverability issues before they were baked into an automated pipeline. Automation amplifies whatever process you give it. If the process is broken, the automation breaks faster and at higher volume.

Get Outbound Prospecting Agent

$249

View Blueprint

Related Articles