Skip to main content

Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis via BrightData

Workflow preview

Workflow preview
100%
Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis via BrightData preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Lead Workflow: Yelp & Trustpilot Scraping + OpenAI Analysis via BrightData Description: Automated lead generation workflow that scrapes business data from Yelp and Trustpilot based on locat...

Best for

  • Lead Generation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.if, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Incrementors.

Original n8n.io source

1.1 Workflow description

Title
Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis via BrightData
Workflow name
Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis via BrightData

🛒 Lead Workflow: Yelp & Trustpilot Scraping + OpenAI Analysis via BrightData

> Description: Automated lead generation workflow that scrapes business data from Yelp and Trustpilot based on location and category, analyzes credibility, and sends personalized outreach emails using AI.

> ⚠️ Important: This template requires a self-hosted n8n instance to run.

📋 Overview

This workflow provides an automated lead generation solution that identifies high-quality prospects from Yelp and Trustpilot, analyzes their credibility through reviews, and sends personalized outreach emails. Perfect for digital marketing agencies, sales teams, and business development professionals.

✨ Key Features

  • 🎯 Smart Location Analysis
    AI breaks down cities into sub-locations for comprehensive coverage

  • 🛍 Yelp Integration
    Scrapes business details using BrightData's Yelp dataset

  • ⭐ Trustpilot Verification
    Validates business credibility through review analysis

  • 📊 Data Storage
    Automatically saves results to Google Sheets

  • 🤖 AI-Powered Outreach
    Generates personalized emails using Claude AI

  • 📧 Automated Sending
    Sends emails directly through Gmail integration

🔄 How It Works

  1. User Input: Submit location, country, and business category through a form
  2. AI Location Analysis: Gemini AI identifies sub-locations within the specified area
  3. Yelp Scraping: BrightData extracts business information from multiple locations
  4. Data Processing: Cleans and stores business details in Google Sheets
  5. Trustpilot Verification: Scrapes reviews and company details for credibility check
  6. Email Generation: Claude AI creates personalized outreach messages
  7. Automated Outreach: Sends emails to qualified prospects via Gmail

📊 Data Output

Field Description Example
Company Name Business name from Yelp/Trustpilot Best Local Restaurant
Website Company website URL https://example-restaurant.com
Phone Number Business contact number (555) 123-4567
Email Business email address [email protected]
Address Physical business location 123 Main St, City, State
Rating Overall business rating 4.5/5
Categories Business categories/tags Restaurant, Italian, Fine Dining

🚀 Setup Instructions

⏱️ Estimated Setup Time: 10–15 minutes

Prerequisites

  • n8n instance (self-hosted or cloud)
  • Google account with Sheets access
  • BrightData account with Yelp and Trustpilot datasets
  • Google Gemini API access
  • Anthropic API key for Claude
  • Gmail account for sending emails

Step 1: Import the Workflow

  1. Copy the JSON workflow code
  2. In n8n: Workflows → + Add workflow → Import from JSON
  3. Paste JSON and click Import

Step 2: Configure Google Sheets Integration

  1. Create two Google Sheets:
    • Yelp data: Name, Categories, Website, Address, Phone, URL, Rating
    • Trustpilot data: Company Name, Email, Phone Number, Address, Rating, Company About
  2. Copy Sheet IDs from URLs
  3. In n8n: Credentials → + Add credential → Google Sheets OAuth2 API
  4. Complete OAuth setup and test connection
  5. Update all Google Sheets nodes with your Sheet IDs

Step 3: Configure BrightData

  1. Set up BrightData credentials in n8n
  2. Replace API token with: BRIGHT_DATA_API_KEY
  3. Verify dataset access:
    • Yelp dataset: gd_lgugwl0519h1p14rwk
    • Trustpilot dataset: gd_lm5zmhwd2sni130p
  4. Test connections

Step 4: Configure AI Models

  • Google Gemini (Location Analysis)

    • Add Google Gemini API credentials
    • Configure model: models/gemini-1.5-flash
  • Claude AI (Email Generation)

    • Add Anthropic API credentials
    • Configure model: claude-sonnet-4-20250514

Step 5: Configure Gmail Integration

  1. Set up Gmail OAuth2 credentials in n8n
  2. Update "Send Outreach Email" node
  3. Test email sending

Step 6: Test & Activate

  1. Activate the workflow
  2. Test with sample data:
    • Country: United States
    • Location: Dallas
    • Category: Restaurants
  3. Verify data appears in Google Sheets
  4. Check that emails are generated and sent

📖 Usage Guide

Starting a Lead Generation Campaign

  1. Access the form trigger URL
  2. Enter your target criteria:
    • Country: Target country
    • Location: City or region
    • Category: Business type (e.g., restaurants)
  3. Submit the form to start the process

Monitoring Results

  • Yelp Data Sheet: View scraped business information
  • Trustpilot Sheet: Review credibility data
  • Gmail Sent Items: Track outreach emails sent

🔧 Customization Options

Modifying Email Templates

Edit the "AI Generate Email Content" node to customize:

  • Email tone and style
  • Services mentioned
  • Call-to-action messages
  • Branding elements

Adjusting Data Filters

  • Modify rating thresholds
  • Set minimum review counts
  • Add geographic restrictions
  • Filter by business size

Scaling the Workflow

  • Increase batch sizes
  • Add delays between requests
  • Use parallel processing
  • Add error handling

🚨 Troubleshooting

Common Issues & Solutions

1. BrightData Connection Failed

  • Cause: Invalid API credentials or dataset access
  • Solution: Verify credentials and dataset permissions

2. No Data Extracted

  • Cause: Invalid location or changed page structure
  • Solution: Verify location names and test other categories

3. Gmail Authentication Issues

  • Cause: Expired OAuth tokens
  • Solution: Re-authenticate and check permissions

4. AI Model Errors

  • Cause: API quota exceeded or invalid keys
  • Solution: Check usage limits and API key

Performance Optimization

  • Rate Limiting: Add delays
  • Error Handling: Retry failed requests
  • Data Validation: Check for malformed data
  • Memory Management: Process in smaller batches

📈 Use Cases & Examples

1. Digital Marketing Agency Lead Generation

  • Goal: Find businesses needing marketing
  • Target: Restaurants, retail stores
  • Approach: Focus on good-rated but low-online-presence businesses

2. B2B Sales Prospecting

  • Goal: Find software solution clients
  • Target: Growing businesses
  • Approach: Focus on recent positive reviews

3. Partnership Development

  • Goal: Find complementary businesses
  • Target: Established businesses
  • Approach: Focus on reputation and satisfaction scores

⚡ Performance & Limits

Expected Performance

  • Processing Time: 5–10 minutes/location
  • Data Accuracy: 90%+
  • Success Rate: 85%+
  • Daily Capacity: 100–500 leads

Resource Usage

  • API Calls: ~10–20 per business
  • Storage: Minimal (Google Sheets)
  • Execution Time: 3–8 minutes/10 businesses
  • Network Usage: ~5–10MB/business

🤝 Support & Community

Getting Help

Contributing

  • Share improvements
  • Report issues and suggestions
  • Create industry-specific variations
  • Document best practices

> 🔒 Privacy & Compliance: Ensure GDPR/CCPA compliance. Always respect robots.txt and terms of service of scraped sites.


🎯 Ready to Generate Leads!

This workflow provides a complete solution for automated lead generation and outreach. Customize it to fit your needs and start building your pipeline today!

For any questions or support, please contact:
📧 [email protected]
or fill out this form: Contact Us

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Form Trigger - Get User Input

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - AI Location Analyzer

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 3 - Split Sub-locations

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Loop Yelp Locations

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Yelp Scraper

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Check Yelp Scrape Progress

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Wait (1 min) Yelp Completion

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 8 - Verify Yelp Ready

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - If Yelp Has Records

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Fetch Yelp Results

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Save Yelp Data to Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 12 - Clean Unique Websites

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Read Yelp Sheet Websites

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 14 - Make Trustpilot URLs

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Remove Duplicate TP URLs

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Loop Trustpilot URLs

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 17 - Trigger Trustpilot Scraper

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 18 - Check Trustpilot Scrape Progress

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Verify Trustpilot Scraper Ready

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 20 - Wait (1 min) Trustpilot Completion

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 21 - If Trustpilot Has Records

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - Download Trustpilot Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 23 - Save Trustpilot Data to Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 24 - Read Emails from Trustpilot Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis via BrightData
Complexity advanced
Nodes 32
Categories Lead Generation, Multimodal AI
Author Incrementors
Published 13 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4912/4912.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Lead workflow: Yelp & Trustpilot scraping + OpenAI analysis via BrightData do?

Lead Workflow: Yelp & Trustpilot Scraping + OpenAI Analysis via BrightData Description: Automated lead generation workflow that scrapes business data from Yelp and Trustpilot based on locat...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, Multimodal AI use case.