n8n Template: Apify + GPT-4 Deep Multiline Icebreaker Generator
Apollo search leads → multi-page website scraping & summarization → GPT-4.1 personalized cold-email openers → Google Sheets output
- Who
- B2B sales, marketing agencies, or automation engineers with n8n experience who need to generate highly personalized cold-email icebreakers at scale
- You get
- Convert Apollo.io search leads into a Google Sheets list with deep multiline icebreakers, ready for import into cold-email platforms
- You need
- n8n · apify · google-sheets
Constraints
Prerequisites: n8n instance; Apollo.io search URLs; Apify account and API key; OpenAI API key; Google Sheets OAuth credentials. Create a Google Sheet with 'Search URLs' and 'Leads' tabs per the template schema, and update the document ID in all Google Sheets nodes. Author estimates 3–4 hours build time and ~$150/month operating cost (Apollo + Apify + OpenAI + email platform).
What they did
Author nicksaraev published this workflow template on the n8n official template gallery. The template demonstrates a complete automation: fetching B2B leads from Apollo.io via Apify scraper, performing deep multi-page website scraping per lead, using GPT-4.1 to generate page summaries, then using GPT-4.1 again to generate multiline personalized cold-email icebreakers, and outputting everything to Google Sheets. The template contains 23 nodes including HTML extraction, Markdown conversion, deduplication, limiting, aggregation, and two OpenAI nodes for summarization and icebreaker generation.
How it went
The author reports 5-10% cold-email reply rates (vs. 1-2% typical) and claims this methodology supported $72K/month agency revenue. These are author-reported effects (author_report); this site has not independently verified them.
Worth knowing
1. Not tested by this site; reproduction=not_tested. Actual results depend on Apollo search quality, website scrapability, and OpenAI output stability. 2. The Generate Multiline Icebreaker user prompt embeds a specific service scenario (finding people hiring website developers); adapt the product/service description for other industries. 3. The Limit node defaults to 3 pages per site; adjust in n8n to balance depth vs. cost. 4. Estimated monthly operating cost is ~$150 (Apollo + Apify + OpenAI + email platform) per the author; actual cost scales with lead volume. 5. Respect robots.txt and scraping ethics; built-in delays and error handling reduce blocking risk. 6. The Google Sheets nodes cache the author's document ID—replace with your own document ID and credentials.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Replace __UKH_BEARER_17__ with your real secret/token (path /nodes/17/parameters/headerParameters/parameters/1/value; literal auth header).
Configuration to replace
- Source template is n8n public workflow #5388 (~23 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use. 1 literal secret value(s) replaced with __UKH_…__ placeholders.
Template retrieved: 2026-10-24
Steps
Fetch leads from Apollo
Configure the workflow start: after the manual trigger (When clicking 'Test workflow'), the Get Search URL node reads Apollo search URLs from the Google Sheets Search URLs tab; the Call Apify Scraper node sends a POST to the Apify Apollo scraper (https://api.apify.com/v2/acts/jljBwyyQakqrL1wae/run-sync-get-dataset-items) with url, getPersonalEmails, getWorkEmails, totalRecords, and a Bearer <your-apify-api-key-here> header; then the Only Websites & Emails filter node keeps only leads that have both organization.website_url and email.
Scrape and clean multi-page websites
The Scrape Home node requests each lead's homepage ({{ $json.organization.website_url }}); the HTML node extracts all a-tag href attributes (links array); the Edit Fields node normalizes lead fields (first_name, last_name, email, website_url, headline, location, phone_number, links); Loop Over Items processes one lead at a time; Split Out expands the links array into individual items; Filter keeps only relative internal links starting with /; the Code node runs JavaScript to convert absolute URLs to relative paths and strip trailing slashes, falling back to the original on parse errors; Remove Duplicate URLs deduplicates; Limit caps each lead at 3 pages to prevent excessive requests.
Execution prompt · Source text。n8n Code node (node: Code) jsCode field
const items = $input.all(); const updatedItems = items.map((item) => { const link = item?.json?.links; if (typeof link === "string") { // Case: starts with "/" → already relative if (link.startsWith("/")) { item.json.links = link; } // Case: absolute URL (http or https) else if (link.startsWith("http://") || link.startsWith("https://")) { try { const url = new URL(link); let path = url.pathname; // Strip trailing slash unless root "/" if (path !== "/" && path.endsWith("/")) { path = path.slice(0, -1); } item.json.links = path || "/"; } catch (e) { // On parse error, keep original item.json.links = link; } } // Fallback: not relative or absolute, leave as-is else { item.json.links = link; } } return item; }); return updatedItems;AI-summarize multi-page content
The Request web page for URL node concatenates website_url with the relative path to batch-request each internal page; the Markdown node converts HTML to Markdown (outputting <div>empty</div> for empty content); the Summarize Website Page node calls GPT-4.1 with a system + user prompt to produce a two-paragraph abstract per page; the Aggregate node combines multiple page abstracts into a comprehensive profile per lead.
Execution prompt · Source text。Summarize Website Page node messages[0].content (system role)
You're a helpful, intelligent website scraping assistant.
Execution prompt · Source text。Summarize Website Page node messages[1].content (user role)
You're provided a Markdown scrape of a website page. Your task is to provide a two-paragraph abstract of what this page is about. Return in this JSON format: {"abstract":"your abstract goes here"} Rules: - Your extract should be comprehensive—similar level of detail as an abstract to a published paper. - Use a straightforward, spartan tone of voice. - If it's empty, just say "no content".Execution prompt · Source text。Summarize Website Page node messages[2].content (dynamic injection of current page Markdown)
={{ $json.data }}Generate icebreaker and write to Google Sheets
The Generate Multiline Icebreaker node calls GPT-4.1 (temperature=0.5) with a system prompt setting a sales-assistant role, then a user prompt containing formatting rules and a few-shot example to synthesize the aggregated abstracts into a multiline personalized opener; output is JSON {"icebreaker":"..."}. The Add Row node appends lead fields plus multiline_icebreaker to the Google Sheets Leads tab, mapping first_name, last_name, email, website_url, location, phone_number, multiline_icebreaker.
Execution prompt · Source text。Generate Multiline Icebreaker node messages[0].content (system role)
You're a helpful, intelligent sales assistant.
Execution prompt · Source text。Generate Multiline Icebreaker node messages[1].content (user role with formatting rules and few-shot example)
=We just scraped a series of web pages for a business called . Your task is to take their summaries and turn them into catchy, personalized openers for a cold email campaign to imply that the rest of the campaign is personalized. You'll return your icebreakers in the following JSON format: {"icebreaker":"Hey {name}. Love {thing}—also doing/like/a fan of {otherThing}. Wanted to run something by you.\n\nI hope you'll forgive me, but I creeped you/your site quite a bit, and know that {anotherThing} is important to you guys (or at least I'm assuming this given the focus on {fourthThing}). I put something together a few months ago that I think could help. To make a long story short, it's an outreach system that uses AI to find people hiring website devs. Then pitches them with templates (actually makes them a demo website). Costs just a few cents to run, very high converting, and I think it's in line with {someImpliedBeliefTheyHave}"} Rules: - Write in a spartan/laconic tone of voice. - Make sure to use the above format when constructing your icebreakers. We wrote it this way on purpose. - Shorten the company name wherever possible (say, "XYZ" instead of "XYZ Agency"). More examples: "Love AMS" instead of "Love AMS Professional Services", "Love Mayo" instead of "Love Mayo Inc.", etc. - Do the same with locations. "San Fran" instead of "San Francisco", "BC" instead of "British Columbia", etc. - For your variables, focus on small, non-obvious things to paraphrase. The idea is to make people think we *really* dove deep into their website, so don't use something obvious. Do not say cookie-cutter stuff like "Love your website!" or "Love your take on marketing!".Execution prompt · Source text。Generate Multiline Icebreaker node messages[2].content (user role, few-shot input example)
=Profile: Aina Rakotoarinaly, CEO founder - Maki Agency / Ti'bouffe, Maki agency, outsourcing/offshoring, Antananarivo, Madagascar Website: This webpage presents Maki Agency, a professional digital outsourcing company based in Madagascar that specializes in tailored web development, integration, design, SEO, content creation, community management, and more. The agency offers a range of white-label and dedicated resource solutions, targeting businesses that wish to outsource various digital projects. Maki Agency emphasizes its team's versatile technical expertise across major web technologies, including CSS, HTML, JQuery, WordPress, PHP, WooCommerce, Laravel, and Odoo. The company positions itself as an ideal partner for comprehensive digital support, ensuring that client's digital and branding needs are met through experienced personnel and rigorous project management.\n\nThe website details the specific services provided, such as graphic and web design (logos, banners, retouching), web integration (landing pages, newsletters, site layouts), development (showcase sites, e-commerce, intranets, bespoke applications, maintenance), content writing (SEO-optimized texts, articles, product sheets, social media posts), search engine optimization (audits, optimizations, submissions), and social media management. The agency highlights its strengths in quality of work, experience, and discretion, especially in white-label arrangements. Visitors are encouraged to contact Maki Agency for new or existing projects, and convenient contact options (phone, QR codes, social media, chat) are provided for initiating discussions. This page presents Maki Agency, a Madagascar-based digital agency specializing in web outsourcing and subcontracting services. The agency emphasizes its experience and dedicated team capable of handling diverse digital tasks such as web development, design, SEO, content writing, integration, community management, and maintenance. Maki Agency offers both white-label and dedicated resource solutions for clients seeking to externalize parts of their workflow to a specialized offshore partner. The descriptions highlight the agency's proficiency in popular web technologies, frameworks, and CMS platforms (such as HTML, CSS, PHP, WordPress, Laravel, WooCommerce, and Odoo), as well as its ability to execute projects ranging from landing pages, e-commerce platforms, and intranets to detailed graphic design and content creation.\n\nThe site underscores Maki Agency's core values and competitive advantages, such as meticulous attention to detail, experienced professionals, creativity, discretion, and a client-focused approach. It provides detailed breakdowns of service offerings, ranging from graphic materials (logos, flyers, banners), technical integration, app and website development, staff outsourcing (developers, designers, writers), SEO strategies, community management, and digital content production. Contact details and multiple avenues for communication (phone, WhatsApp, Skype, QR codes) are prominently featured, along with encouragements for clients to reach out for consultations or ongoing projects requiring outsourcing. The agency also highlights its longevity and adaptability in the digital sector, supporting clients across various industries and digital competencies
Execution prompt · Source text。Generate Multiline Icebreaker node messages[3].content (assistant role, few-shot output example)
{"icebreaker":"Hey Aina,\n\nLove what you're doing at Maki. Also doing some outsourcing right now, wanted to run something by you.\n\nSo I hope you'll forgive me, but I creeped you/Maki quite a bit. I know that discretion is important to you guys (or at least I'm assuming this given the part on your website about white-labelling your services) and I put something together a few months ago that I think could help. To make a long story short, it's an outreach system that uses AI to find people hiring website devs. Then pitches them with templates (actually makes them a white-labelled demo website). Costs just a few cents to run, very high converting, and I think it's in line with Maki's emphasis on scalability."}Execution prompt · Source text。Generate Multiline Icebreaker node messages[4].content (user role, runtime dynamic injection of current lead abstracts)
=Profile: {{ $('Loop Over Items').item.json.first_name }} {{ $('Loop Over Items').item.json.last_name }} {{ $('Loop Over Items').item.json.headline }} Website: {{ $json.abstract.join("/n") }}
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and credentials first
This block is the prompt. Ads are never placed here.
This template serves as an n8n workflow setup assistant. Reproduce in this order: 1) Create a Google Sheet with 'Search URLs' and 'Leads' tabs; 2) Import the template or manually build from workflow.json; 3) Configure Google Sheets OAuth, Apify API key, and OpenAI API key in n8n Credentials; 4) Update the documentId in all Google Sheets nodes; 5) Add Apollo search URLs to the Search URLs tab; 6) Test run and verify output in the Leads tab.
Before building, confirm you hold Apify, OpenAI, and Google Sheets API credentials, and have configured them in n8n Credentials.
Source
Cold email icebreaker generator with Apify, GPT-4 & website scraping · nicksaraev · n8n.io · 2025-06-26
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.