Automate B2B lead generation by using this n8n workflow to scrape websites from Google Maps search results, extract business emails, and save the data to Google Sheets.
Download this n8n workflow template and start using it instantly.
This n8n workflow template is ideal for:
Sales Development Representatives (SDRs): Seeking targeted, high-quality lead lists based on geographical criteria.
Marketing Agencies: Automating prospecting for local businesses.
Data Engineers: Looking for robust examples of web scraping using the n8n node architecture.
Anyone needing a custom n8n workflow to extract public business data securely.
Lead generation requires current and accurate contact information. Manually clicking through hundreds of Google Maps listings is impractical. This robust n8n workflow solves this by providing a hands-free solution to extract potential client emails from businesses listed in a Google Maps search result (e.g., 'dentists in Calgary'). The design prioritizes cleanliness and safety, using multiple filtering and delay steps (Wait n8n node) to prevent rate limiting. This n8n workflow template showcases how to leverage the Code n8n node for advanced regex-based data extraction, transforming a raw HTML scrape into a structured list of actionable leads stored directly in Google Sheets. It's an essential example among powerful n8n templates for accelerating B2B outreach.
The entire process is initiated by the manual n8n trigger, which starts the data extraction sequence.
Scrape Google Maps) against the pre-configured Google Maps URL to fetch the search results HTML.Extract URLs) uses regex to parse the raw HTML and identify all internal and external website links, transforming them into individual items.Filter Google URLs n8n node cleans the list by removing unwanted links (e.g., Google tracking, schema data, Wix/Sentry analytics domains). The list is then deduplicated and limited (using the Limit n8n node) to 100 items for controlled execution.Loop Over Items n8n node iterates through each cleaned website URL. Inside this loop, a Wait n8n node introduces a delay, and the Scrape Site HTTP Request n8n node fetches the content of the individual business website.Extract Emails) applies a specialized regex pattern to extract valid email addresses from the website's HTML.Add to Sheet) to append the high-quality, verified leads into your target spreadsheet.To use this n8n workflow, follow these steps:
Add to Sheet n8n node and set up your Google Sheets OAuth2 API credentials if you haven't already. You will need to select the desired Google Sheet Document ID and Sheet Name.Scrape Google Maps HTTP Request n8n node. Change the URL parameter to the specific Google Maps search query you wish to target (e.g., changing 'carpinteros en tarragona' to your desired city and industry). When clicking ‘Test workflow’ (manualTrigger): Serves as the n8n trigger to manually start the scraping process on demand.
Scrape Google Maps (httpRequest n8n node): Fetches the initial HTML content of the target Google Maps search results page. Key Configuration: URL points to the specific geographical business search.
Extract URLs (Code n8n node): Essential for transforming the raw HTML response into a list of usable website URLs using a simple regex (/https?:\/\/[^\/\s"'>]+/g).
Filter Google URLs (Filter n8n node): Cleans the list by excluding URLs containing terms like 'google', 'gstatic', and various tracking domains, ensuring only business websites are targeted.
Limit (Limit n8n node): Restricts the number of websites processed in a single run (set to 100), enhancing stability and managing server load.
Scrape Site (httpRequest n8n node): Fetches the HTML of each individual business website. Key Configuration: Follow Redirects is set to 'false' to efficiently capture the initial page data.
Extract Emails (Code n8n node): The core extraction logic. Uses a robust regex pattern to identify valid email structures (/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.(?!jpeg|jpg|png|gif|webp|svg)[a-zA-Z]{2,}/g) while avoiding file extensions like .jpg or .png.
Wait & Wait1 (Wait n8n node): Crucial for rate limiting, adding controlled delays (1 second) between requests to protect the scraper from being blocked by target websites.
Use this powerful n8n workflow to automate lead enrichment. Triggered by a Google Sheet update, it finds business contacts using Serper.dev and extracts emails via ScrapingBee, making this a crucial n8n templates solution.

Automate scraping Google Maps business leads, emails, and social media contacts using this advanced n8n workflow. Includes duplicate prevention and saves data directly to Google Sheets.

Automate B2B lead generation by extracting business contact information directly from Google Maps search results using this powerful n8n workflow and saving data to Google Sheets.

Use this powerful n8n workflow to automatically crawl Google Maps search results by keyword, extract valid business emails, and instantly save the verified contacts into a Google Sheets document. Start generating leads today.

Automate lead generation using this advanced n8n workflow. Scrape business website URLs from Google Maps, extract valid emails using regex, and export unique leads directly to Google Sheets for outreach.

Use this powerful n8n workflow to automatically scan your Gmail inbox for potential business leads, filter out junk mail using n8n node scripting, save unique entries to Google Sheets, and send instant alerts to Slack. Get started with n8n templates.

Automation & Growth Engineer | Founder of Automation Hub I build practical, AI-powered workflows that help creators and businesses automate daily tasks, track performance, and make smarter decisions — all without code. Passionate about turning complex systems into simple, scalable automations.







































