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

User Input: Submit location, country, and business category through a form
AI Location Analysis: Gemini AI identifies sub-locations within the specified area
Yelp Scraping: BrightData extracts business information from multiple locations
Data Processing: Cleans and stores business details in Google Sheets
Trustpilot Verification: Scrapes reviews and company details for credibility check
Email Generation: Claude AI creates personalized outreach messages
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 | demo@example.com | | 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

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

Step 2: Configure Google Sheets Integration

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

Step 3: Configure BrightData

Set up BrightData credentials in n8n
Replace API token with: BRIGHT_DATA_API_KEY
Verify dataset access:
Yelp dataset: gd_lgugwl0519h1p14rwk
Trustpilot dataset: gd_lm5zmhwd2sni130p
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

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

Step 6: Test & Activate

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

šŸ“– Usage Guide

Starting a Lead Generation Campaign

Access the form trigger URL
Enter your target criteria:
Country: Target country
Location: City or region
Category: Business type (e.g., restaurants)
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

  1. B2B Sales Prospecting

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

  1. 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

n8n Community Forum:** community.n8n.io
Docs:** docs.n8n.io
BrightData Support:** Via dashboard

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:
šŸ“§ info@incrementors.com
or fill out this form: Contact Us

0
Downloads
7460
Views
8.74
Quality Score
intermediate
Complexity
Author:Incrementors(View Original →)
Created:8/13/2025
Updated:8/25/2025

šŸ”’ Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments