---
title: "Personalized cold email drafts from a lead search"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/46037770-20ff-480d-8dcb-ffd17f113795"
updated: "2026-11-09"
---

# Personalized cold email drafts from a lead search

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that finds leads through an Apify Actor, reads each lead’s website and has GPT-4.1 draft a personalized cold email for each one, saved to a Google Sheet. A form sets the job title, the place, the keywords and your product.

Personalized cold email drafts from a lead search is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-09. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow turns a description of your product into a sheet of leads, each with a cold email drafted for them. A form takes the product, a job title, a place and some keywords. An Apify Actor returns matching people with verified emails. For each one, the workflow reads up to three pages of their company’s site, has GPT-4.1 summarize them and has it write an email that mentions what it found. The drafts and the lead details go to a Google Sheet. Nothing is sent.

### Who it suits

Founders, outbound sales teams, freelancers and agencies that prospect by job title and place and want a draft that mentions the lead’s own business, not a template with a name swapped in.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| B2B software | Founders and sales reps | Describe the product once, then search a job title in one region | A founder targets operations leads in Spain and gets a sheet of drafts to read and send by hand. |
| Web and design agencies | Agency owners | Reach small companies whose sites show a need | An agency searches founders of small studios and gets drafts that mention each studio’s services. |
| Staffing | Recruiters | Prospect hiring managers by title and place | A recruiter searches engineering managers in one city and reviews each draft before sending. |
| Freelancers | Consultants and copywriters | Fill the form for one niche at a time | A copywriter searches marketing leads at software companies and keeps the best drafts. |

You need real comfort with n8n: three accounts, a sheet with the right headers and a loop of nineteen nodes. Skip it if you want emails sent for you, since it only drafts. Its author puts setup at about 18 minutes, which assumes the accounts already exist.

### Where to use it

Any n8n you run will do, as long as it can reach Apify, OpenAI, Google and the websites of your leads.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file, the same steps
- Google Sheets: the drafts land in the tab you pick, one row for each lead
- A mail tool or a CRM: replace \`Add Row\` with its node, or add one after it

### How to set it up

Get it saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Have these ready before you import it.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Apify | An account, its API token and credit for the lead search |
| OpenAI | A key that can use \`gpt-4.1\` |
| Google | An account and a sheet with the eight headers named below |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. In `Leads Scraper`, replace `YOUR_TOKEN` in the `Authorization` header with your Apify token. Keep `Bearer ` before it.
3. Add an OpenAI credential and select it in `Summarize Website Page` and `Generate Multiline Icebreaker`.
4. Make a sheet with these headers in the first row: `first_name`, `last_name`, `designation`, `email`, `website_url`, `location`, `phone_number` and `Outreach Content`.
5. Add a Google Sheets credential and select it in `Add Row`. Replace `YOUR_SHEET_ID` and `YOUR_SHEET_TAB_ID` with the sheet’s ID and the tab’s gid.
6. Read the email template in `Generate Multiline Icebreaker` and change what it claims about the product.
7. For a first run, lower `max_result` in the body of `Leads Scraper` to 3 or 5, then save and use the form’s test address.

The sheet’s ID sits between `/d/` and `/edit` in its address, and the tab’s gid follows `gid=`. You can also switch both fields to From list and pick them. Press Publish when the first run looks right.

### How to use it

Open the form from `On form submission` and fill in your product, the job title to target, the place, keywords if you like, your name and your product’s link. The workflow then takes the leads one at a time, and each gets a row with its details and a draft in `Outreach Content`. A long search takes a while, so watch the sheet fill. Read every draft before you use it.

What to change for a different result

| To change | Where |
| --- | --- |
| Number of leads | \`max\_result\` in the body of \`Leads Scraper\`, 100 in the file |
| Who counts as a lead | The rest of that body, such as \`email\_status\` and \`contact\_email\_exclude\_catch\_all\_domains\` |
| Pages read per lead | The number in \`Limit\`, 3 in the file |
| The email | The second message in \`Generate Multiline Icebreaker\`. Keep its \`email\` key, because \`Add Row\` reads it |
| Columns saved | The mapping in \`Add Row\` |

### Example

These entries in the form:

```text
About your Product: A tool that drafts a first project brief from a client questionnaire
Designation: Founder
Location: Portugal
Keywords: web design
Your Name: Alex
Product URL: https://example.com/
```

The Actor returns founders in Portugal with a verified email and a website. For each, the workflow reads a few pages of the site. It drafts a subject line and a body that names something specific it found there, then your product, three features and a request for a short call. The row holds the lead’s name, title, email, site, place and phone number beside the draft.

### For newcomers and experts

**If you are new.** This is a long workflow, so read it in three parts. The first finds leads, the second reads each lead’s website and the third writes the email and saves it. Run it with `max_result` at 3 or 5 first, and open Executions to see what each node received.

**For experts.** One loop carries a lead through the site reader and the writer, and `Add Row` returns to `Loop Over Items` for the next.

What each stage does

| Stage | Nodes | What to know |
| --- | --- | --- |
| Lead search | \`Leads Scraper\` posts to Apify’s \`run-sync-get-dataset-items\` and waits for the dataset | The Actor ID in the address must stay. \`Code in JavaScript\` encodes the form values first, so spaces reach it as \`%20\` |
| Site reading | \`Scrape Home\`, \`HTML\`, \`Filter\`, \`Limit\` | \`Filter\` keeps links that start with \`/\`, so only relative links are followed, and the home page itself is not summarized |
| Summaries | \`Summarize Website Page\` | GPT-4.1 writes a two-paragraph abstract as JSON for each page |
| The email | \`Generate Multiline Icebreaker\` | GPT-4.1 at temperature 0.5 with JSON output. The reply needs an \`email\` key, since \`Add Row\` reads \`message.content.email\` |

### Good to know

Each run costs money, and the drafts are about named people.

- Billing: OpenAI bills up to four GPT-4.1 calls per lead. Apify bills the search with a start fee and a charge per lead, which the Actor’s listing, read on 2 November 2026, ties to your Apify plan
- Nothing is sent: it only drafts. The template tells the model to say the tool costs a few cents per run and consistently converts, so keep only claims your product can back
- Personal data: the leads are named people with emails and phone numbers, so check the cold-email and data protection rules where you and they are before you contact anyone
- Duplicates: \`Add Row\` appends, so the same search run twice adds the same people twice
- Long runs: a run through many leads can reach your n8n plan’s time limit, so lower \`max\_result\` first
- Your data: your product description and each lead’s site text go to OpenAI, and your search goes to Apify
- Credentials: the JSON holds none, and nothing from its author’s account

## README

```markdown
# Personalized cold email drafts from a lead search

An n8n workflow. A form takes a description of your product, a job title, a place and some keywords. An Apify Actor finds
matching leads with verified emails, the workflow reads each lead's website, and GPT-4.1 drafts a cold email for each
one. The drafts land in a Google Sheet and nothing is sent.

## What is inside

- `workflow.json`: the workflow as n8n exports it, twenty nodes: nineteen that run and one sticky note with the title.
  It holds no credential.
- `README.md`: these notes.

## What we changed from the source

- The author's sheet, the sample product and the sample lead are gone. The sample lead was a named person, so the
  example in `Generate Multiline Icebreaker` is now an invented one.
- The old example reply answered with an `icebreaker` key, while the instructions and `Add Row` use `email`. The new
  example uses `email`.
- The source prompt had `nn` and `n-` where line breaks were meant. We wrote `\n` there.
- `join("/n")` in the last message, which put the text `/n` between page summaries, is now `join("\n")`.
- The form's placeholders no longer name the author's product, name or site.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- An Apify account and its API token, with credit for the lead search.
- An OpenAI API key that can use `gpt-4.1`.
- A Google account, and a Google Sheet for the drafts.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. In `Leads Scraper`, replace `YOUR_TOKEN` in the `Authorization` header with your Apify API token. Keep `Bearer `
   before it.
3. Add an OpenAI credential and select it in `Summarize Website Page` and `Generate Multiline Icebreaker`.
4. In Google Sheets, make a sheet with a tab and these headers in the first row: `first_name`, `last_name`,
   `designation`, `email`, `website_url`, `location`, `phone_number`, `Outreach Content`.
5. Add a Google Sheets OAuth2 credential and select it in `Add Row`. Replace `YOUR_SHEET_ID` and `YOUR_SHEET_TAB_ID`
   with your sheet's ID and the tab's gid, or switch both fields to From list and pick them. The sheet ID sits between
   `/d/` and `/edit` in the sheet's address, and the gid comes after `gid=`.
6. Read the email template in `Generate Multiline Icebreaker` and change what it claims about the product (below).
7. For a first run, lower `max_result` in the body of `Leads Scraper` from 100 to 3 or 5. Save, open the form's test
   address, fill it in and watch the sheet.
8. Press Publish at the top of the canvas (or Shift+P) when you are happy.

## How a run goes

1. The form asks for `About your Product`, `Designation`, `Location`, `Keywords` (optional), `Your Name` and
   `Product URL`.
2. `Code in JavaScript` percent-encodes every text field, so `Product Managers` reaches the search as
   `Product%20Managers`. Its comment says it also lowercases, but the code only encodes. If a search with spaces returns
   nothing, skip this node for the search fields.
3. `Leads Scraper` posts the search to an Apify Actor and waits for its dataset. Apify's listing for the Actor ID in the
   address, read on 2 November 2026, names it Leads Finder by microworlds. The body asks for verified emails, leaves
   out catch-all domains and returns at most `max_result` leads.
4. `Only Websites & Emails` drops leads without a website or an email. `Scrape Home` fetches each home page, `HTML`
   collects its links and `Edit Fields` keeps the lead's details beside them.
5. `Loop Over Items` takes one lead at a time. `Split Out`, `Filter`, `Code` and `Remove Duplicate URLs` turn the links
   into a list of different internal paths, and `Limit` keeps the first three.
6. For each path, `Request web page for URL`, `Markdown` and `Summarize Website Page` fetch the page and have GPT-4.1
   write a two-paragraph abstract. `Aggregate` gathers them.
7. `Generate Multiline Icebreaker` writes the email from the abstracts, the lead's name and headline, and your product
   description. `Add Row` appends the lead's details and the draft to the sheet, and the loop moves to the next lead.

`Filter` keeps only links that start with `/`, so absolute links to the same site never reach `Code`. The home page
itself is not summarized, only up to three pages linked from it.

## Change the look

- Number of leads: `max_result` in `Leads Scraper`.
- Who counts as a lead: the other fields of the same body, such as `email_status` and
  `contact_email_exclude_catch_all_domains`.
- Pages read per lead: the number in `Limit`.
- The email: the second message in `Generate Multiline Icebreaker`, which holds the structure and the rules. Keep the
  `email` key in its JSON format, because `Add Row` reads `message.content.email`.
- Columns: the mapping in `Add Row`. `headline` and `links` are not saved.

## Good to know

- OpenAI bills up to four GPT-4.1 calls per lead, three summaries and one email. Apify bills the lead search. The
  Actor's listing, read on 2 November 2026, shows a small start fee and a charge per lead that depends on your Apify
  plan.
- Nothing is sent. The template tells the model to say the tool costs a few cents per run and consistently converts.
  Keep only claims your product can back.
- The leads are named people with email addresses and phone numbers. Check the cold-email and data protection rules where
  you and they are before you contact anyone.
- `Add Row` appends, so the same search run twice adds the same people twice.
- A run through many leads can reach the time limit of your n8n plan. Lower `max_result` first.
- Your product description and each lead's website text go to OpenAI. Your search goes to Apify.
```

## What is in it

2 files, 32 KB, downloaded as a zip.

```text
README.md  6 KB
workflow.json  26 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 19 steps, starting on a form
- AI: 2 steps call an AI model: Summarize Website Page and Generate Multiline Icebreaker
- Sign-ins: Signs in to: Google Sheets and Apify
- API keys: No API key is left in the file; 1 blank in it for your own key
- Step types: Mindket’s checker reads all 14 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/46037770-20ff-480d-8dcb-ffd17f113795)
- [Its page on Mindket](https://mindket.com/p/46037770-20ff-480d-8dcb-ffd17f113795)
