generating infinite leads with n8n and google searches

a few words before we dive in.

to a certain extent this playbook feels like a clone of clay, for a fraction of the price (you might only need to pay for n8n and some serp api calls) and with much much more flexibility.

i’ve done my best to explain step by step. if you get stuck, please try to be patient in trying to debug, i can’t explain any and all scenarios in one post.

you’re essentially getting unlimited leads, qualified by ai and exported to any spreadsheet you want.

cold outreach works really really really well when it’s targeted at the right people. you’ll need to make sure you spend the right amount of time on the search queries you’re targeting.

this is part 1 of 2. in part 2 we’ll create an outreach campaign (voice and text)

this is not an anti-clay playbook, but what’s fantastic here is that you have more control, you can build this out and you don’t have to deal with limits or clay costs once you start hitting volume…10k, 100k, 1m etc…

this playbook was created with the fantastic walid boulanouar. struggling or no time to implement? contact him, he does this daily.

i’ll try to use a cooking analogy to make things simple…kitchen, ingredients, recipe and personal taste

let’s go

full Playbook

This step-by-step guide will help you download, import, and use the jso workflow template listed below. Follow these instructions carefully to set up the workflows for scraping data, managing automation, and integrating multi-agent systems.

1. first things first, our kitchen 🔪 (n8n)

for this workflow we’re going to be using a multi-agent automation tool called n8n (read here to learn more about other workflow automation tools)

there are many similar tools but we’ll use n8n here for it’s convenience and simplicity.

  1️⃣ create an n8n account (2 weeks for free)

or 

(bit more technical but not too difficult) get a self-hosted n8n instance 

Here are a few options to guide you with self-hosting

  1. full self-hosting guide you can follow.

  2. you can also follow this short video

  3. or this slightly longer video

2️⃣ it’s also a good idea for you to have a basic knowledge of what n8n workflows and nodes are.

no time to read? click here, i’ve made you an audio guide 👇

ok next…

2. next up…our ingredients (🧈🧂🥛🥑🥒🥚) here’s what you’ll need:

api keys or credentials for our scraping tool and our ai tool (i’ll walk you through these in a bit)

to navigate and scrape the web for lead information we’ll be using a few ingredients.

first ingredient:

1️⃣ serp api for web scraping 

you can click here to get started and grab your api key (this will allow you to use the scraper tool inside our kitchen: n8n)

once you’ve created an account you’ll get 100 free credits and a search api key:

all good? ok let’s continue

second ingredient

2️⃣ openai api 

this means we’re using chatgpt, but not through their own interface, we’ll just be using their technology

click here to get your api key

ok now for the third ingredient!

(setup guide in case you’ll need it)

why? because that’s where we’ll be storing all our lead information.

ok that’s it for our ingredients. next up, grandma’s secret recipe

4. download the recipes (these are ‘workflow templates’) 

previous step was ingredients, this step is the recipe. 

you’ll need these 4 recipes. 

they’re in a format called .json 

(consider .json your recipes)

download them for the next step

5. let’s start cooking our recipe (the json workflows) in our kitchen (n8n):

  1. log in to the n8n account and/or instance we just created before

now comes a crucial part, we’re going to upload our json workflows one by one (we have 4) separately in different workflows. in the end you’ll have something like this if you click on ‘overview’


so to get here… hit the plus symbol

workflow>personal

then click the 3 dots and import from file

let’s import our first workflow… ‘main multi agent’

once imported you’ll see the workflow in n8n

and rename it

ok so that 1 out of 4, now this is only part of the equation, we have 3 more workflows to upload. so repeat what we did before…

let’s go again

that’s 2/4… let’s not do this for the other 2…

until you’ve done all 4

important: our main workflow is this one. fyi.

so far so good! we have the kitchen, and the recipes.

to cook our final meal…we’ll be using the 4 recipes and combining them together.

6. connect your recipe to your accounts

if you scroll through your recipes, from time to time you see red error messages… this usually means that your node is not connected to any account or tools, so let’s do that now.

here we need to connect to our google account + tell n8n what spreadsheet to populate the data to

here we’ll need to connect to our openai api

start by opening the scraper workflow, the one called ‘web serper scraper (trigger workflow )’ 

see i’m getting a red error message:

to fix that 

  1. connect with your google workspace account 

click on the google sheets block

link n8n to your google sheets account

grab the id of the sheet

stick the id in here

select which tab you want to populate, in this case it will be campaigns.

 you’ll have to update the sheet name here as well

and anywhere else where you see an error message

7. let’s tweak things to our ‘taste’, to our target audience 

 open the web scraper workflow node group

(tip: what’s a node group? It’s one of these big blocks, inside are a bunch of nodes)

update the serp api node with your api key:

🔴 tip and important:

 this is the part of the process where the specific targeting for your use case happens in our use case we are looking for cleaning companies in the Chelsea neighbourhood of London. You probably don't care about that. This is the part where you need to create your targeting criteria specific to the type of business that you are whether you are targeting marketing agencies, hair salons or large auditing firms.

this playbook is also not limited to the google maps api. we just used it to illustrate this case. 

even just a regular google search.

to change the search type…you’ll have to update this node:

following these instructions:

so now it’s up to you to customize the type of search (as mentioned just above) but also the search parameters (e.g., chelsea+london+cleaners) as per your requirements. 

depending on your target audience, your icp, your target persona.

to update your search queries you’ll have to make changes here:

tip: at any time you can debug by running a test

yay it’s working, no error messages

ok now go through all 3 of these workflows and make sure there are no red error messages

once this is done we can now go after the main workflow, this is the one that connects all the workflows together

8. configure the main multi-agent web crawler workflow

ok now let’s update the main workflow. we need to link the other workflows to this one…

to  you'll need to update these nodes here. these dotes are asking us to link them to the relevant workflows.

link this one 

to the text scraper tool

you’ll find the id up here

which you’ll input here

for this node:

give it the id of this workflow

for this node

it’s the text scraper tool again

and for this one

it’s the url scraper tool

that’s it!

now test your workflow…

there should be no bugs left, if there are… use the debugging tips n8n gives you.

and voilà!

i’m getting the websites

the emails

and even the phone numbers (gimmick ones here)

the huge advantage here is that there are no limits apart from serp api tokens.

making lead generation virtually free… 

quick tips:

  • You can replace findyouremail with any email finding platform (like instantly)

  • You can substitute google sheets with any crm

of course

  1. after successful testing, modify the workflow to match your requirements.

  2. deploy the workflow:

  • set up triggers for automated runs.

  • schedule executions if needed.

and

9. maintain and monitor

  1. regularly check workflow logs for errors and performance issues.

  2. keep API credentials and configurations up to date.

support??

for any issues or questions, feel free to contact walid on linkedIn:

with these steps, you'll be able to use the json workflow template to create robust automation systems effortlessly. 

happy automating!

⬛️