Deep-personalize 1,000+ cold emails with an AI system
Scrape leads with Apify, crawl their sites in n8n and write multi-line icebreakers.
Tools featured in this playbook
This article was originally posted on YouTube
Here is a multi-line icebreaker generator I built in n8n. It scrapes each lead's whole website, not just the homepage, and writes the first few lines of a cold email that look like you read their entire site. This kind of opener routinely gets me 5 to 10% reply rates, and it's one of the ways I scaled my AI and automation agency to $72,000 a month.
The flow: an Apollo search, scraped with Apify (buying leads straight from Apollo is very expensive), then an n8n flow that scrapes each site, summarizes every page with AI and writes the icebreaker into a Google Sheet. From there the leads go into a campaign in Instantly.
Example output: "Hey Cali, love how L2 makes it easy to filter by acreage. Also a fan of your property update email option. Wanted to run something by you." One pitch for website design agencies built on this got me a 4% reply rate and over 30 qualified leads who wanted to book calls.
The Google Sheet
A Search URLs tab, where you paste Apollo search URLs
A Leads tab with: first name, last name, email, website URL, headline, location, phone number, multi-line icebreaker
Step 1: get the leads
Manual trigger. I start every flow I'm testing with one.
Google Sheets, get rows: connect your Google account and pick the Search URLs tab. It returns each URL and its row number.
HTTP request to Apify: a POST to the Apify "run sync, get dataset items" endpoint for the Apollo scraper actor. I copied the curl example from the Apify API docs and imported it. You need an
Accept: application/jsonheader and anAuthorization: Bearerheader with your Apify token. You can watch the run live in the Apify console. It returned 96 leads with names, emails, LinkedIn URLs, company names, websites and much more.
Tip: pin your data in n8n. You test faster, and it saves API usage. The Google Sheets API has a notoriously low rate limit.
Step 2: filter and scrape the homepage
Filter: keep only leads where the email exists and the website URL exists. 96 went in, 28 came out. That's just how Apollo works.
HTTP request to the website: turn on Follow redirects with max 21. Without that, a lot of sites error out because most of them redirect. In settings, set On error to "continue using error output", because some sites block scraping. 21 of 28 worked. I do nothing with the error branch. I'm quick and scrappy: if 20 of 100 leads work, I just make the Apollo audience big, like 10,000, and get about 2,000.
HTML extract: key
links, CSS selectora, return thehrefattribute as an array, with trim values and clean up text on. You get a clean list of every link on the homepage.Edit fields: keep only what matters (first name, last name, website, headline, location, phone, links).
Why all the links? If you really want to understand a website, you don't scrape one page like most people do. You scrape all of them, have AI summarize each one, then combine that into one summary.
Step 3: loop through each lead's pages
Add a Loop over items node. Everything on the loop branch runs for each lead, until you connect it back to the loop's input. The done branch runs when all leads are processed.
Inside the loop:
Split out the
linksfield, so each link is its own item.Filter: keep links that start with
/. These are relative links on the same site. It's not perfect (you could convert absolute links too), but most sites use relative links, and it's a good enough proxy. 270 links became 121.Remove duplicates within the current input.
HTTP request: the URL is the lead's website plus the relative link. Turn on redirects again.
HTML to Markdown: converts each page to plain text, which uses far fewer tokens than HTML.
Cap the length: if the text is over a limit, slice it. I started at 10,000 characters and went down to 5,000. You don't need more, and long pages made the flow hang.
Step 4: summarize each page with AI
Use the OpenAI "message a model" node with GPT-4.1. If you're on a low rate limit, note this sends a lot of requests quickly.
System prompt: you're a helpful, intelligent website scraping assistant.
User prompt: you get a markdown scrape of a website page. Write a two-paragraph abstract of what the page is about, as comprehensive as an abstract for a published paper, in a straightforward, Spartan tone. Return it as JSON with an
abstractfield. If the page is empty, say "no content".
Then Aggregate the abstract field, so all page summaries for one lead become one array.
Step 5: write the icebreaker
A second OpenAI node turns the summaries into a catchy, personalized opener that implies the rest of the campaign is personalized. My template:
"Hey {name}, love {thing}. Also doing/like/a fan of {other thing}. Wanted to run something by you. I hope you'll forgive me, but I creeped you and your site quite a bit, and I know that {another thing} is important to you guys (or at least I'm assuming this given the focus on {fourth thing}). I put something together a few months ago that I think could help. To make a long story short, it's {what you sell}, and I think it's in line with {some belief they have}."
I don't use fixed variables. I tell AI what to fill in, so it can paraphrase and it reads more natural. My rules:
Write in a Spartan, laconic tone.
Shorten company names: "XYZ" instead of "XYZ Agency", "Love Mayo" instead of "Love Mayo Inc." Same for locations ("San Fran"). Humans don't write the full legal name. If you do, it looks scraped.
Focus on small, non-obvious things, so it looks like we dove deep into their site. No cookie-cutter "love your website".
The prompt order: system prompt, then a user prompt with instructions, then a user prompt with an example input (a profile and website scrapes from a test run), then an assistant prompt with the perfect example output, then the real input.
Step 6: write it back to the sheet
Google Sheets, append row on the Leads tab. Map first name, last name, email, website, headline, location, phone number and the icebreaker. Connect this node back to the loop input. When testing end to end, unpin your nodes first, because pinned data can give a later node more or fewer records than it expects.
Two leads at the same company? I keep both. It makes sense to pitch two people at one business. You could even write "Hey David, I just reached out to Zayn and wanted to follow up with you too", which makes people far more likely to believe a real human is writing.
Where to take it
This system is just a starting point. I focus on the 80/20, even if I waste some leads, because leads are never the bottleneck. You could:
Generate an asset instead of just an icebreaker
Build a big dossier on each lead and feed it into a database for more detailed pitches
Generate several types of icebreakers and test them against each other
Email everyone at the same domain and reference their colleagues: "I was looking through Zayn's profile and noticed X..."
When you can convince someone you're a real human, they take the rest of your pitch a lot more seriously.
Comments
Login to leave a comment