Skip to content

pypesdev/250-google-leads-in-30-seconds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Google Maps 250 Leads Generator

An n8n workflow that automatically scrapes Google Maps for business leads and inserts them into a Notion database. This workflow can generate up to 250 leads in approximately 30 seconds.

🚀 Features

  • Automated Google Maps Scraping: Uses Apify's Google Places crawler to extract business information
  • Notion Integration: Automatically creates database entries with structured lead data
  • Customizable Search: Configure search queries and locations for targeted lead generation
  • Rich Data Extraction: Captures business names, addresses, categories, phone numbers, and websites
  • Error Handling: Continues processing even if individual entries fail

📋 Prerequisites

Before using this workflow, you'll need:

  1. n8n Instance: Either self-hosted or n8n Cloud account
  2. Apify Account: Sign up at Apify Console and get your API token
  3. Notion Account: Create a Notion workspace and get your integration token
  4. Notion Database: Create an empty database with the required properties (see setup instructions below)

🛠️ Setup Instructions

1. Apify Configuration

  1. Go to Apify Console
  2. Sign up for an account if you don't have one
  3. Navigate to the Google Places Crawler
  4. Get your API token from your account settings
  5. Replace PUT_YOUR_TOKEN_HERE in the workflow with your actual Apify token

2. Notion Database Setup

Create a new database in Notion with the following properties:

Property Name Property Type Description
Business Name Title The name of the business
Address Rich Text Full business address
Category Rich Text Business category/type
Phone Number Phone Number Contact phone number
Website URL Business website (optional)

Database ID: Copy the database ID from the URL (the long string after the last / and before the ?)

3. Notion Integration Setup

  1. Go to Notion Integrations
  2. Create a new integration
  3. Copy the integration token
  4. Share your database with the integration
  5. Update the Notion credentials in the n8n workflow

🔧 Workflow Configuration

Input Parameters

The workflow accepts two main parameters:

  • search_query: The type of business to search for (e.g., "landscapers", "restaurants", "dentists")
  • location: The geographic location to search in (e.g., "Knoxville, TN", "New York, NY")

Default Configuration

The workflow is pre-configured with:

  • Search Query: "landscapers"
  • Location: "Knoxville, TN"
  • Max Results: 250 leads per search
  • Language: English
  • Contact Scraping: Enabled for phone numbers

📊 Data Structure

Each lead entry contains:

{
  "title": "Business Name",
  "address": "Full Address",
  "categoryName": "Business Category",
  "phone": "Phone Number",
  "website": "Website URL"
}

🚀 Usage

  1. Import the Workflow: Import the Google Maps 250 Leads.json file into your n8n instance
  2. Configure Credentials: Set up your Apify and Notion API credentials
  3. Update Database ID: Replace the database ID in the Notion node with your actual database ID
  4. Customize Search: Modify the search query and location in the "Search Query" node
  5. Execute: Run the workflow manually or set up a schedule

⚙️ Workflow Nodes

1. Search Query (Manual Trigger)

  • Purpose: Initiates the workflow with search parameters
  • Input: search_query and location variables

2. Google Maps Scraper (HTTP Request)

  • Purpose: Calls Apify's Google Places crawler API
  • Configuration:
    • Max 250 places per search
    • Scrapes contact information
    • Filters by location and search term

3. Lead Database (Notion)

  • Purpose: Creates database entries for each scraped lead
  • Error Handling: Continues processing even if individual entries fail

🔍 Customization Options

Search Parameters

  • Modify searchStringsArray to search for different business types
  • Change locationQuery to target different geographic areas
  • Adjust maxCrawledPlacesPerSearch to limit or increase results

Data Fields

  • Add additional Notion properties to capture more data
  • Modify the mapping between scraped data and Notion fields
  • Enable additional scraping options (reviews, images, etc.)

Performance

  • Adjust maxCrawledPlacesPerSearch based on your needs
  • Enable/disable specific scraping features to optimize speed
  • Use filters to target specific business types or ratings

🛡️ Error Handling

The workflow includes built-in error handling:

  • Notion Node: Set to "continueErrorOutput" to process remaining leads even if some fail
  • Data Validation: Empty website fields are ignored
  • API Limits: Respects Apify's rate limits and quotas

📈 Best Practices

  1. Start Small: Test with smaller search areas before running large-scale scrapes
  2. Respect Rate Limits: Don't overwhelm the Apify service with too many concurrent requests
  3. Data Quality: Review scraped data for accuracy and completeness
  4. Compliance: Ensure your use case complies with Google's terms of service and local regulations
  5. Backup: Regularly backup your Notion database

🔧 Troubleshooting

Common Issues

No results returned:

  • Check if the search query and location are valid
  • Verify your Apify token is correct and has sufficient credits
  • Ensure the location format is correct (City, State or City, Country)

Notion integration fails:

  • Verify your Notion integration token is valid
  • Ensure the database is shared with your integration
  • Check that the database ID is correct

Partial data:

  • Some businesses may not have complete information
  • The workflow is designed to continue even with missing data
  • Review the error logs in n8n for specific failure reasons

📝 License

This workflow is provided as-is for educational and business purposes. Please ensure compliance with:

  • Google Maps Terms of Service
  • Apify Terms of Service
  • Notion Terms of Service
  • Local data protection regulations (GDPR, CCPA, etc.)

🤝 Contributing

Feel free to submit issues, feature requests, or pull requests to improve this workflow.

📞 Support

For issues related to:


Note: This workflow is designed for legitimate business lead generation. Please use responsibly and in compliance with all applicable terms of service and regulations.

About

An n8n workflow that automatically scrapes Google Maps for business leads and inserts them into a Notion database. This workflow can generate up to 250 leads in approximately 30 seconds.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors