# How to build a FREE Lead Generation Machine with n8n + Google Maps + Gmail (Free Template) - 2025

Source: https://qvantx.com/insights/how-to-build-a-free-lead-generation-machine-with-n8n-google-maps-gmail/
Author: Ani Björkström — QvantX Sweden AB, Stockholm
Published: 2025-12-10
Updated: 2026-09-20
Video: https://www.youtube.com/watch?v=ZoZvY-_svcs (10 min)
Topic: Automation

License: free to quote and cite with attribution to https://qvantx.com

---
_AUTOMATION_

## How Do You Build a Free Lead Generation Machine with n8n and Google Maps?

#### Key takeaways

- An n8n workflow can take a single search phrase such as "gyms in Stockholm", pull matching businesses from the Google Maps APIs, scrape their websites for email addresses, and end with ready-to-review Gmail drafts.

- Google Cloud gives every account 200 dollars of monthly API usage at no cost; setting a budget with a zero-dollar limit stops the APIs before any invoice can appear.

- Two filters keep the list clean: one removes businesses with no website, and another removes results marked "no email found" or the placeholder "user@domain.com".

The workflow demonstrated in this tutorial turns a keyword and an outreach context, for example a partnership to sell protein bars to gyms in Stockholm, into a folder of personalised email drafts. It chains the Google Maps Text Search API, the Place Details API, website scraping, an LLM, and Gmail inside one n8n canvas. The end result is a Gmail drafts folder you read through, adjust if needed, sign with your name, and send.

### How does the workflow find businesses and their emails?

It starts with an HTTP POST request to the Google Maps Text Search endpoint at maps.googleapis.com, authenticated with an API key sent as a query parameter under the name "key". The API key is created in console.cloud.google.com under APIs and Services, then Credentials, and both Places API and Places API New must be enabled in the API library.

A short JavaScript code node then filters the raw response down to name, address, place ID, rating, user ratings total, and types. A second request to the Place API, using the place ID and a fields parameter, returns the website and phone number. After merging the two responses, a filter keeps only businesses whose website field is not empty, the websites are scraped, and another code node extracts email addresses from the scraped data.

| Stage | Node | What it does |
|---|---|---|
| Search | HTTP request (Text Search) | Finds businesses matching the form keyword |
| Enrich | HTTP request (Place API) | Adds website and phone via place ID |
| Clean | Filters and code nodes | Drops entries without websites or valid emails |
| Write | LLM call (Claude API) | Drafts the outreach email |
| Deliver | Gmail node | Creates drafts in the Gmail account |

### How does the LLM write the outreach emails?

An HTTP request posts the business data to the Claude API, though any LLM works. The headers carry the x-api-key value, a content type of application/json, and an anthropic-version of 2023-06-01; in the demonstration this produced drafted emails for ten results, and a final code node combines business name, email address, phone, website, rating, email subject, and email body.

### Can you send the emails automatically?

The workflow deliberately stops at drafts rather than sending. The Gmail node is set to the draft resource with the create operation, mapping subject, body, and recipient from the previous step, so every email lands in the drafts folder where you review it, change the name, and press send yourself. Ani Björkström walks through each node in the video and offers the complete workflow to viewers who comment "N8N".

#### FAQ

**Does the Google Maps part of this workflow cost money?**

Google Cloud includes 200 dollars of usage per month at no charge. The tutorial still recommends creating a budget with a zero-dollar limit so the APIs stop working once the free allowance is crossed and no invoice arrives later.

**Do I have to use Gmail and Claude?**

No. Gmail is used because it is common and free, but Outlook or another provider works, and the LLM step accepts any model as long as you adjust the headers, which differ between providers.

**Do I need to write the JavaScript code myself?**

No. Screenshot the code shown on screen and ask an LLM such as ChatGPT to reproduce it, or comment on the video to receive the full workflow.


## Full video transcript

[0:17] Hi, in this tutorial I will show you how to create an N10 workflow where you will specify search keywords for example gyms in Stockholm context for the email for example partnership to sell protein bars in all gyms in Stockholm. Then the workflow will use Google maps to search all the gyms in Stockholm. It will get website information for all of those gyms and then once website information is accessible, it will scrape all data from all of those websites and then look for email addresses and once we get the emails for all of those gyms, we will use an LLM. This LLM will write an email draft that we can send directly to those gyms. And then once that is done, we can login into Google and see all the drafts and we can just read through it.

[1:04] If it is good enough, we can change our name and click on send button. So in the first step, we will create an ATM form which is an actual HTTP request to Google maps API. So we will use post method and we will post information to this URL that is maps.googleapi.com/maps/api/place/extarch and then it will end with JSON. After that we will define authentication. We will use generic credential type and we will use query o which means that the API key will be sent as a query in URL and then we will create our API key. If I click on this you can see that we are using the name that is key and then the value is our actual API key.

[1:49] In order to create API key you will go to console.cloud.google.com google.com and in here you will go to APIs and services and then underneath that there is section that is called credentials and in here you will click on create credentials API key. Once you create your API key you will see your API key. Copy that and then you will save it in here. Next we will click on send query parameters and underneath that we will use using fields below and then the query will be the actual search query that is submitted in our form. copy paste this information or you can drag and drop search keyword from here into the form and then you can see the output will be this output that was sent to us from a Google API.

[2:36] In the next step we will filter this information because in here you can see that we got a lot of information but not all of this we need. We will create a basic JavaScript code to filter this information. Now you can either make a screenshot of this code and then you can send that screenshot to your LLM and ask to your LLM to write this down for you or you can just comment anything and they will send this workflow and in that workflow you can get code is filtering out the information that we need. You can see the output in here. We are basically only keeping the name for the gym address, place ID, rating, user rating total and the types. Once we have this information, we will send another HTTP request to another Google maps API. This time we will use this API that is place API.

[3:24] And by the way, in order to use those APIs, you need to enable them in Google console. So if you come back to Google console and if you go to library here, you can search for Google Places and there are two APIs places API and places API new. Both of those needs to be enabled. Right now, you can see that API is enabled. But for you, if it is not enabled, you can see the button that says enabled. And you will just click on that button. And just for your information, you can use every month $200 within Google Cloud without the need to pay. But I will still recommend that you create a budget and you put a limit on your budget. You can put $0 for your budget so that as soon as you cross that limit, API will stop working and you don't need to get an invoice later on.

[4:15] Okay, back to N10. You will use exactly the same authentication that we created in the previous tab. And underneath query parameters, you will define place ID. And then in here, you will just drag and drop JSON place ID, which is an information that we got when we sent our first post API to Google Maps endpoint. And then here we will also specify another parameter that is fields and the value will be this one. So you can either copy paste this or you can get it in any template. If you comment anything down below this video and once we execute this one we get the output. You can see that output is involving website information. We will scrape all the information from website and after that on the website we will try to get information about the email.

[5:04] So if we come out of this one right now, we have another JavaScript code where we merge business information because we got information from two APIs. Using this code, we will merge this information and our output will look like this. We'll have the name, address, place ID, rating, user rating, total types, phone, and website because we could see that some gyms didn't have website. So we will filter website. For that reason, we will use a filter. And here you can see that I'm dragging JSON website in here. And then I'm creating a filter that says is not empty. Which means that all the gyms that do not have a website will be filtered out and only the ones that have website will be saved in our output. In the next step, we will scrape all the information from those websites.

[5:50] If I open this HTTP request, I will open the code again for you to give you opportunity to either copy this one or you will get this code in NH workflow. And here you can see that it is scraping all the information from those websites. And if I click on show data, you can see that it's a lot of data coming from all of those websites. And in the next step, we will specifically look for website [snorts] information in this data. So here we use this JavaScript code again and our output are only websites. And in here you can see that some websites didn't involve the information about email and we have no email field. So in the next step we will create another filter where we will filter out all the gyms that do not have an email information.

[6:39] We will say is not equal to no email found or it's not equal to user at domain.com because user atd domain.com is not an actual email. And in the output on the right side you can see that all the emails that we got are legit emails. Now we have information about the gym, the name and also we have the website and email. And in the next step we will use an LLM large language model to create a draft for the email that we will be sending. I'm using cloud API. You can use the LLM that you like and in here you will specify the URL and the method will be post. Underneath that we will specify headers. You will use the name that is X API key. This will be different for different LLMs.

[7:24] And then you will specify your API key in here. And then underneath that you will use content type which should be application backward/json. And then the name will be anthropic version. And the value will be for anthropic 2023 June 1st. And then you will click on send body. And this is the code that we will send. It's a lot of code but again you do not have to write this. Just copy this code. via doing a screenshot and then asking your LLM for example chat GPT to write down the code or alternatively if you choose to comment anything and use my workflow then you will get this code inside that workflow. So the result is what you can see on the right side you can see email that will be drafted and sent to gyms.

[8:10] We have 10 results in here. We have one more step where we will format email and for that reason we will use this JavaScript code. I will open this and give you the chance to see the code and to make a screenshot if you like. And the function with this code is that it will combine all the information connected to gyms and also the email that we will send to those gyms. So you can see business name, email address, phone, website, rating and then email subject and email body. In the last step, we will actually create a Gmail draft. And here, of course, you can use Outlook or any other type of email provider. I'm using Gmail because this is the most common one and it's free as well. You will have Gmail account.

[8:55] Resource should be draft because right now we are creating a draft email. We are not yet sending the email and operation is create because we are creating the email. The subject is email subject. We are drag and dropping this one from left to here. And then we have email type. message will be email body and two will be JSON email. When you click on execute step, the outlook will look like this and there is nothing occurred about this. This basically means that all of those emails were created and they will be saved in the draft folder. If you go to your Gmail, you can see that I have a lot of draft emails. So, all of those are here. You can open all of those, read what it says, and if it's good enough, you can change your name and click on send button.

[9:41] If you would like to get this workload, just comment N8N, and I will send you the workflow. Other than that, have a good day. Bye.
