Skip to content

Andreas-Allcode/CCAI-Email-Auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Email Campaign System

Automated LinkedIn scraping + Bedrock Nova AI email generation + CCAI delivery system.

Essential Files

Core System:

  • ai_email_generator.py - Bedrock Nova AI email generator (no fallbacks)
  • generate_outbound_firefox.py - Firefox LinkedIn scraper + email generator
  • send_outbound_emails.py - CCAI email sender (schedules for 5pm tomorrow)
  • .env - Environment variables (CCAI API keys, AWS credentials)

Dependencies:

  • pyproject.toml - Python dependencies
  • requirements.txt - Alternative dependency file

Prerequisites

  1. Firefox Browser (required - Chrome has LinkedIn bot detection issues)

    # Install Firefox
    brew install firefox
  2. Python Dependencies

    # Install UV package manager
    curl -LsSf https://astral.sh/uv/install.sh | sh
    export PATH="$HOME/.local/bin:$PATH"
    
    # Install dependencies
    uv python install
    uv sync
  3. AWS Credentials (for Bedrock Nova)

    # Set AWS credentials
    export AWS_ACCESS_KEY_ID="your-key"
    export AWS_SECRET_ACCESS_KEY="your-secret"
    export AWS_REGION="us-east-1"
  4. CCAI API Credentials (create .env file)

    CCAI_API_KEY=your-ccai-api-key
    CCAI_CLIENT_ID=your-client-id
    CCAI_EMAIL_URL=your-email-url
    SENDER_EMAIL=your-sender-email
    SENDER_NAME=Your Name
    

Usage

Step 1: Generate AI Emails

python generate_outbound_firefox.py contacts.csv 5
  • Opens Firefox browser (visible)
  • Log into LinkedIn manually when prompted
  • Scrapes LinkedIn profiles from CSV
  • Generates personalized emails with Bedrock Nova
  • Saves to ai_gmail_outbound_results.json

Step 2: Send Emails

python send_outbound_emails.py
  • Sends emails via CCAI API
  • Automatically schedules for 5pm tomorrow PST
  • Shows delivery confirmation

CSV Format

Your CSV must have these columns:

  • First Name - Contact first name
  • Last Name - Contact last name
  • Email - Email address
  • Person Linkedin Url - LinkedIn profile URL
  • Company - Company name (optional, will be scraped)

Important Notes

  • Firefox Required: Chrome triggers LinkedIn bot detection
  • Manual Login: You must log into LinkedIn manually in Firefox
  • Bedrock Nova: No fallbacks - requires valid AWS credentials
  • Email Scheduling: Automatically schedules for 5pm tomorrow
  • Rate Limiting: 3-second delays between LinkedIn scrapes

Troubleshooting

LinkedIn Access Issues:

  • Use Firefox only (not Chrome/Safari)
  • Log in manually when browser opens
  • Complete any security challenges

AWS/Bedrock Issues:

  • Verify AWS credentials are set
  • Ensure Bedrock Nova access in us-east-1
  • Check AWS billing/limits

Email Sending Issues:

  • Verify CCAI API credentials in .env
  • Check CCAI dashboard for delivery status

File Cleanup

Remove these unnecessary files before committing:

  • All *test*.py files
  • All *debug*.py files
  • All *manual*.py files
  • linkedin_mcp_server/ directory (not needed for Firefox approach)
  • Any cache_*.json files
  • Browser-specific test files

Keep only the 4 essential files listed above plus dependencies.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7