Skip to content

Latest commit

 

History

History
245 lines (185 loc) · 7.21 KB

File metadata and controls

245 lines (185 loc) · 7.21 KB

Gmail-Style LinkedIn Outbound System

A personalized email outbound system that generates clean, Gmail-style emails using LinkedIn profile data. Each email is uniquely crafted based on the recipient's LinkedIn profile, company, and role.

🎯 Key Features

Gmail-Style Emails

  • Clean, professional format that looks like personal Gmail emails
  • No fancy headers or HTML templates
  • Natural, conversational tone
  • Personalized subject lines

LinkedIn Personalization

  • Basic Personalization: Uses name, company, title, and recent posts
  • Enhanced Personalization: Deep profile analysis including:
    • Industry-specific insights
    • Role-based pain points
    • Technology stack awareness
    • Recent activity hooks
    • Experience-based connections

Intelligent Analysis

  • Detects industry context (security, fintech, healthcare, etc.)
  • Identifies role-specific challenges (CEO, CTO, Engineering Manager, etc.)
  • Recognizes technology indicators (AWS, Kubernetes, Docker, etc.)
  • Analyzes recent LinkedIn activity for conversation starters

🚀 Quick Start

1. Setup

Ensure you have:

  • AllCode CSV file in the project directory
  • LinkedIn MCP server configured
  • CCAI API credentials in .env file

2. Run Campaign

# Interactive mode
python run_gmail_campaign.py

# Direct commands
python run_gmail_campaign.py enhanced 10    # Enhanced campaign for 10 contacts
python run_gmail_campaign.py basic 5        # Basic campaign for 5 contacts

3. Preview Before Sending

python run_gmail_campaign.py preview-enhanced
python run_gmail_campaign.py stats

📁 File Structure

gmail_outbound.py              # Basic Gmail-style email generator
enhanced_gmail_outbound.py     # Enhanced personalization engine
send_gmail_outbound.py         # Basic email sender
send_enhanced_gmail.py         # Enhanced email sender with analytics
run_gmail_campaign.py          # Unified workflow runner

📧 Email Examples

Basic Gmail-Style Email

Subject: Quick question about Discern Security's tech stack

Hi Geevarghese,

I came across your profile at Discern Security and was impressed by your role as Engineering Manager.

We specialize in AWS cloud solutions and have helped companies like Discern Security streamline their infrastructure and reduce costs by up to 40%.

Would you be open to a brief 15-minute call to discuss how we might be able to help Discern Security with your cloud initiatives?

Best regards,
Andreas Garcia
AllCode
andreas@allcode.com
(415) 890-6431

Enhanced Personalized Email

Subject: Your AWS setup at Discern Security

Hi Geevarghese,

Given your work at Discern Security, you probably understand the challenges of securing cloud-native applications.

We've helped security companies like Discern Security build more resilient, scalable infrastructure that can handle the demands of modern threat detection and response.

Given your experience with AWS, cloud, you'd probably appreciate our approach to cloud-native architecture and DevOps automation.

Would you have 15 minutes to discuss some of the technical challenges you're facing?

Best regards,
Andreas Garcia
AllCode
andreas@allcode.com
(415) 890-6431

🧠 Personalization Engine

Industry Context Detection

  • Security: Zero-trust architecture, cloud-native security, compliance
  • Fintech: Digital payments, regulatory challenges, scalable infrastructure
  • Healthcare: HIPAA compliance, data interoperability, secure patient data
  • Startup: Scaling challenges, cost-effective solutions, reliable architecture

Role-Specific Pain Points

  • CEO/Founder: Balancing growth with operational efficiency
  • CTO: Strategic technology decisions that scale
  • Engineering Manager: Team productivity and system reliability
  • VP Engineering: Scaling teams and systems effectively

Technology Stack Awareness

Detects mentions of: AWS, Kubernetes, Docker, microservices, APIs, DevOps, etc.

📊 Analytics & Insights

Personalization Statistics

python run_gmail_campaign.py stats

Shows:

  • Personalization factors used per contact
  • Success rate of different personalization types
  • Sample personalizations for review

Preview Capabilities

  • Preview emails before sending
  • Analyze personalization factors
  • Review subject line variations
  • Check email length and tone

🔧 Configuration

Environment Variables (.env)

CCAI_API_KEY=your_api_key
CCAI_CLIENT_ID=your_client_id
CCAI_EMAIL_URL=your_email_url
SENDER_EMAIL=andreas@allcode.com
SENDER_NAME=Andreas Garcia

CSV Requirements

The system expects these columns in your CSV:

  • Person Linkedin Url: LinkedIn profile URL
  • First Name: Contact's first name
  • Last Name: Contact's last name
  • Email: Contact's email address
  • Company: Company name
  • Title: Job title

🎛️ Usage Options

Interactive Mode

python run_gmail_campaign.py

Provides a menu-driven interface for campaign selection.

Command Line Options

# Enhanced campaign with 15 contacts
python run_gmail_campaign.py enhanced 15

# Basic campaign with 5 contacts
python run_gmail_campaign.py basic 5

# Preview enhanced emails
python run_gmail_campaign.py preview-enhanced

# Show personalization statistics
python run_gmail_campaign.py stats

# Show help
python run_gmail_campaign.py help

Individual Scripts

# Generate basic emails
python gmail_outbound.py

# Generate enhanced emails
python enhanced_gmail_outbound.py

# Send basic emails
python send_gmail_outbound.py

# Send enhanced emails with preview
python send_enhanced_gmail.py preview

🔍 Caching System

The system caches LinkedIn profile data to avoid re-scraping:

  • Cache files: cache_{linkedin_username}.json
  • Includes: Profile data, recent activity, experiences
  • Speeds up subsequent runs

📈 Best Practices

Email Personalization

  1. Start with Enhanced: Use enhanced personalization for better results
  2. Preview First: Always preview emails before sending
  3. Small Batches: Test with 5-10 contacts initially
  4. Review Stats: Check personalization statistics for insights

Campaign Management

  1. Timing: Space out campaigns to avoid spam detection
  2. Follow-up: Track responses and follow up appropriately
  3. A/B Testing: Compare basic vs enhanced personalization results
  4. Compliance: Ensure compliance with email marketing regulations

🚨 Important Notes

  • LinkedIn Terms: Use in accordance with LinkedIn's Terms of Service
  • Email Compliance: Follow CAN-SPAM and GDPR regulations
  • Rate Limiting: Built-in delays prevent overwhelming recipients
  • Personal Use: This tool is designed for personal outbound campaigns

🔧 Troubleshooting

Common Issues

  1. No CSV Found: Ensure AllCode CSV file is in the project directory
  2. LinkedIn Scraping: Check LinkedIn MCP server configuration
  3. CCAI Errors: Verify API credentials in .env file
  4. Cache Issues: Delete cache files if profiles seem outdated

Debug Mode

Add --log-level DEBUG to see detailed processing information.

📞 Support

For issues or questions:

  • Check the main project README
  • Review LinkedIn MCP server documentation
  • Ensure all dependencies are installed
  • Verify environment variables are set correctly