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
-
BrightData Connection Failed
Cause: Invalid API credentials or dataset access
Solution: Verify credentials and dataset permissions -
No Data Extracted
Cause: Invalid location or changed page structure
Solution: Verify location names and test other categories -
Gmail Authentication Issues
Cause: Expired OAuth tokens
Solution: Re-authenticate and check permissions -
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
- Digital Marketing Agency Lead Generation
Goal:** Find businesses needing marketing
Target:** Restaurants, retail stores
Approach:** Focus on good-rated but low-online-presence businesses
- B2B Sales Prospecting
Goal:** Find software solution clients
Target:** Growing businesses
Approach:** Focus on recent positive reviews
- 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
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
šø Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
ā” AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
š Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments