How to Automate Lead Generation With n8n (3-Stage Guide)
AnswerIf you sell to local or SMB businesses, lead generation is three repetitive jobs done badly by hand: finding companies, qualifying which ones are worth your time, and writing outreach that doesn't sound copy-pasted. n8n — a workflow automation tool you can self-host for free — can automate all three, because each job is really just "call an
Contents
- What can n8n actually automate in lead generation?
- Stage 1: How do you pull leads with Google Places text search?
- Stage 2: How do you score leads against your ICP with an AI node?
- Stage 3: How do you personalize outreach without writing 100 emails?
- What does the whole pipeline cost?
- What breaks — and how to avoid it?
- We tried it: what we verified in the workflow files
- Questions people ask
What can n8n actually automate in lead generation?
If you sell to local or SMB businesses, lead generation is three repetitive jobs done badly by hand: finding companies, qualifying which ones are worth your time, and writing outreach that doesn't sound copy-pasted. n8n — a workflow automation tool you can self-host for free — can automate all three, because each job is really just "call an API, reshape the data, write it to a spreadsheet."
This guide builds a complete n8n lead generation workflow as a three-stage pipeline:
- Find leads — pull real businesses (name, address, phone, website, rating) from Google Places into a Google Sheet. Use our pre-built Lead Finder ($39, one-time) or wire up the HTTP Request node yourself (we show the exact request shape below).
- Qualify leads — score every row 1–5 against your ideal customer profile with an AI node. Free template: ICP Fit Checker.
- Personalize outreach — generate a genuinely specific opening line per prospect, with a specificity score so you can catch the generic ones. Free template: Cold Email Personalizer.
Stages 2 and 3 are free n8n templates — you only need your own OpenAI API key. Stage 1 needs a Google Places API key either way; the $39 tool just saves you building and debugging the workflow. What n8n will not do for you: pick a good ICP, or make a bad offer convert. Automation multiplies whatever process you feed it.
Stage 1: How do you pull leads with Google Places text search?
The fastest legitimate source of SMB lead data is Google's own business index, via the Places API. The Lead Finder workflow does this with two HTTP Request node calls — and if you'd rather build it yourself, here is the exact shape it uses (verified directly from the workflow file):
Call 1 — search. A GET request to https://maps.googleapis.com/maps/api/place/textsearch/json with two query parameters: query (e.g. dentists in Austin TX) and key (your API key). Google's docs describe query as "the text string on which to search, for example: 'restaurant' or '123 Main Street'." The response contains a results array; a Split Out node turns it into one item per business.
Call 2 — details. For each result, a GET to https://maps.googleapis.com/maps/api/place/details/json with place_id, key, and fields=name,formatted_address,formatted_phone_number,website,rating,user_ratings_total — that field list is what gets you the phone number and website, which the text search alone doesn't reliably return.
A Set node then shapes each lead into clean columns (Name, Address, Phone, Website, Rating, Reviews) and a Google Sheets node appends it to a Leads tab. Change the query value, run again, new list.
Important honesty note: Google marks this textsearch/json endpoint as Legacy. The current Places API (New) uses POST https://places.googleapis.com/v1/places:searchText with an X-Goog-Api-Key header, a JSON body containing textQuery, and a required X-Goog-FieldMask header — omitting the field mask causes an error. The legacy endpoint still works with query + key as shown, but if you're building DIY on a fresh Google Cloud project, check which version your project can enable and be prepared to use the new request shape.
In n8n, all of this lives in the built-in HTTP Request node: pick the method, paste the URL, add query parameters as name/value pairs (or import a cURL command and let n8n populate the fields). The node also has built-in pagination modes ("Update a Parameter in Each Request" and "Response Contains Next URL") if you want more than the first page of results — the stock Lead Finder deliberately keeps it simple and processes the first page per run.
Stage 2: How do you score leads against your ICP with an AI node?
A raw list of 60 dentists is not a pipeline. The next stage is to score leads against your ICP so you work the list top-down instead of alphabetically.
The free ICP Fit Checker template does this in six nodes: Manual Trigger → Get leads (Google Sheets read) → Only unscored leads (an IF node that skips rows where Fit is already filled, so re-runs don't re-bill you) → Score fit (AI) (an OpenAI node, gpt-4o-mini by default, with JSON output enforced) → Shape the result → Save scores (append to a Scored tab).
The prompt is the whole product here. It contains an editable ICP block — industry, company size, the pain you solve, who buys — and asks the model for strict JSON: a fit integer from 1 (clearly not a fit) to 5 (textbook match) plus a why under 14 words. That one-line reason matters more than the number: it tells you why the model ranked a lead up or down, so you can correct the ICP description when it's wrong.
Setup takes about five minutes: a sheet with Company, What They Do, Size / Notes, and an empty Fit column, plus your OpenAI API key. The template's own caveat is worth repeating: the score is only as good as your ICP description. "B2B companies" scores everything a 3. "Founder-led service businesses, 2–50 people, drowning in manual admin, no ops hire" produces a ranking you can actually sell from.
If you're searching for a free AI agent for lead generation, this is the honest version of it: not an autonomous agent that prospects while you sleep, but an AI scoring step inside a workflow you control — which is what actually ships.
Stage 3: How do you personalize outreach without writing 100 emails?
Templated cold email gets deleted; hand-writing every opener doesn't scale. The middle path is to personalize cold emails at scale: automate the drafting, keep a human on send.
The free Cold Email Personalizer mirrors Stage 2's structure: Manual Trigger → Get prospects (Google Sheets) → an IF node that only processes rows with an empty Opener → Write opener (AI) (gpt-4o-mini, strict JSON output) → Shape the result → Save personalized (append to a Personalized tab).
Two design choices make it better than "ChatGPT, write me a cold email":
- It demands real input. Your sheet needs a
Contextcolumn — something true and specific you know about the prospect (a review they got, a service they list, a city they just expanded to). The prompt bans flattery clichés ("love your work", "I hope this finds you well") and any mention of your own product, and requires one sentence under 25 words that would be impossible to send to anyone else. - It grades its own work. Alongside each opener, the model returns a
specificityscore from 1 (could go to anyone) to 5 (references a detail only this prospect would recognize) plus a short reason. Sort by that column and rewrite or discard the low scorers instead of spraying them.
The pipeline connects naturally: Stage 1's Website and Rating columns, and Stage 2's Why reason, are exactly the kind of raw material to paste into Context. Garbage in, generic out — the template says so itself.
What does the whole pipeline cost?
Being straight about costs, because "free" claims in this space are usually half-true:
- n8n itself: free if you self-host the Community Edition (your own server or laptop). n8n Cloud is a paid subscription — see n8n's pricing for current tiers.
- Stage 1 — Google Places API: you need your own Google Cloud API key. Google offers a monthly free usage credit for Maps Platform, but the API is metered: Google's legacy docs warn that Text Search and Place Details "return all of the available data fields for the selected place" and that you will "be billed accordingly," and the new API bills by SKU tier — notably, fields like
rating,websiteUri, and phone numbers sit in the higher Enterprise tier. We won't quote request quotas or dollar figures here because Google changes them; check the current Places API pricing page before scaling up. - Our Lead Finder tool: $39, one-time. It is not free and we don't pretend otherwise. You're paying for the working, debugged workflow — request shape, place-details field list, split/shape/append wiring, and a setup playbook inside the canvas — instead of an afternoon of building it. DIY is genuinely viable with the request shapes above; the tool just collapses the time. Compare on pricing or browse all tools.
- Stages 2 and 3: free templates, bring your own OpenAI API key (pay-per-use; the default
gpt-4o-miniis one of OpenAI's cheapest models, and both templates skip already-processed rows so re-runs don't re-bill). - Zero-time option: have us build it for you — done-for-you setup on your accounts.
Realistic total for a solo founder testing this: $0–39 in software plus small metered API usage.
What breaks — and how to avoid it?
Things that actually go wrong with this n8n lead generation workflow, and the fixes:
- API key errors (
REQUEST_DENIED). The Places API must be enabled on the same Google Cloud project as the key, and billing must be active on the project even inside the free credit. If you restrict the key, restrict it by API; an HTTP-referrer restriction will block server-side calls from n8n, since there's no browser referrer. - Legacy vs. new endpoint. As covered in Stage 1,
textsearch/jsonis in Legacy status. If your project can't use it, switch the HTTP Request node toPOST https://places.googleapis.com/v1/places:searchTextwithX-Goog-Api-Keyand the requiredX-Goog-FieldMaskheaders and atextQueryJSON body. - Rate limits and pagination. The stock workflow processes one page of results per run and fires one details request per business. Don't wrap it in a loop over 500 queries on day one; if you need deeper coverage, use the HTTP Request node's built-in pagination options and add a Wait node between batches.
- Duplicate rows. The Google Sheets node uses append, so re-running the same query re-adds the same businesses. Either change the operation to append-or-update matched on Website/Name, add a Remove Duplicates step, or dedupe in the sheet. The Stage 2 and 3 templates are protected differently — their IF nodes skip rows already scored or already given an opener.
- Data terms. Google's Maps Platform terms restrict how Places data may be stored and used outside Google services. Read them before treating the sheet as a permanent CRM.
- GDPR / consent for cold outreach. Automating the list doesn't automate away the law. B2B cold email is generally workable under legitimate interest in many jurisdictions and under CAN-SPAM in the US, but rules differ by country (some EU states are stricter), you must include a working opt-out and your real identity, and you should suppress anyone who declines. When in doubt, get legal advice for your market — a 5/5 specificity score is not a consent mechanism.
We tried it: what we verified in the workflow files
So you know what's tested claim versus marketing, here's exactly what we verified by opening the three workflow JSON files behind this guide:
- Lead Finder ($39) is an 8-node workflow: a setup sticky note, Manual Trigger, a Set node holding your
query(ships withdentists in Austin TXas the example), an HTTP Request toplace/textsearch/json(query+keyparams), a Split Out onresults, an HTTP Request toplace/details/jsonrequestingname, formatted_address, formatted_phone_number, website, rating, user_ratings_total, a Set node shaping Name/Address/Phone/Website/Rating/Reviews, and a Google Sheets append. The setup note walks through getting the API key and pasting it into both HTTP nodes. - ICP Fit Checker (free) contains the IF-based "only unscored leads" guard, a
gpt-4o-miniOpenAI node with JSON output enforced, and a prompt that returnsfit(1–5) plus awhycapped at 14 words, writing to a separateScoredtab. - Cold Email Personalizer (free) contains the matching "only prospects without an opener" guard and a prompt that bans cliché openers, caps length at 25 words, and returns
opener,specificity(1–5), andwhy.
We also checked the request shapes against current documentation: n8n's HTTP Request node docs (query parameters, cURL import, pagination modes) and Google's Places docs, which is where the Legacy status of textsearch/json and the new API's required X-Goog-FieldMask come from. What we have not done is run a controlled study of reply rates — nobody selling you a template has. The honest claim is narrower: this pipeline reliably turns "business type + city" into a scored, personalized outreach sheet in under an hour of setup, for $0–39 plus metered API usage.
Start with the two free templates on your existing lead list; add Lead Finder when you need the top of the funnel filled too — or have us build it for you.
Questions people ask
Is there a free n8n lead generation template?
Two of the three stages here are free templates: the ICP Fit Checker (AI lead scoring against your ideal customer profile) and the Cold Email Personalizer (AI-written openers with a specificity score). Both need only a Google Sheet and your own OpenAI API key. The lead-sourcing stage (Lead Finder) is a paid $39 one-time tool, though this guide shows the exact request shape to build it yourself.
How does n8n pull leads from Google Places?
With the built-in HTTP Request node: a GET to the Places text search endpoint with your search query and API key, a Split Out node to get one item per business, then a second HTTP request to the place details endpoint for phone, website, and rating, and finally a Google Sheets append. Note Google marks the classic textsearch/json endpoint as Legacy; the new API uses POST places:searchText with a required X-Goog-FieldMask header.
Is this a free AI agent for lead generation?
It's an AI-powered pipeline rather than an autonomous agent: AI nodes score each lead 1–5 against your ICP and draft a personalized opener per prospect, but a human triggers runs and sends the emails. In practice that's more reliable (and more compliant) than a fully autonomous agent, and the AI stages are free templates.
Do I need to pay for n8n to run this?
No — n8n's Community Edition is free to self-host. Costs are your metered Google Places API usage (Google provides a monthly free credit; check current pricing), pay-per-use OpenAI calls for the two AI stages, and optionally $39 one-time for the pre-built Lead Finder workflow.
Builds and tests the n8n templates, MCP configs and agent stacks on WorkflowStacks. Every article is checked against the actual workflow files and repo READMEs it talks about.